diff --git a/assets/internal/config.3c089.json b/assets/internal/config.3c089.json deleted file mode 100644 index 798739e..0000000 --- a/assets/internal/config.3c089.json +++ /dev/null @@ -1 +0,0 @@ -{"paths":{"1":["effects/builtin-2d-spine",0],"2":["effects/builtin-2d-gray-sprite",0],"3":["effects/builtin-2d-sprite",0],"4":["materials/builtin-unlit",1],"5":["effects/builtin-3d-trail",0],"6":["effects/builtin-2d-graphics",0],"7":["materials/builtin-2d-gray-sprite",1],"8":["materials/builtin-3d-trail",1],"9":["effects/builtin-unlit",0],"10":["materials/builtin-2d-base",1],"11":["materials/builtin-2d-spine",1],"12":["materials/builtin-2d-graphics",1],"13":["effects/builtin-clear-stencil",0],"14":["materials/builtin-clear-stencil",1],"15":["materials/builtin-2d-label",1],"16":["materials/builtin-2d-sprite",1],"17":["effects/builtin-2d-label",0]},"types":["cc.EffectAsset","cc.Material"],"uuids":["02delMVqdBD70a/HSD99FK","0ek66qC1NOQLjgYmi04HvX","14TDKXr2NJ6LjvHPops74o","28dPjdQWxEQIG3VVl1Qm6T","2aKWBXJHxKHLvrBUi2yYZQ","2afAA24LNP4YmYiaVLiivs","30aC+Hnw1PF4pEcoY3kUYb","3ae7efMv1CLq2ilvUY/tQi","46bU+b5fROqIXVPG6aZWWK","6dkeWRTOBGXICfYQ7JUBnG","6fgBCSDDdPMInvyNlggls2","7a/QZLET9IDreTiBfRn2PD","a1U5RdJRFMFL57BdJC9H1X","c0BAyVxX9JzZy8EjFrc9DU","cffgu4qBxEqa150o1DmRAy","e0LYfU5ZlNFoAB4UiRrGUG","ecpdLyjvZBwrvm+cedCcQy","f1h0LXVtJOta5JLZ1xCzfI"],"scenes":{},"redirect":[],"deps":[],"packs":{"0967b326a":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},"name":"internal","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["0967b326a","381d5"],"native":[0,"cea68"]}} \ No newline at end of file diff --git a/assets/internal/config.69b9a.json b/assets/internal/config.69b9a.json new file mode 100644 index 0000000..c0ba0f1 --- /dev/null +++ b/assets/internal/config.69b9a.json @@ -0,0 +1 @@ +{"paths":{"1":["effects/builtin-2d-spine",0],"2":["effects/builtin-2d-gray-sprite",0],"3":["effects/builtin-2d-sprite",0],"4":["materials/builtin-unlit",1],"5":["effects/builtin-3d-trail",0],"6":["effects/builtin-2d-graphics",0],"7":["materials/builtin-2d-gray-sprite",1],"8":["materials/builtin-3d-particle",1],"9":["materials/builtin-3d-trail",1],"11":["effects/builtin-unlit",0],"12":["materials/builtin-2d-base",1],"13":["materials/builtin-2d-spine",1],"14":["effects/builtin-3d-particle",0],"15":["materials/builtin-2d-graphics",1],"16":["effects/builtin-clear-stencil",0],"17":["materials/builtin-clear-stencil",1],"18":["materials/builtin-2d-label",1],"19":["materials/builtin-2d-sprite",1],"20":["effects/builtin-2d-label",0]},"types":["cc.EffectAsset","cc.Material"],"uuids":["02delMVqdBD70a/HSD99FK","0ek66qC1NOQLjgYmi04HvX","14TDKXr2NJ6LjvHPops74o","28dPjdQWxEQIG3VVl1Qm6T","2aKWBXJHxKHLvrBUi2yYZQ","2afAA24LNP4YmYiaVLiivs","30aC+Hnw1PF4pEcoY3kUYb","3ae7efMv1CLq2ilvUY/tQi","43L6CczwNM/6GGmCYEQIoH","46bU+b5fROqIXVPG6aZWWK","60AwGqM1dKELCGhPAR+jK6","6dkeWRTOBGXICfYQ7JUBnG","6fgBCSDDdPMInvyNlggls2","7a/QZLET9IDreTiBfRn2PD","82migssElAGb04Ws6NimQX","a1U5RdJRFMFL57BdJC9H1X","c0BAyVxX9JzZy8EjFrc9DU","cffgu4qBxEqa150o1DmRAy","e0LYfU5ZlNFoAB4UiRrGUG","ecpdLyjvZBwrvm+cedCcQy","f1h0LXVtJOta5JLZ1xCzfI"],"scenes":{},"redirect":[],"deps":[],"packs":{"0b6c4470e":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]},"name":"internal","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["0b6c4470e","f9695"],"native":[0,"cea68",10,"c3a3a"]}} \ No newline at end of file diff --git a/assets/internal/import/09/0967b326a.381d5.json b/assets/internal/import/09/0967b326a.381d5.json deleted file mode 100644 index 3355e3e..0000000 --- a/assets/internal/import/09/0967b326a.381d5.json +++ /dev/null @@ -1 +0,0 @@ -[1,["02delMVqdBD70a/HSD99FK","28dPjdQWxEQIG3VVl1Qm6T","6dkeWRTOBGXICfYQ7JUBnG","14TDKXr2NJ6LjvHPops74o","2afAA24LNP4YmYiaVLiivs","0ek66qC1NOQLjgYmi04HvX","30aC+Hnw1PF4pEcoY3kUYb","c0BAyVxX9JzZy8EjFrc9DU","f1h0LXVtJOta5JLZ1xCzfI"],["_effectAsset","diffuseTexture","mainTexture"],["cc.Texture2D",["cc.EffectAsset",["_name","shaders","techniques"],0],["cc.Material",["_name","_techniqueData"],2,11],["cc.Material",["_name","_techniqueData"],1]],[[1,0,1,2,4],[3,0,1,3],[2,0,1,2]],[[["0,9729,9729,33071,33071,0,0,1",-1],[0],0,[],[],[]],[[[0,"builtin-2d-spine",[{"hash":3550530479,"record":null,"name":"builtin-2d-spine|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\n#if USE_TINT\n in vec4 a_color0;\n#endif\nin vec2 a_uv0;\nout vec2 v_uv0;\nout vec4 v_light;\n#if USE_TINT\n out vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nin vec2 v_uv0;\nin vec4 v_light;\n#if USE_TINT\n in vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n gl_FragColor = finalColor;\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\n#if USE_TINT\n attribute vec4 a_color0;\n#endif\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n gl_FragColor = finalColor;\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TINT","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":[]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"passes":[{"program":"builtin-2d-spine|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[0,"builtin-2d-gray-sprite",[{"hash":4278481454,"record":null,"name":"builtin-2d-gray-sprite|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nin vec3 a_position;\nin mediump vec2 a_uv0;\nout mediump vec2 v_uv0;\nin vec4 a_color;\nout vec4 v_color;\nvoid main () {\n gl_Position = cc_matViewProj * vec4(a_position, 1);\n v_uv0 = a_uv0;\n v_color = a_color;\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nin mediump vec2 v_uv0;\nin vec4 v_color;\nvoid main () {\n vec4 color = v_color;\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n color.a *= texture_tmp.a;\n #else\n color *= texture_tmp;\n #endif\n float gray = 0.2126*color.r + 0.7152*color.g + 0.0722*color.b;\n gl_FragColor = vec4(gray, gray, gray, color.a);\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nattribute vec3 a_position;\nattribute mediump vec2 a_uv0;\nvarying mediump vec2 v_uv0;\nattribute vec4 a_color;\nvarying vec4 v_color;\nvoid main () {\n gl_Position = cc_matViewProj * vec4(a_position, 1);\n v_uv0 = a_uv0;\n v_color = a_color;\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nvarying mediump vec2 v_uv0;\nvarying vec4 v_color;\nvoid main () {\n vec4 color = v_color;\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n color.a *= texture_tmp.a;\n #else\n color *= texture_tmp;\n #endif\n float gray = 0.2126*color.r + 0.7152*color.g + 0.0722*color.b;\n gl_FragColor = vec4(gray, gray, gray, color.a);\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[],"samplers":[]}},"defines":[{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":[]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":[]}],"blocks":[],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"passes":[{"program":"builtin-2d-gray-sprite|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29}}}]}]]],0,0,[],[],[]],[[[0,"builtin-2d-sprite",[{"hash":3278106612,"record":null,"name":"builtin-2d-sprite|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TEXTURE","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":["USE_TEXTURE"]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":["USE_TEXTURE"]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":["USE_TEXTURE"]}]}],[{"passes":[{"program":"builtin-2d-sprite|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[2,"builtin-unlit",[{},"0",11,[{"defines":{"USE_DIFFUSE_TEXTURE":true}},"props",11,[{},"diffuseTexture",6,0]]]]],0,0,[0,0],[1,0],[0,2]],[[[0,"builtin-3d-trail",[{"hash":2929688198,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:add","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\n#if CC_DRAW_WIRE_FRAME\n in vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture(mainTexture, uv);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n #endif\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = add(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture2D(mainTexture, uv);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n #endif\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = add(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]},{"name":"FragConstants","binding":1,"members":[{"name":"tintColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":4224037318,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:multiply","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\n#if CC_DRAW_WIRE_FRAME\n in vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., col.a);\n }\n #endif\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = multiply(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture2D(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., col.a);\n }\n #endif\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = multiply(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]},{"name":"FragConstants","binding":1,"members":[{"name":"tintColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":1704877102,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:addSmooth","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = addSmooth(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture2D(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = addSmooth(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":2717357054,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:premultiplied","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = premultiplied(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture2D(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = premultiplied(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"name":"add","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":1,"blendSrcAlpha":770,"blendDstAlpha":1}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"alpha-blend","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"add-multiply","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:multiply","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"add-smooth","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:addSmooth","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]}}}]},{"name":"premultiply-blend","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:premultiplied","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]}}}]}]]],0,0,[],[],[]],[[[0,"builtin-2d-graphics",[{"hash":550349795,"record":null,"name":"builtin-2d-graphics|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\nin float a_dist;\nout float v_dist;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matViewProj * cc_matWorld * pos;\n v_color = a_color;\n v_dist = a_dist;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\nin float v_dist;\nvoid main () {\n vec4 o = v_color;\n ALPHA_TEST(o);\n #if CC_SUPPORT_standard_derivatives\n float aa = fwidth(v_dist);\n #else\n float aa = 0.05;\n #endif\n float alpha = 1. - smoothstep(-aa, 0., abs(v_dist) - 1.0);\n o.rgb *= o.a;\n o *= alpha;\n gl_FragColor = o;\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\nattribute float a_dist;\nvarying float v_dist;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matViewProj * cc_matWorld * pos;\n v_color = a_color;\n v_dist = a_dist;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\nvarying float v_dist;\nvoid main () {\n vec4 o = v_color;\n ALPHA_TEST(o);\n #if CC_SUPPORT_standard_derivatives\n float aa = fwidth(v_dist);\n #else\n float aa = 0.05;\n #endif\n float alpha = 1. - smoothstep(-aa, 0., abs(v_dist) - 1.0);\n o.rgb *= o.a;\n o *= alpha;\n gl_FragColor = o;\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_SUPPORT_standard_derivatives","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[]}],[{"passes":[{"program":"builtin-2d-graphics|vs|fs","blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"rasterizerState":{"cullMode":0},"properties":{"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[1,"builtin-2d-gray-sprite",{}]],0,0,[0],[0],[3]],[[[2,"builtin-3d-trail",[{},"0",11,[{},"props",11,[{},"mainTexture",6,0]]]]],0,0,[0,0],[2,0],[0,4]],[[[0,"builtin-unlit",[{"hash":922858114,"record":null,"name":"builtin-unlit|unlit-vs|unlit-fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\n#if CC_USE_SKINNING\n in vec4 a_weights;\n in vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform SKINNING {\n vec2 jointsTextureSize;\n };\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform JOINT_MATRIX {\n mat4 jointMatrices[50];\n };\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nin vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nin vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nin vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nin vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nin vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nuniform MAIN_TILING {\n vec2 mainTiling;\n vec2 mainOffset;\n};\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n out mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n out lowp vec4 v_color;\n#endif\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n gl_Position = cc_matViewProj * cc_matWorld * In.position;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform UNLIT {\n lowp vec4 diffuseColor;\n};\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n in lowp vec4 v_color;\n#endif\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n in mediump vec2 v_uv0;\n#endif\nvoid main () {\n vec4 color = diffuseColor;\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n color.a *= diffuseTexture_tmp.a;\n #else\n color *= diffuseTexture_tmp;\n #endif\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n color *= v_color;\n #endif\n ALPHA_TEST(color);\n gl_FragColor = CCFragOutput(color);\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matWorld;\nuniform mat4 cc_matViewProj;\n#if CC_USE_SKINNING\n attribute vec4 a_weights;\n attribute vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform vec2 jointsTextureSize;\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture2D(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture2D(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture2D(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture2D(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture2D(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform mat4 jointMatrices[50];\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nattribute vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nattribute vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nattribute vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nattribute vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nattribute vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nuniform vec2 mainTiling;\nuniform vec2 mainOffset;\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n varying mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n gl_Position = cc_matViewProj * cc_matWorld * In.position;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform lowp vec4 diffuseColor;\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n varying mediump vec2 v_uv0;\n#endif\nvoid main () {\n vec4 color = diffuseColor;\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture2D(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture2D(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n color.a *= diffuseTexture_tmp.a;\n #else\n color *= diffuseTexture_tmp;\n #endif\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n color *= v_color;\n #endif\n ALPHA_TEST(color);\n gl_FragColor = CCFragOutput(color);\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_USE_SKINNING","type":"boolean","defines":[]},{"name":"CC_USE_JOINTS_TEXTRUE","type":"boolean","defines":["CC_USE_SKINNING"]},{"name":"CC_JOINTS_TEXTURE_FLOAT32","type":"boolean","defines":["CC_USE_SKINNING","CC_USE_JOINTS_TEXTRUE"]},{"name":"CC_USE_ATTRIBUTE_UV0","type":"boolean","defines":[]},{"name":"CC_USE_ATTRIBUTE_COLOR","type":"boolean","defines":[]},{"name":"CC_USE_ATTRIBUTE_NORMAL","type":"boolean","defines":[]},{"name":"CC_USE_ATTRIBUTE_TANGENT","type":"boolean","defines":[]},{"name":"USE_DIFFUSE_TEXTURE","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_diffuseTexture","type":"boolean","defines":["CC_USE_ATTRIBUTE_UV0","USE_DIFFUSE_TEXTURE"]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":["CC_USE_ATTRIBUTE_UV0","USE_DIFFUSE_TEXTURE"]}],"blocks":[{"name":"SKINNING","binding":0,"members":[{"name":"jointsTextureSize","type":14,"count":1}],"defines":["CC_USE_SKINNING","CC_USE_JOINTS_TEXTRUE"]},{"name":"JOINT_MATRIX","binding":1,"members":[{"name":"jointMatrices","type":26,"count":50}],"defines":["CC_USE_SKINNING"]},{"name":"MAIN_TILING","binding":2,"members":[{"name":"mainTiling","type":14,"count":1},{"name":"mainOffset","type":14,"count":1}],"defines":[]},{"name":"ALPHA_TEST","binding":3,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]},{"name":"UNLIT","binding":4,"members":[{"name":"diffuseColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"jointsTexture","type":29,"count":1,"binding":30,"defines":["CC_USE_SKINNING","CC_USE_JOINTS_TEXTRUE"]},{"name":"diffuseTexture","type":29,"count":1,"binding":31,"defines":["USE_DIFFUSE_TEXTURE"]}]}],[{"name":"opaque","passes":[{"program":"builtin-unlit|unlit-vs|unlit-fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"depthStencilState":{"depthTest":true,"depthWrite":true},"properties":{"diffuseTexture":{"value":"white","type":29},"diffuseColor":{"type":16,"value":[1,1,1,1],"editor":{"type":"color"}},"alphaThreshold":{"type":13,"value":[0.5]},"mainTiling":{"type":14,"value":[1,1]},"mainOffset":{"type":14,"value":[0,0]}}}]},{"name":"transparent","passes":[{"stage":"transparent","program":"builtin-unlit|unlit-vs|unlit-fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"depthStencilState":{"depthTest":true,"depthWrite":true},"properties":{"diffuseTexture":{"value":"white","type":29},"diffuseColor":{"type":16,"value":[1,1,1,1],"editor":{"type":"color"}},"alphaThreshold":{"type":13,"value":[0.5]},"mainTiling":{"type":14,"value":[1,1]},"mainOffset":{"type":14,"value":[0,0]}}}]}]]],0,0,[],[],[]],[[[1,"builtin-2d-base",{}]],0,0,[0],[0],[1]],[[[1,"builtin-2d-spine",{}]],0,0,[0],[0],[5]],[[[1,"builtin-2d-graphics",{"0":{"defines":{}}}]],0,0,[0],[0],[6]],[[[0,"builtin-clear-stencil",[{"hash":2075641479,"record":null,"name":"builtin-clear-stencil|vs|fs","glsl3":{"vert":"\nprecision highp float;\nin vec3 a_position;\nvoid main () {\n gl_Position = vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nvoid main () {\n gl_FragColor = vec4(1.0);\n}"},"glsl1":{"vert":"\nprecision highp float;\nattribute vec3 a_position;\nvoid main () {\n gl_Position = vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nvoid main () {\n gl_FragColor = vec4(1.0);\n}"},"builtins":{"globals":{"blocks":[],"samplers":[]},"locals":{"blocks":[],"samplers":[]}},"defines":[],"blocks":[],"samplers":[]}],[{"passes":[{"program":"builtin-clear-stencil|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0}}]}]]],0,0,[],[],[]],[[[1,"builtin-clear-stencil",{}]],0,0,[0],[0],[7]],[[[1,"builtin-2d-label",{"0":{"defines":{"USE_TEXTURE":true}}}]],0,0,[0],[0],[8]],[[[1,"builtin-2d-sprite",{"0":{"defines":{"USE_TEXTURE":true}}}]],0,0,[0],[0],[1]],[[[0,"builtin-2d-label",[{"hash":1105459032,"record":null,"name":"builtin-2d-label|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n#if USE_SDF\nuniform Outline {\n vec4 outlineColor;\n float outlineSize;\n};\n#endif\nvoid main () {\n#if USE_SDF\n #if USE_TEXTURE_ALPHAONLY\n float dist = texture(texture, v_uv0).a;\n #else\n float dist = texture(texture, v_uv0).r;\n #endif\n #if USE_SDF_EXTEND\n const float EDGE_VALUE = 0.45;\n #else\n const float EDGE_VALUE = 0.5;\n #endif\n #if CC_SUPPORT_standard_derivatives\n float smoothing = fwidth(dist);\n #else\n float smoothing = 0.05;\n #endif\n float outEdge = EDGE_VALUE - outlineSize;\n float bg = smoothstep(outEdge - smoothing, outEdge, dist);\n float fg = smoothstep(EDGE_VALUE - smoothing, EDGE_VALUE, dist);\n vec4 fgColor = outlineColor * (1.0 - fg) + v_color * fg;\n gl_FragColor = vec4(fgColor.rgb, fgColor.a * bg);\n#else\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if USE_TEXTURE_ALPHAONLY\n o.a *= texture(texture, v_uv0).a;\n #else\n o *= texture(texture, v_uv0);\n #endif\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n#endif\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n#if USE_SDF\nuniform vec4 outlineColor;\nuniform float outlineSize;\n#endif\nvoid main () {\n#if USE_SDF\n #if USE_TEXTURE_ALPHAONLY\n float dist = texture2D(texture, v_uv0).a;\n #else\n float dist = texture2D(texture, v_uv0).r;\n #endif\n #if USE_SDF_EXTEND\n const float EDGE_VALUE = 0.45;\n #else\n const float EDGE_VALUE = 0.5;\n #endif\n #if CC_SUPPORT_standard_derivatives\n float smoothing = fwidth(dist);\n #else\n float smoothing = 0.05;\n #endif\n float outEdge = EDGE_VALUE - outlineSize;\n float bg = smoothstep(outEdge - smoothing, outEdge, dist);\n float fg = smoothstep(EDGE_VALUE - smoothing, EDGE_VALUE, dist);\n vec4 fgColor = outlineColor * (1.0 - fg) + v_color * fg;\n gl_FragColor = vec4(fgColor.rgb, fgColor.a * bg);\n#else\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if USE_TEXTURE_ALPHAONLY\n o.a *= texture2D(texture, v_uv0).a;\n #else\n o *= texture2D(texture, v_uv0);\n #endif\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n#endif\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TEXTURE","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"CC_SUPPORT_standard_derivatives","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"USE_SDF","type":"boolean","defines":[]},{"name":"USE_TEXTURE_ALPHAONLY","type":"boolean","defines":["USE_SDF"]},{"name":"USE_SDF_EXTEND","type":"boolean","defines":["USE_SDF"]},{"name":"CC_USE_ALPHA_ATLAS_TEXTURE","type":"boolean","defines":["USE_TEXTURE"]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]},{"name":"Outline","binding":1,"members":[{"name":"outlineColor","type":16,"count":1},{"name":"outlineSize","type":13,"count":1}],"defines":["USE_SDF"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":["USE_TEXTURE"]}]}],[{"passes":[{"program":"builtin-2d-label|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]},"outlineSize":{"type":13,"value":[0]},"outlineColor":{"type":16,"value":[1,1,1,1]}}}]}]]],0,0,[],[],[]]]] \ No newline at end of file diff --git a/assets/internal/import/0b/0b6c4470e.f9695.json b/assets/internal/import/0b/0b6c4470e.f9695.json new file mode 100644 index 0000000..1780afa --- /dev/null +++ b/assets/internal/import/0b/0b6c4470e.f9695.json @@ -0,0 +1 @@ +[1,["02delMVqdBD70a/HSD99FK","28dPjdQWxEQIG3VVl1Qm6T","6dkeWRTOBGXICfYQ7JUBnG","14TDKXr2NJ6LjvHPops74o","60AwGqM1dKELCGhPAR+jK6","82migssElAGb04Ws6NimQX","2afAA24LNP4YmYiaVLiivs","0ek66qC1NOQLjgYmi04HvX","30aC+Hnw1PF4pEcoY3kUYb","c0BAyVxX9JzZy8EjFrc9DU","f1h0LXVtJOta5JLZ1xCzfI"],["_effectAsset","mainTexture","diffuseTexture"],["cc.Texture2D",["cc.EffectAsset",["_name","shaders","techniques"],0],["cc.Material",["_name","_techniqueData"],2,11],["cc.Material",["_name","_techniqueData"],1]],[[1,0,1,2,4],[3,0,1,3],[2,0,1,2]],[[["0,9729,9729,33071,33071,0,0,1",-1],[0],0,[],[],[]],[[[0,"builtin-2d-spine",[{"hash":3550530479,"record":null,"name":"builtin-2d-spine|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\n#if USE_TINT\n in vec4 a_color0;\n#endif\nin vec2 a_uv0;\nout vec2 v_uv0;\nout vec4 v_light;\n#if USE_TINT\n out vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nin vec2 v_uv0;\nin vec4 v_light;\n#if USE_TINT\n in vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n gl_FragColor = finalColor;\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\n#if USE_TINT\n attribute vec4 a_color0;\n#endif\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n gl_FragColor = finalColor;\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TINT","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":[]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"passes":[{"program":"builtin-2d-spine|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[0,"builtin-2d-gray-sprite",[{"hash":4278481454,"record":null,"name":"builtin-2d-gray-sprite|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nin vec3 a_position;\nin mediump vec2 a_uv0;\nout mediump vec2 v_uv0;\nin vec4 a_color;\nout vec4 v_color;\nvoid main () {\n gl_Position = cc_matViewProj * vec4(a_position, 1);\n v_uv0 = a_uv0;\n v_color = a_color;\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nin mediump vec2 v_uv0;\nin vec4 v_color;\nvoid main () {\n vec4 color = v_color;\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n color.a *= texture_tmp.a;\n #else\n color *= texture_tmp;\n #endif\n float gray = 0.2126*color.r + 0.7152*color.g + 0.0722*color.b;\n gl_FragColor = vec4(gray, gray, gray, color.a);\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nattribute vec3 a_position;\nattribute mediump vec2 a_uv0;\nvarying mediump vec2 v_uv0;\nattribute vec4 a_color;\nvarying vec4 v_color;\nvoid main () {\n gl_Position = cc_matViewProj * vec4(a_position, 1);\n v_uv0 = a_uv0;\n v_color = a_color;\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nvarying mediump vec2 v_uv0;\nvarying vec4 v_color;\nvoid main () {\n vec4 color = v_color;\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n color.a *= texture_tmp.a;\n #else\n color *= texture_tmp;\n #endif\n float gray = 0.2126*color.r + 0.7152*color.g + 0.0722*color.b;\n gl_FragColor = vec4(gray, gray, gray, color.a);\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[],"samplers":[]}},"defines":[{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":[]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":[]}],"blocks":[],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"passes":[{"program":"builtin-2d-gray-sprite|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29}}}]}]]],0,0,[],[],[]],[[[0,"builtin-2d-sprite",[{"hash":3278106612,"record":null,"name":"builtin-2d-sprite|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TEXTURE","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":["USE_TEXTURE"]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":["USE_TEXTURE"]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":["USE_TEXTURE"]}]}],[{"passes":[{"program":"builtin-2d-sprite|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[2,"builtin-unlit",[{},"0",11,[{"defines":{"USE_DIFFUSE_TEXTURE":true}},"props",11,[{},"diffuseTexture",6,0]]]]],0,0,[0,0],[2,0],[0,2]],[[[0,"builtin-3d-trail",[{"hash":2929688198,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:add","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\n#if CC_DRAW_WIRE_FRAME\n in vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture(mainTexture, uv);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n #endif\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = add(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture2D(mainTexture, uv);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n #endif\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = add(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]},{"name":"FragConstants","binding":1,"members":[{"name":"tintColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":4224037318,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:multiply","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\n#if CC_DRAW_WIRE_FRAME\n in vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., col.a);\n }\n #endif\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = multiply(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture2D(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., col.a);\n }\n #endif\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = multiply(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]},{"name":"FragConstants","binding":1,"members":[{"name":"tintColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":1704877102,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:addSmooth","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = addSmooth(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture2D(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = addSmooth(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":2717357054,"record":null,"name":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:premultiplied","glsl3":{"vert":"\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = premultiplied(); }"},"glsl1":{"vert":"\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }","frag":"\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture2D(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = premultiplied(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_DRAW_WIRE_FRAME","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"name":"add","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":1,"blendSrcAlpha":770,"blendDstAlpha":1}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"alpha-blend","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"add-multiply","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|tinted-fs:multiply","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"add-smooth","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:addSmooth","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]}}}]},{"name":"premultiply-blend","passes":[{"program":"builtin-3d-trail|particle-trail:vs_main|no-tint-fs:premultiplied","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"frameTile_velLenScale":{"type":16,"value":[1,1,0,0]}}}]}]]],0,0,[],[],[]],[[[0,"builtin-2d-graphics",[{"hash":550349795,"record":null,"name":"builtin-2d-graphics|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\nin float a_dist;\nout float v_dist;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matViewProj * cc_matWorld * pos;\n v_color = a_color;\n v_dist = a_dist;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\nin float v_dist;\nvoid main () {\n vec4 o = v_color;\n ALPHA_TEST(o);\n #if CC_SUPPORT_standard_derivatives\n float aa = fwidth(v_dist);\n #else\n float aa = 0.05;\n #endif\n float alpha = 1. - smoothstep(-aa, 0., abs(v_dist) - 1.0);\n o.rgb *= o.a;\n o *= alpha;\n gl_FragColor = o;\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\nattribute float a_dist;\nvarying float v_dist;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matViewProj * cc_matWorld * pos;\n v_color = a_color;\n v_dist = a_dist;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\nvarying float v_dist;\nvoid main () {\n vec4 o = v_color;\n ALPHA_TEST(o);\n #if CC_SUPPORT_standard_derivatives\n float aa = fwidth(v_dist);\n #else\n float aa = 0.05;\n #endif\n float alpha = 1. - smoothstep(-aa, 0., abs(v_dist) - 1.0);\n o.rgb *= o.a;\n o *= alpha;\n gl_FragColor = o;\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_SUPPORT_standard_derivatives","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[]}],[{"passes":[{"program":"builtin-2d-graphics|vs|fs","blendState":{"targets":[{"blend":true,"blendSrc":1,"blendDst":771,"blendSrcAlpha":1,"blendDstAlpha":771}]},"rasterizerState":{"cullMode":0},"properties":{"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[1,"builtin-2d-gray-sprite",{}]],0,0,[0],[0],[3]],[[[2,"builtin-3d-particle",[{},"0",11,[{"defines":{"CC_USE_BILLBOARD":true,"CC_USE_STRETCHED_BILLBOARD":false,"CC_USE_HORIZONTAL_BILLBOARD":false,"CC_USE_VERTICAL_BILLBOARD":false,"CC_USE_MESH":false}},"props",11,[{},"mainTiling_Offset",8,[2,1,1,0,0],"tintColor",8,[4,2141562284],"mainTexture",6,0]]]]],0,0,[0,0],[1,0],[4,5]],[[[2,"builtin-3d-trail",[{},"0",11,[{},"props",11,[{},"mainTexture",6,0]]]]],0,0,[0,0],[1,0],[0,6]],[["0,9729,9729,33071,33071,1,0,0",-1],[0],0,[],[],[]],[[[0,"builtin-unlit",[{"hash":922858114,"record":null,"name":"builtin-unlit|unlit-vs|unlit-fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\n#if CC_USE_SKINNING\n in vec4 a_weights;\n in vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform SKINNING {\n vec2 jointsTextureSize;\n };\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform JOINT_MATRIX {\n mat4 jointMatrices[50];\n };\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nin vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nin vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nin vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nin vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nin vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nuniform MAIN_TILING {\n vec2 mainTiling;\n vec2 mainOffset;\n};\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n out mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n out lowp vec4 v_color;\n#endif\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n gl_Position = cc_matViewProj * cc_matWorld * In.position;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform UNLIT {\n lowp vec4 diffuseColor;\n};\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n in lowp vec4 v_color;\n#endif\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n in mediump vec2 v_uv0;\n#endif\nvoid main () {\n vec4 color = diffuseColor;\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n color.a *= diffuseTexture_tmp.a;\n #else\n color *= diffuseTexture_tmp;\n #endif\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n color *= v_color;\n #endif\n ALPHA_TEST(color);\n gl_FragColor = CCFragOutput(color);\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matWorld;\nuniform mat4 cc_matViewProj;\n#if CC_USE_SKINNING\n attribute vec4 a_weights;\n attribute vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform vec2 jointsTextureSize;\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture2D(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture2D(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture2D(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture2D(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture2D(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform mat4 jointMatrices[50];\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nattribute vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nattribute vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nattribute vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nattribute vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nattribute vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nuniform vec2 mainTiling;\nuniform vec2 mainOffset;\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n varying mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n gl_Position = cc_matViewProj * cc_matWorld * In.position;\n}","frag":"\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform lowp vec4 diffuseColor;\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n varying mediump vec2 v_uv0;\n#endif\nvoid main () {\n vec4 color = diffuseColor;\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture2D(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture2D(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n color.a *= diffuseTexture_tmp.a;\n #else\n color *= diffuseTexture_tmp;\n #endif\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n color *= v_color;\n #endif\n ALPHA_TEST(color);\n gl_FragColor = CCFragOutput(color);\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_USE_SKINNING","type":"boolean","defines":[]},{"name":"CC_USE_JOINTS_TEXTRUE","type":"boolean","defines":["CC_USE_SKINNING"]},{"name":"CC_JOINTS_TEXTURE_FLOAT32","type":"boolean","defines":["CC_USE_SKINNING","CC_USE_JOINTS_TEXTRUE"]},{"name":"CC_USE_ATTRIBUTE_UV0","type":"boolean","defines":[]},{"name":"CC_USE_ATTRIBUTE_COLOR","type":"boolean","defines":[]},{"name":"CC_USE_ATTRIBUTE_NORMAL","type":"boolean","defines":[]},{"name":"CC_USE_ATTRIBUTE_TANGENT","type":"boolean","defines":[]},{"name":"USE_DIFFUSE_TEXTURE","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_diffuseTexture","type":"boolean","defines":["CC_USE_ATTRIBUTE_UV0","USE_DIFFUSE_TEXTURE"]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":["CC_USE_ATTRIBUTE_UV0","USE_DIFFUSE_TEXTURE"]}],"blocks":[{"name":"SKINNING","binding":0,"members":[{"name":"jointsTextureSize","type":14,"count":1}],"defines":["CC_USE_SKINNING","CC_USE_JOINTS_TEXTRUE"]},{"name":"JOINT_MATRIX","binding":1,"members":[{"name":"jointMatrices","type":26,"count":50}],"defines":["CC_USE_SKINNING"]},{"name":"MAIN_TILING","binding":2,"members":[{"name":"mainTiling","type":14,"count":1},{"name":"mainOffset","type":14,"count":1}],"defines":[]},{"name":"ALPHA_TEST","binding":3,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]},{"name":"UNLIT","binding":4,"members":[{"name":"diffuseColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"jointsTexture","type":29,"count":1,"binding":30,"defines":["CC_USE_SKINNING","CC_USE_JOINTS_TEXTRUE"]},{"name":"diffuseTexture","type":29,"count":1,"binding":31,"defines":["USE_DIFFUSE_TEXTURE"]}]}],[{"name":"opaque","passes":[{"program":"builtin-unlit|unlit-vs|unlit-fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"depthStencilState":{"depthTest":true,"depthWrite":true},"properties":{"diffuseTexture":{"value":"white","type":29},"diffuseColor":{"type":16,"value":[1,1,1,1],"editor":{"type":"color"}},"alphaThreshold":{"type":13,"value":[0.5]},"mainTiling":{"type":14,"value":[1,1]},"mainOffset":{"type":14,"value":[0,0]}}}]},{"name":"transparent","passes":[{"stage":"transparent","program":"builtin-unlit|unlit-vs|unlit-fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"depthStencilState":{"depthTest":true,"depthWrite":true},"properties":{"diffuseTexture":{"value":"white","type":29},"diffuseColor":{"type":16,"value":[1,1,1,1],"editor":{"type":"color"}},"alphaThreshold":{"type":13,"value":[0.5]},"mainTiling":{"type":14,"value":[1,1]},"mainOffset":{"type":14,"value":[0,0]}}}]}]]],0,0,[],[],[]],[[[1,"builtin-2d-base",{}]],0,0,[0],[0],[1]],[[[1,"builtin-2d-spine",{}]],0,0,[0],[0],[7]],[[[0,"builtin-3d-particle",[{"hash":1682193167,"record":null,"name":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add","glsl3":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture(mainTexture, uv);\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = add(); }"},"glsl1":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture2D(mainTexture, uv);\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = add(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_USE_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_STRETCHED_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_HORIZONTAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_VERTICAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_MESH","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]},{"name":"FragConstants","binding":1,"members":[{"name":"tintColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":1933642753,"record":null,"name":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:multiply","glsl3":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = multiply(); }"},"glsl1":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture2D(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = multiply(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_USE_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_STRETCHED_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_HORIZONTAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_VERTICAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_MESH","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]},{"name":"FragConstants","binding":1,"members":[{"name":"tintColor","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":1851787849,"record":null,"name":"builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:addSmooth","glsl3":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = addSmooth(); }"},"glsl1":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture2D(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = addSmooth(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_USE_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_STRETCHED_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_HORIZONTAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_VERTICAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_MESH","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]},{"hash":145387972,"record":null,"name":"builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:premultiplied","glsl3":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = premultiplied(); }"},"glsl1":{"vert":"\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }","frag":"\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture2D(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = premultiplied(); }"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"CC_USE_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_STRETCHED_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_HORIZONTAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_VERTICAL_BILLBOARD","type":"boolean","defines":[]},{"name":"CC_USE_MESH","type":"boolean","defines":[]},{"name":"CC_USE_WORLD_SPACE","type":"boolean","defines":[]},{"name":"OUTPUT_TO_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"Constants","binding":0,"members":[{"name":"mainTiling_Offset","type":16,"count":1},{"name":"frameTile_velLenScale","type":16,"count":1},{"name":"scale","type":16,"count":1}],"defines":[]}],"samplers":[{"name":"mainTexture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"name":"opaque-add","passes":[{"stage":"opaque","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":1,"blendSrcAlpha":770,"blendDstAlpha":1}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"opaque-alpha-blend","passes":[{"stage":"opaque","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"opaque-add-multiply","passes":[{"stage":"opaque","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:multiply","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"opaque-add-smooth","passes":[{"stage":"opaque","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:addSmooth","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]}}}]},{"name":"opaque-premultiply-blend","passes":[{"stage":"opaque","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:premultiplied","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]}}}]},{"name":"transparent-add","passes":[{"stage":"transparent","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":1,"blendSrcAlpha":770,"blendDstAlpha":1}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"transparent-alpha-blend","passes":[{"stage":"transparent","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"transparent-add-multiply","passes":[{"stage":"transparent","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:multiply","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]},"tintColor":{"type":16,"value":[0.5,0.5,0.5,0.5],"inspector":{"type":"color"}}}}]},{"name":"transparent-add-smooth","passes":[{"stage":"transparent","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:addSmooth","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]}}}]},{"name":"transparent-premultiply-blend","passes":[{"stage":"transparent","program":"builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:premultiplied","rasterizerState":{"cullMode":0},"blendState":{"targets":[{"blend":true,"blendSrc":770,"blendDst":771,"blendSrcAlpha":770,"blendDstAlpha":771}]},"depthStencilState":{"depthTest":true,"depthWrite":false},"properties":{"mainTexture":{"value":"grey","type":29},"mainTiling_Offset":{"type":16,"value":[1,1,0,0]}}}]}]]],0,0,[],[],[]],[[[1,"builtin-2d-graphics",{"0":{"defines":{}}}]],0,0,[0],[0],[8]],[[[0,"builtin-clear-stencil",[{"hash":2075641479,"record":null,"name":"builtin-clear-stencil|vs|fs","glsl3":{"vert":"\nprecision highp float;\nin vec3 a_position;\nvoid main () {\n gl_Position = vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nvoid main () {\n gl_FragColor = vec4(1.0);\n}"},"glsl1":{"vert":"\nprecision highp float;\nattribute vec3 a_position;\nvoid main () {\n gl_Position = vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nvoid main () {\n gl_FragColor = vec4(1.0);\n}"},"builtins":{"globals":{"blocks":[],"samplers":[]},"locals":{"blocks":[],"samplers":[]}},"defines":[],"blocks":[],"samplers":[]}],[{"passes":[{"program":"builtin-clear-stencil|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0}}]}]]],0,0,[],[],[]],[[[1,"builtin-clear-stencil",{}]],0,0,[0],[0],[9]],[[[1,"builtin-2d-label",{"0":{"defines":{"USE_TEXTURE":true}}}]],0,0,[0],[0],[10]],[[[1,"builtin-2d-sprite",{"0":{"defines":{"USE_TEXTURE":true}}}]],0,0,[0],[0],[1]],[[[0,"builtin-2d-label",[{"hash":1105459032,"record":null,"name":"builtin-2d-label|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n#if USE_SDF\nuniform Outline {\n vec4 outlineColor;\n float outlineSize;\n};\n#endif\nvoid main () {\n#if USE_SDF\n #if USE_TEXTURE_ALPHAONLY\n float dist = texture(texture, v_uv0).a;\n #else\n float dist = texture(texture, v_uv0).r;\n #endif\n #if USE_SDF_EXTEND\n const float EDGE_VALUE = 0.45;\n #else\n const float EDGE_VALUE = 0.5;\n #endif\n #if CC_SUPPORT_standard_derivatives\n float smoothing = fwidth(dist);\n #else\n float smoothing = 0.05;\n #endif\n float outEdge = EDGE_VALUE - outlineSize;\n float bg = smoothstep(outEdge - smoothing, outEdge, dist);\n float fg = smoothstep(EDGE_VALUE - smoothing, EDGE_VALUE, dist);\n vec4 fgColor = outlineColor * (1.0 - fg) + v_color * fg;\n gl_FragColor = vec4(fgColor.rgb, fgColor.a * bg);\n#else\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if USE_TEXTURE_ALPHAONLY\n o.a *= texture(texture, v_uv0).a;\n #else\n o *= texture(texture, v_uv0);\n #endif\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n#endif\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}","frag":"\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n#if USE_SDF\nuniform vec4 outlineColor;\nuniform float outlineSize;\n#endif\nvoid main () {\n#if USE_SDF\n #if USE_TEXTURE_ALPHAONLY\n float dist = texture2D(texture, v_uv0).a;\n #else\n float dist = texture2D(texture, v_uv0).r;\n #endif\n #if USE_SDF_EXTEND\n const float EDGE_VALUE = 0.45;\n #else\n const float EDGE_VALUE = 0.5;\n #endif\n #if CC_SUPPORT_standard_derivatives\n float smoothing = fwidth(dist);\n #else\n float smoothing = 0.05;\n #endif\n float outEdge = EDGE_VALUE - outlineSize;\n float bg = smoothstep(outEdge - smoothing, outEdge, dist);\n float fg = smoothstep(EDGE_VALUE - smoothing, EDGE_VALUE, dist);\n vec4 fgColor = outlineColor * (1.0 - fg) + v_color * fg;\n gl_FragColor = vec4(fgColor.rgb, fgColor.a * bg);\n#else\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if USE_TEXTURE_ALPHAONLY\n o.a *= texture2D(texture, v_uv0).a;\n #else\n o *= texture2D(texture, v_uv0);\n #endif\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n#endif\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TEXTURE","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"CC_SUPPORT_standard_derivatives","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"USE_SDF","type":"boolean","defines":[]},{"name":"USE_TEXTURE_ALPHAONLY","type":"boolean","defines":["USE_SDF"]},{"name":"USE_SDF_EXTEND","type":"boolean","defines":["USE_SDF"]},{"name":"CC_USE_ALPHA_ATLAS_TEXTURE","type":"boolean","defines":["USE_TEXTURE"]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]},{"name":"Outline","binding":1,"members":[{"name":"outlineColor","type":16,"count":1},{"name":"outlineSize","type":13,"count":1}],"defines":["USE_SDF"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":["USE_TEXTURE"]}]}],[{"passes":[{"program":"builtin-2d-label|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]},"outlineSize":{"type":13,"value":[0]},"outlineColor":{"type":16,"value":[1,1,1,1]}}}]}]]],0,0,[],[],[]]]] \ No newline at end of file diff --git a/assets/internal/index.3c089.js b/assets/internal/index.69b9a.js similarity index 100% rename from assets/internal/index.3c089.js rename to assets/internal/index.69b9a.js diff --git a/assets/main/native/60/600301aa-3357-4a10-b086-84f011fa32ba.c3a3a.png b/assets/internal/native/60/600301aa-3357-4a10-b086-84f011fa32ba.c3a3a.png similarity index 100% rename from assets/main/native/60/600301aa-3357-4a10-b086-84f011fa32ba.c3a3a.png rename to assets/internal/native/60/600301aa-3357-4a10-b086-84f011fa32ba.c3a3a.png diff --git a/assets/main/config.038e3.json b/assets/main/config.038e3.json new file mode 100644 index 0000000..ce46a09 --- /dev/null +++ b/assets/main/config.038e3.json @@ -0,0 +1 @@ +{"paths":{},"types":[],"uuids":["08+ItpxuBAJLxwbNFP4FN8","110836bd5","13834b9cd","14EV6EC5FLQKNBf68ju0Lk","18vNJZKklLnLOiQttOjWyl","197f6f60f","19db12b98","1bd4a81d0","1e/qZbDwBHBqfmljK4ieYq","59npvrSsNLP6358vH5eo1A","5980ZmQsZKur0nDa4QmJ8x","60ewcUng1Px4Cf/Z++gTIB","68INk1h8FOFqcssrGKI7oJ","77bRX6kd5CKI3Bhr9+rLva","84HZH67WlK4IFctOtYV3od","a5POJ+yYxEkKwKHX9g6Svk","a5vugzmiRFcaeRtIfqQiMQ","b2aHrECZ5APKGS/0d2hvT1","c0NmQqOwRF3IO/eRfGVZcm","c2uYevjsBDa6SXRIsin9QB","c3jqOjn/pJbYpGVg4ye8Qy","d0DUTsaLFI6YjuMUjA138i","d0VKBcxZNEB7JNU8cWIFgS","d0qC05vt5GxLaYyB/w3t//","d9naGJA1JBDbViZmkWgqjV","dawHr/+FRDrZaz5CtGtENS","eaCVxnbQxAyLBxD2m6JnYo","edmHG92QBOeYLWZ8iFqrS6","f37xhO14BK27BpUsoLTbP7","f6B/EMISRNba+h8dlALV4s","f6NiDkH1ZLxY/KTdHkyxrs","f8MKtBrYNMgbGWqE/4Cz5s","02delMVqdBD70a/HSD99FK","02rqr/TSVL7pZqVOodCtzz","04sCXKHzJN46FuoXjxnI4a","05W7AonMRD0ZhGV7eNmBFs","089dyLZfdN4aZl95pJ0/0j","0bPMgx0W9M4YgsVwytK/Yl","0bp3UMsBhK5LKc1b8o86IL","12jhDypJxBWq0LS3lkFHoX","15gey8oc9Cqr+s4B1BKE0E","16aGFjmuFB1ry72aQnhRIV","1cveSaYgdL0q6YQzEeSy/+","1c9k/vUhpEF5QAfJkaUD3s","1d6Kjc6/1AcpYt089/03Hm","24FOXuv3pLn6A8U0oZc32Q","289VPq4OlM9KoTOBsOIGXs","30sWYJF9dMVYBV5ZHcSnXv","32JrNCo/pLJ4IE6gw/xtF3","33iXx2NNxKHZloGMMwH2PT","37IdAtij1BHqsDo+i6UmPs","3ae7efMv1CLq2ilvUY/tQi","3ath2hLFRBVLpn+Nkp0Hsr","3cM0N7r91KD6mFkfGR9U1F","3cR/6w9aVE64iEAsTbbxMK","3eokK7Q69KGowfk7+CzAmN","3fVcogOMtCnawsDSlmYf6Q","40f9fLVthBHJ/g9Lnw+0ts","43APlBugNNGb2xlZ70DxhS","45ixMaNUhGqriFLcY4+Mst","461VvWPgBGMqUZ25dyYKuw","47LfXTNedBhJ5sf0G+5l7j","48NztQmi1Hbqh0fLwrAtqi","4baqINv+FON5WXR54mf90k","54tkQqqoRAE6Ghu4QwDAgd","56xNcuUgtC8aeihyXXLaXv","57nfWaBehJXpJ2P8MAPtKX","5chAz64mVDgLYUIRoZ4Di4","60AwGqM1dKELCGhPAR+jK6","62DA7JDzFCa4aDy3ddmDZm","66mB58E3ZDppWuqgsm1t8b","68HX4D2QZCdKg4A/HoxLQA","69cJ6mf9FBF5JXXF8TUGeu","6cN0HN3SxIoK66zUSfobRw","70mwglqDxEeZOPKM9YgMqR","709X0VX1JHvrObbYSChXvX","72nHxR9INFCp945JoKMSHZ","72+DrtTKNIyKTARiOpVKWY","73rBJ/iAREpp1bKWDb3A7K","77JRXmFrhMcYE7I9WxJDsY","77gL8blpVJuLccLFWaeDA9","77lcwqDrNA2aza2wm5aXX4","78WwcvlnhJk6mYpDkR8RUK","7a/QZLET9IDreTiBfRn2PD","7bRh+DjwNCxLBXb84nHye4","7fIeYSqoJCLZ6mdzQGEmFB","81H1h6QppKRbBkNGkSJStK","82wZgZiCJK9KYjnWcBmzDP","865wWpgR5J74ceuJ+4C9HV","89arjCzMBEBLNY0c1Rlt1Y","89eFFFqiRIDJMHSsmnLed0","8a6686cUVG5oX7684vmw40","8eZVlKJ7hFUJ6Mx8PA3+kC","8fRKJclkpEer+e4Dc3Me/j","95+I4EhJdLUrpbIGGvLoRQ","9bbNwRBChPQZphy7qb8Z5f","9eim3FsO9LDrljceAAKr11","a0DJbYS1xJ9r+DfLi/sRN9","a1U5RdJRFMFL57BdJC9H1X","a2MjXRFdtLlYQ5ouAFv/+R","a4rd+eFCVLLaw9aUJU5BQl","a7OfeHzAFKgboKWB8H7Myh","a9l1kB0ixF74BjWICG3COP","a9ndjleDpKgLxDbhKl5Kyh","a9utVHvnRDlL+i2aq6w6k2","aaiHzvYRFOtpBgx6k/469l","adnYKjllpGcZmcLKnyXMIj","af0jhUgVFNqLhFhJLQpmAr","b2s4Fxh15JS6JLJvG+AEBx","b7E+vivl5O67m+pLdIT/Nl","b78N+ZtwZGnJnnHGTAhhEb","b9u+Zq6pFDQ7vZfNIdSnkl","baZrCM5EJB5Kxs8Q/MoRJM","be3JQP4eNLj65fS6lIAh+M","bfWjaA+o9OYo/iVnRa9XrO","c1r27+DstLNbrdX3qX3Hho","c13eP11StKPZVYw/WuxBbh","c3FVxFtwhIrbINpNIj0PMW","c33Z9t2ohEOaUJTIZC0NK5","c5AIbjn/hDlI0L+1R8rjC7","d3ClhbhMZCCZo7u3vxRsWo","d5w4PYsEBFxJ7OFPALnekU","d5+qnWVmBPZLwh8MzHPhLz","d70EC+Nj9CLrdekjX7bkqU","d8nxcs8ZtGh5+6FfhlB5Hx","dbJ1/FG/9Gp6KNh8msVkan","deBs+390NPZqAw/2jKfeTS","debHarSSpKnLl4RQPijPRu","debzmRv1VDDb7GOfQzo97p","dexYn7zgZNwojySgr8UOrD","de9Zfqf7FBfqWQiB+pb/bX","df0kwGW+9HBLV/NRjVj+P3","e0BAHF6idNu5K2a+Fqx8d7","e0Qg4UUOtPRbJup3M32ERG","e2sIJbfJRLnIjGRrVzyo0U","e66izAIq5MoYeaw6UEE7m9","e90ku2kIROeYW9z9dGZZfD","eaySrZ+G9OHpkIwUHb4PPy","ebnOSGnn5NF6CXCC4bIU4y","ecpdLyjvZBwrvm+cedCcQy","f21vmLVBFLzbab6Y8I3iTj","f4ipEZostIl75FqCL79pAd","f5ZZG+vUpKbK7akuNt2Dtv","fe1vXPhnhFWbYSz20Lw5vv","ffTFAoOoFMlKBguuhCOUdO","ff274HzxJOfq7zm3GBkd8P"],"scenes":{"db://assets/Scenes/game.fire":22},"redirect":[32,0,51,0,68,0,83,0,98,0,139,0],"deps":["internal"],"packs":{"087adbee5":[33,34,35,36,37,38,39,40,41,4,42,43,44,45,46,47,48,49,50,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,9,67,11,69,70,71,12,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,104,105,106,107,17,108,109,110,111,112,113,114,115,116,19,117,118,119,22,120,121,122,123,124,24,125,126,127,128,129,130,131,132,133,135,136,137,138,27,140,141,142,30,143,144,145],"0ac8b346f":[0,1,2,3,5,6,7,8,10,13,14,15,16,18,20,21,23,25,26,28,29,31]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["087adbee5","cb20e","0ac8b346f","57d7f"],"native":[0,"a07ab",1,"10fd8",2,"ef190",3,"22d64",4,"4e429",5,"e510b",6,"a422f",7,"51110",8,"e5537",9,"d1456",10,"66811",11,"55b51",12,"05e78",13,"e7c5e",14,"f2c28",15,"951b0",16,"a75e0",17,"2bf0b",18,"651a5",19,"a4965",20,"b0b10",21,"8c758",23,"841f5",24,"702bb",25,"f23d7",26,"e79ff",27,"8782e",28,"cdee7",29,"f922c",30,"5ce9e",31,"0b17b"]}} \ No newline at end of file diff --git a/assets/main/config.b205e.json b/assets/main/config.b205e.json deleted file mode 100644 index 59ef6b6..0000000 --- a/assets/main/config.b205e.json +++ /dev/null @@ -1 +0,0 @@ -{"paths":{},"types":[],"uuids":["08+ItpxuBAJLxwbNFP4FN8","110836bd5","13834b9cd","14EV6EC5FLQKNBf68ju0Lk","18vNJZKklLnLOiQttOjWyl","197f6f60f","19db12b98","1bd4a81d0","1e/qZbDwBHBqfmljK4ieYq","5980ZmQsZKur0nDa4QmJ8x","60AwGqM1dKELCGhPAR+jK6","60ewcUng1Px4Cf/Z++gTIB","68INk1h8FOFqcssrGKI7oJ","71VhFCTINJM6/Ky3oX9nBT","77bRX6kd5CKI3Bhr9+rLva","84HZH67WlK4IFctOtYV3od","a5POJ+yYxEkKwKHX9g6Svk","a5vugzmiRFcaeRtIfqQiMQ","b2aHrECZ5APKGS/0d2hvT1","b4P/PCArtIdIH38t6mlw8Y","c0NmQqOwRF3IO/eRfGVZcm","c2uYevjsBDa6SXRIsin9QB","c3jqOjn/pJbYpGVg4ye8Qy","d0DUTsaLFI6YjuMUjA138i","d0VKBcxZNEB7JNU8cWIFgS","d0qC05vt5GxLaYyB/w3t//","d9naGJA1JBDbViZmkWgqjV","dawHr/+FRDrZaz5CtGtENS","e8Ueib+qJEhL6mXAHdnwbi","eaCVxnbQxAyLBxD2m6JnYo","edmHG92QBOeYLWZ8iFqrS6","f37xhO14BK27BpUsoLTbP7","f6B/EMISRNba+h8dlALV4s","f6NiDkH1ZLxY/KTdHkyxrs","f8MKtBrYNMgbGWqE/4Cz5s","02delMVqdBD70a/HSD99FK","02rqr/TSVL7pZqVOodCtzz","04sCXKHzJN46FuoXjxnI4a","05W7AonMRD0ZhGV7eNmBFs","089dyLZfdN4aZl95pJ0/0j","0bPMgx0W9M4YgsVwytK/Yl","0bp3UMsBhK5LKc1b8o86IL","12jhDypJxBWq0LS3lkFHoX","15gey8oc9Cqr+s4B1BKE0E","16aGFjmuFB1ry72aQnhRIV","1cveSaYgdL0q6YQzEeSy/+","1c9k/vUhpEF5QAfJkaUD3s","1d6Kjc6/1AcpYt089/03Hm","24FOXuv3pLn6A8U0oZc32Q","289VPq4OlM9KoTOBsOIGXs","29FYIk+N1GYaeWH/q1NxQO","30sWYJF9dMVYBV5ZHcSnXv","32JrNCo/pLJ4IE6gw/xtF3","33iXx2NNxKHZloGMMwH2PT","37IdAtij1BHqsDo+i6UmPs","3ae7efMv1CLq2ilvUY/tQi","3ath2hLFRBVLpn+Nkp0Hsr","3cM0N7r91KD6mFkfGR9U1F","3cR/6w9aVE64iEAsTbbxMK","3eokK7Q69KGowfk7+CzAmN","3fVcogOMtCnawsDSlmYf6Q","40f9fLVthBHJ/g9Lnw+0ts","43APlBugNNGb2xlZ70DxhS","45ixMaNUhGqriFLcY4+Mst","461VvWPgBGMqUZ25dyYKuw","47LfXTNedBhJ5sf0G+5l7j","48NztQmi1Hbqh0fLwrAtqi","4baqINv+FON5WXR54mf90k","54tkQqqoRAE6Ghu4QwDAgd","56xNcuUgtC8aeihyXXLaXv","57nfWaBehJXpJ2P8MAPtKX","5chAz64mVDgLYUIRoZ4Di4","62DA7JDzFCa4aDy3ddmDZm","66mB58E3ZDppWuqgsm1t8b","68HX4D2QZCdKg4A/HoxLQA","69cJ6mf9FBF5JXXF8TUGeu","6cN0HN3SxIoK66zUSfobRw","70mwglqDxEeZOPKM9YgMqR","709X0VX1JHvrObbYSChXvX","72nHxR9INFCp945JoKMSHZ","72+DrtTKNIyKTARiOpVKWY","73rBJ/iAREpp1bKWDb3A7K","77JRXmFrhMcYE7I9WxJDsY","77gL8blpVJuLccLFWaeDA9","77lcwqDrNA2aza2wm5aXX4","78WwcvlnhJk6mYpDkR8RUK","7a/QZLET9IDreTiBfRn2PD","7bRh+DjwNCxLBXb84nHye4","7fIeYSqoJCLZ6mdzQGEmFB","81H1h6QppKRbBkNGkSJStK","82wZgZiCJK9KYjnWcBmzDP","865wWpgR5J74ceuJ+4C9HV","89arjCzMBEBLNY0c1Rlt1Y","89eFFFqiRIDJMHSsmnLed0","8a6686cUVG5oX7684vmw40","8eZVlKJ7hFUJ6Mx8PA3+kC","8fRKJclkpEer+e4Dc3Me/j","95+I4EhJdLUrpbIGGvLoRQ","9bbNwRBChPQZphy7qb8Z5f","9eim3FsO9LDrljceAAKr11","a0DJbYS1xJ9r+DfLi/sRN9","a2MjXRFdtLlYQ5ouAFv/+R","a4rd+eFCVLLaw9aUJU5BQl","a7OfeHzAFKgboKWB8H7Myh","a9l1kB0ixF74BjWICG3COP","a9ndjleDpKgLxDbhKl5Kyh","a9utVHvnRDlL+i2aq6w6k2","aaiHzvYRFOtpBgx6k/469l","adnYKjllpGcZmcLKnyXMIj","af0jhUgVFNqLhFhJLQpmAr","b2s4Fxh15JS6JLJvG+AEBx","b7E+vivl5O67m+pLdIT/Nl","b78N+ZtwZGnJnnHGTAhhEb","b9u+Zq6pFDQ7vZfNIdSnkl","baZrCM5EJB5Kxs8Q/MoRJM","be3JQP4eNLj65fS6lIAh+M","bfWjaA+o9OYo/iVnRa9XrO","c1r27+DstLNbrdX3qX3Hho","c13eP11StKPZVYw/WuxBbh","c3FVxFtwhIrbINpNIj0PMW","c33Z9t2ohEOaUJTIZC0NK5","c5AIbjn/hDlI0L+1R8rjC7","d3ClhbhMZCCZo7u3vxRsWo","d5w4PYsEBFxJ7OFPALnekU","d5+qnWVmBPZLwh8MzHPhLz","d70EC+Nj9CLrdekjX7bkqU","d8nxcs8ZtGh5+6FfhlB5Hx","dbJ1/FG/9Gp6KNh8msVkan","deBs+390NPZqAw/2jKfeTS","debHarSSpKnLl4RQPijPRu","debzmRv1VDDb7GOfQzo97p","dexYn7zgZNwojySgr8UOrD","de9Zfqf7FBfqWQiB+pb/bX","df0kwGW+9HBLV/NRjVj+P3","e0BAHF6idNu5K2a+Fqx8d7","e0Qg4UUOtPRbJup3M32ERG","e66izAIq5MoYeaw6UEE7m9","e90ku2kIROeYW9z9dGZZfD","e97GVMl6JHh5Ml5qEDdSGa","eaySrZ+G9OHpkIwUHb4PPy","ebnOSGnn5NF6CXCC4bIU4y","ecpdLyjvZBwrvm+cedCcQy","f0BIwQ8D5Ml7nTNQbh1YlS","f21vmLVBFLzbab6Y8I3iTj","f4ipEZostIl75FqCL79pAd","f5ZZG+vUpKbK7akuNt2Dtv","fe1vXPhnhFWbYSz20Lw5vv","ffTFAoOoFMlKBguuhCOUdO","ff274HzxJOfq7zm3GBkd8P"],"scenes":{"db://assets/Scenes/game.fire":24},"redirect":[35,0,55,0,86,0,141,0],"deps":["internal"],"packs":{"071b97a1d":[36,37,38,39,40,41,42,43,44,4,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,11,72,73,74,12,75,76,77,78,79,80,81,82,83,84,85,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,18,110,111,112,113,114,115,116,117,118,21,119,120,121,24,122,123,124,125,126,26,127,128,129,130,131,132,133,134,135,136,137,138,139,140,30,142,143,144,145,33,146,147,148],"0acdfccb6":[0,1,2,3,5,6,7,8,9,10,13,14,15,16,17,19,20,22,23,25,27,28,29,31,32,34]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["071b97a1d","24a16","0acdfccb6","c6724"],"native":[0,"a07ab",1,"10fd8",2,"ef190",3,"22d64",4,"4e429",5,"e510b",6,"a422f",7,"51110",8,"e5537",9,"66811",10,"c3a3a",11,"55b51",12,"05e78",13,"c06a9",14,"e7c5e",15,"f2c28",16,"951b0",17,"a75e0",18,"2bf0b",19,"83fcc",20,"651a5",21,"a4965",22,"b0b10",23,"8c758",25,"841f5",26,"702bb",27,"f23d7",28,"90cf4",29,"e79ff",30,"8782e",31,"cdee7",32,"f922c",33,"5ce9e",34,"0b17b"]}} \ No newline at end of file diff --git a/assets/main/import/07/071b97a1d.24a16.json b/assets/main/import/07/071b97a1d.24a16.json deleted file mode 100644 index 6d80bc4..0000000 --- a/assets/main/import/07/071b97a1d.24a16.json +++ /dev/null @@ -1 +0,0 @@ -[1,["ecpdLyjvZBwrvm+cedCcQy","13834b9cd","d9naGJA1JBDbViZmkWgqjV","1bd4a81d0","7a/QZLET9IDreTiBfRn2PD","19db12b98","7fIeYSqoJCLZ6mdzQGEmFB","3fVcogOMtCnawsDSlmYf6Q","8a6686cUVG5oX7684vmw40","a2MjXRFdtLlYQ5ouAFv/+R","d70EC+Nj9CLrdekjX7bkqU","110836bd5","197f6f60f","a7OfeHzAFKgboKWB8H7Myh","3ath2hLFRBVLpn+Nkp0Hsr","30sWYJF9dMVYBV5ZHcSnXv","6cN0HN3SxIoK66zUSfobRw","9eim3FsO9LDrljceAAKr11","3ae7efMv1CLq2ilvUY/tQi","865wWpgR5J74ceuJ+4C9HV","f0BIwQ8D5Ml7nTNQbh1YlS","43APlBugNNGb2xlZ70DxhS","7bRh+DjwNCxLBXb84nHye4","b78N+ZtwZGnJnnHGTAhhEb","78WwcvlnhJk6mYpDkR8RUK","ebnOSGnn5NF6CXCC4bIU4y","bfWjaA+o9OYo/iVnRa9XrO","f4ipEZostIl75FqCL79pAd","d5w4PYsEBFxJ7OFPALnekU","b2aHrECZ5APKGS/0d2hvT1","57nfWaBehJXpJ2P8MAPtKX","e0BAHF6idNu5K2a+Fqx8d7","05W7AonMRD0ZhGV7eNmBFs","3eokK7Q69KGowfk7+CzAmN","d3ClhbhMZCCZo7u3vxRsWo","77lcwqDrNA2aza2wm5aXX4","48NztQmi1Hbqh0fLwrAtqi","d5+qnWVmBPZLwh8MzHPhLz","a4rd+eFCVLLaw9aUJU5BQl","32JrNCo/pLJ4IE6gw/xtF3","dexYn7zgZNwojySgr8UOrD","baZrCM5EJB5Kxs8Q/MoRJM","16aGFjmuFB1ry72aQnhRIV","3cM0N7r91KD6mFkfGR9U1F","b2s4Fxh15JS6JLJvG+AEBx","37IdAtij1BHqsDo+i6UmPs","1cveSaYgdL0q6YQzEeSy/+","de9Zfqf7FBfqWQiB+pb/bX","709X0VX1JHvrObbYSChXvX","77JRXmFrhMcYE7I9WxJDsY","84HZH67WlK4IFctOtYV3od","a5vugzmiRFcaeRtIfqQiMQ","08+ItpxuBAJLxwbNFP4FN8","e97GVMl6JHh5Ml5qEDdSGa","29FYIk+N1GYaeWH/q1NxQO","f5ZZG+vUpKbK7akuNt2Dtv","77bRX6kd5CKI3Bhr9+rLva","71VhFCTINJM6/Ky3oX9nBT","1e/qZbDwBHBqfmljK4ieYq","c0NmQqOwRF3IO/eRfGVZcm","a5POJ+yYxEkKwKHX9g6Svk","60AwGqM1dKELCGhPAR+jK6","d0qC05vt5GxLaYyB/w3t//","d0DUTsaLFI6YjuMUjA138i","89arjCzMBEBLNY0c1Rlt1Y","c3FVxFtwhIrbINpNIj0PMW","0bp3UMsBhK5LKc1b8o86IL","54tkQqqoRAE6Ghu4QwDAgd","5980ZmQsZKur0nDa4QmJ8x","69cJ6mf9FBF5JXXF8TUGeu","f6B/EMISRNba+h8dlALV4s","18vNJZKklLnLOiQttOjWyl","c2uYevjsBDa6SXRIsin9QB","edmHG92QBOeYLWZ8iFqrS6","f6NiDkH1ZLxY/KTdHkyxrs","68INk1h8FOFqcssrGKI7oJ","60ewcUng1Px4Cf/Z++gTIB","e66izAIq5MoYeaw6UEE7m9","02delMVqdBD70a/HSD99FK","62DA7JDzFCa4aDy3ddmDZm","a0DJbYS1xJ9r+DfLi/sRN9","45ixMaNUhGqriFLcY4+Mst","c1r27+DstLNbrdX3qX3Hho","a9utVHvnRDlL+i2aq6w6k2","adnYKjllpGcZmcLKnyXMIj","81H1h6QppKRbBkNGkSJStK","72nHxR9INFCp945JoKMSHZ","c3jqOjn/pJbYpGVg4ye8Qy","66mB58E3ZDppWuqgsm1t8b","02rqr/TSVL7pZqVOodCtzz","89eFFFqiRIDJMHSsmnLed0","deBs+390NPZqAw/2jKfeTS","be3JQP4eNLj65fS6lIAh+M","ffTFAoOoFMlKBguuhCOUdO","68HX4D2QZCdKg4A/HoxLQA","089dyLZfdN4aZl95pJ0/0j","aaiHzvYRFOtpBgx6k/469l","5chAz64mVDgLYUIRoZ4Di4","fe1vXPhnhFWbYSz20Lw5vv","04sCXKHzJN46FuoXjxnI4a","9bbNwRBChPQZphy7qb8Z5f","461VvWPgBGMqUZ25dyYKuw","dbJ1/FG/9Gp6KNh8msVkan","0bPMgx0W9M4YgsVwytK/Yl","1c9k/vUhpEF5QAfJkaUD3s","8eZVlKJ7hFUJ6Mx8PA3+kC","15gey8oc9Cqr+s4B1BKE0E","f21vmLVBFLzbab6Y8I3iTj","82wZgZiCJK9KYjnWcBmzDP","df0kwGW+9HBLV/NRjVj+P3","d8nxcs8ZtGh5+6FfhlB5Hx","12jhDypJxBWq0LS3lkFHoX","4baqINv+FON5WXR54mf90k","47LfXTNedBhJ5sf0G+5l7j","24FOXuv3pLn6A8U0oZc32Q","a9ndjleDpKgLxDbhKl5Kyh","ff274HzxJOfq7zm3GBkd8P","72+DrtTKNIyKTARiOpVKWY","73rBJ/iAREpp1bKWDb3A7K","289VPq4OlM9KoTOBsOIGXs","70mwglqDxEeZOPKM9YgMqR","debHarSSpKnLl4RQPijPRu","3cR/6w9aVE64iEAsTbbxMK","56xNcuUgtC8aeihyXXLaXv","33iXx2NNxKHZloGMMwH2PT","e0Qg4UUOtPRbJup3M32ERG","debzmRv1VDDb7GOfQzo97p","c5AIbjn/hDlI0L+1R8rjC7","8fRKJclkpEer+e4Dc3Me/j","77gL8blpVJuLccLFWaeDA9","eaySrZ+G9OHpkIwUHb4PPy","b7E+vivl5O67m+pLdIT/Nl","e90ku2kIROeYW9z9dGZZfD","c13eP11StKPZVYw/WuxBbh","40f9fLVthBHJ/g9Lnw+0ts","14EV6EC5FLQKNBf68ju0Lk","f37xhO14BK27BpUsoLTbP7","eaCVxnbQxAyLBxD2m6JnYo","b4P/PCArtIdIH38t6mlw8Y","95+I4EhJdLUrpbIGGvLoRQ","a9l1kB0ixF74BjWICG3COP","af0jhUgVFNqLhFhJLQpmAr","b9u+Zq6pFDQ7vZfNIdSnkl","c33Z9t2ohEOaUJTIZC0NK5","1d6Kjc6/1AcpYt089/03Hm","e8Ueib+qJEhL6mXAHdnwbi","f8MKtBrYNMgbGWqE/4Cz5s","dawHr/+FRDrZaz5CtGtENS"],["node","_spriteFrame","_textureSetter","_N$file","root","_parent","data","_N$skeletonData","EN","VI","target","_normalMaterial","_grayMaterial","connectedBody","_N$target","player","_file","qrCode","model","revoJoint","hookPos","scoreUI","gameOverPanel","remainLiveUI","holder","_N$normalSprite","_N$pressedSprite","_N$hoverSprite","_N$disabledSprite","lblScorePlus","diamondParticle","diamondSprite","PlayGround","popupLabel","bannerLabel","diamondContainer","bg","lblScore","cuboidContainer","_effectAsset","BGM","SFX_BUTTON","SFX_SELECT","SFX_ENDSCREEN","SFX_EXPLODE","SFX_CRYSTAL","msg","lblRoomCode","btnNext","normalSpine","graySpine","lblTimer","tutorialPopup","container","playGround","normalSprite","graySprite","spriteFrame","endGameSingle","endGameMulti","btnBack","btnPlay","Container","startButton","scene","ShownPopups","PopupContainer","PopupBackground"],["cc.SpriteFrame",["cc.Node",["_name","_groupIndex","_active","_opacity","_objFlags","_id","_prefab","_components","_parent","_contentSize","_trs","_children","_color","_eulerAngles","_anchorPoint"],-3,4,9,1,5,7,2,5,5,5],["cc.Label",["_string","_N$horizontalAlign","_N$verticalAlign","_isSystemFontUsed","_fontSize","_lineHeight","_N$cacheMode","_N$overflow","_enableWrapText","_materials","node","_N$file"],-6,3,1,6],["cc.Node",["_name","_groupIndex","_active","_parent","_prefab","_components","_contentSize","_color","_trs","_children"],0,1,4,2,5,5,7,9],["cc.Sprite",["_sizeMode","_type","_dstBlendFactor","node","_materials","_spriteFrame"],0,1,3,6],["cc.RigidBody",["_linearDamping","_angularDamping","_fixedRotation","enabledContactListener","_type","_gravityScale","awakeOnLoad","node","_linearVelocity"],-4,1,5],["cc.Widget",["_alignFlags","_originalWidth","_originalHeight","alignMode","_right","_bottom","node"],-3,1],["cc.BoxCollider",["tag","node","_size","_offset"],2,1,5,5],["cc.Node",["_name","_groupIndex","_components","_prefab","_children","_contentSize","_trs","_anchorPoint","_parent"],1,12,4,2,5,7,5,1],["cc.PrefabInfo",["fileId","root","asset"],2,1,1],["cc.PhysicsBoxCollider",["_density","_friction","_enabled","node","_size"],0,1,5],["cc.Button",["_N$transition","_N$enableAutoGrayEffect","node","_N$target","clickEvents","_N$normalColor","_N$pressedColor","_N$disabledColor","_N$normalSprite","_N$pressedSprite","_N$hoverSprite","_N$disabledSprite"],1,1,1,9,5,5,5,6,6,6,6],["cc.ParticleSystem",["_dstBlendFactor","_custom","totalParticles","duration","emissionRate","life","angle","angleVar","startSize","startSizeVar","_positionType","speed","tangentialAccel","_srcBlendFactor","autoRemoveOnFinish","lifeVar","endSize","endSizeVar","startSpinVar","endSpinVar","speedVar","tangentialAccelVar","radialAccel","radialAccelVar","playOnLoad","node","_materials","_startColor","_startColorVar","_endColor","_endColorVar","posVar","_spriteFrame","gravity","_file"],-22,1,3,8,8,8,8,5,6,5,6],["cc.Node",["_name","_children","_components","_prefab","_parent","_trs","_contentSize"],2,2,2,4,1,7,5],["cc.RevoluteJoint",["_maxMotorTorque","_motorSpeed","_enableMotor","node","anchor","connectedAnchor","connectedBody"],0,1,5,5,1],["cc.Mask",["_N$alphaThreshold","_N$inverted","node","_materials"],1,1,3],["sp.Skeleton",["defaultSkin","defaultAnimation","_preCacheMode","premultipliedAlpha","_animationName","timeScale","node","_materials","_N$skeletonData"],-3,1,3,6],["1c65drFRtpG/LO3xlybZ0cn",["type","actionPhase","node","actionHandler"],1,1,9],["cc.AudioClip",["_name","_native","duration"],0],["cc.Prefab",["_name"],2],["cc.Node",["_name","_parent","_children","_components","_prefab"],2,1,12,9,4],["0c894rNk45KaZ1YxbpCwkvS",["node"],3,1],["6e424L9UZtOCaum8SdoVNRD",["node","model"],3,1,1],["740b5rh1lhIbL/VLg/LtKPM",["swingSpeed","maxAngle","minAngle","node","revoJoint"],0,1,1],["3e382lGARlLAZFWeDSIozNl",["movePlacePatten","node","hookPos"],2,1,1],["9d62aOu/DVIAK79rPb4ptJO",["node","remainLiveUI","gameOverPanel","scoreUI"],3,1,1,1,1],["0ae18+eAF1EAoKkp5bUoRQp",["node"],3,1],["8dd1ej7a4pMcpsg0S4Tgp0f",["numberOfBlockBeginToShake","movingDistance","moveSpeed","node","rope"],0,1,1],["a95476TMPFMHrWiHmzDEOpB",["duration","node"],2,1],["6b13bIv6Y1C451Kh0ywajbh",["node"],3,1],["10a64+EnhJATawTbpcBHmDl",["node","holder"],3,1,1],["255d8KVHjlEaqBdheu+/5ax",["node"],3,1],["cc.ClickEvent",["_componentId","handler","target"],1,1],["10b11yG5uFMT5EjyGe18FoO",["node"],3,1],["89c93v4xZVGqJ6zzZ9Q+iJt",["node","live"],3,1,1],["d4063JhugNFvod0zqfttD0j",["node","scoreText"],3,1,1],["sp.SkeletonData",["_name","_atlasText","textureNames","_skeletonJson","textures"],-1,3],["d20a0HD4J5Lx6vX5OXcGy4+",["node"],3,1],["1bcb2GEmxRB1458fn5Fjmnu",["node","player"],3,1,1],["cc.CircleCollider",["tag","_radius","node"],1,1],["085b587D41NjKlGgaQmpnmJ",["node","player","diamondSprite","diamondParticle","lblScorePlus"],3,1,1,1,1,1],["9a52dKv1yRLFb9DOGF+w6r+",["node","PlayGround"],3,1,1],["7c0988P9KdKaoNjh5pLuFPn",["node","cuboid","diamond","cuboidBase","playerBall","dragonSP","endGamePopup"],3,1,1,1,1,1,3,1],["055aeKjXC5P5JH+PuFhm8cO",["node","PlayGround"],3,1,1],["a17f9LZSlxJWIxURW1Pdn8u",["node","PlayGround"],3,1,1],["cc.EffectAsset",["_name","shaders","techniques"],0],["cc.Material",["_name","_techniqueData"],1],["f9ace5O2YJCy7edETP5LCWv",["node"],3,1],["2fbc04KsHtO9rOLJqTjEbZu",["node","BGM","SFX_BUTTON","SFX_SELECT","SFX_ENDSCREEN","SFX_EXPLODE","SFX_CRYSTAL"],3,1,6,6,6,6,6,6],["824b3x307FID6iZwnCxazfr",["node","qrCode"],3,1,1],["PeerHandler",["actionName","eventHandler"],2,9],["9bb946QoZVOMKPUS/9hPO3J",["node"],3,1],["8ba3d+Bn6NI76jJhS1uJSSp",["node","EN","VI"],3,1,6,6],["8d77cuBjJ1BGq6/i3kFeUx7",["size","node","qrCode","loadingCover"],2,1,1,1],["cd1c1/ESEpLhb7U8uTj4hYv",["node","qrCode","btnNext","lblRoomCode","players","msg","normalSpine","graySpine"],3,1,1,1,1,2,1,6,6],["8531fDf7L1KwZdv2KsCCznt",["node","container","playerAvatar","playerRankSpriteFrames","tutorialPopup","lblTimer","bgSpriteFrames","roadSpriteFrames","objectsSpriteFrame1","objectsSpriteFrame2","objectsSpriteFrame3","playGround","normalSprite","graySprite"],3,1,1,2,3,1,1,3,3,3,3,3,6,6,6],["cc.Layout",["_resize","_N$layoutType","_N$paddingLeft","node","_layoutSize"],0,1,5],["d9adbSs7VdIeaPiYGmWgXvR",["EN","VI","node"],1,1],["cc.ParticleAsset",["_name","_native"],1],["8e195aDavdHDKGbdlAqNUxo",["node"],3,1],["d0df7MrCDxIOqiQAqLISxA9",["node","btnPlay","btnBack","playerRankBases","endGameMulti","endGameSingle"],3,1,1,1,2,1,1],["5efa34rLMBL6Z7zYO5/5lDg",["node","Container"],3,1,1],["0e252LdYfhIyIZLhk6PCy9f",["node","startButton"],3,1,1],["bd45doTXaVJGazSbf1+Ekni",["node"],3,1],["cc.SceneAsset",["_name","asyncLoadAssets"],1],["cc.Canvas",["node","_designResolution"],3,1,5],["1b8496GkHdFirfeeZ/dlzhB",["node","SystemPrefabs","PlaceHolderPrefabs"],3,1,3,3],["cc.Scene",["_name","_active","autoReleaseAssets","_children","_anchorPoint","_trs"],0,2,5,7],["cc.Camera",["_clearFlags","_depth","node"],1,1],["cc.TTFFont",["_name","_native"],1],["2af42k1WypJMIZ/nsc3uFll",["node"],3,1],["ea18dqOuq1Cx7O+U51FB9JD",["node"],3,1],["30835F+tMxLu4+MZ1zfvBzu",["node","PopupBackground","PopupContainer","ShownPopups"],3,1,1,1,1],["fd6a8RrsDtCgJjnXG0oVHlf",["node","StagePrefabs"],3,1,3]],[[9,0,1,2],[1,0,8,7,6,9,10,2],[4,0,3,4,5,2],[4,3,4,5,1],[1,0,8,11,7,6,9,10,2],[19,0,2],[52,0,1,2,1],[16,0,1,2,3,4,6,7,8,6],[7,0,1,3,2,2],[1,0,1,8,11,7,6,9,10,13,3],[1,0,1,8,7,6,10,13,3],[1,0,8,7,6,9,2],[6,0,6,2],[9,1,1],[18,0,1,2,4],[1,0,11,7,6,9,2],[1,0,8,6,2],[1,0,7,6,2],[32,0,1,2,3],[2,0,4,5,3,1,2,10,9,11,7],[1,0,8,6,10,2],[1,0,8,7,6,9,14,10,2],[1,0,8,11,7,6,12,9,10,2],[50,0,1,2],[57,0,1,2,3],[1,0,8,11,6,2],[1,0,1,8,7,6,10,3],[13,0,4,1,2,3,5,2],[4,1,0,3,4,5,3],[7,1,2,1],[1,0,2,8,11,6,10,3],[1,0,11,7,6,9,10,2],[1,0,8,11,7,6,9,2],[1,0,3,8,7,6,12,9,3],[1,0,11,7,6,9,14,10,2],[8,0,8,2,3,5,6,2],[3,0,3,5,4,6,2],[9,0,1,2,2],[11,1,2,2],[2,0,10,9,2],[2,0,4,5,3,1,2,6,10,9,8],[2,0,4,5,3,1,2,6,10,9,11,8],[36,0,1,2,3,4,5],[17,0,2,3,2],[51,0,1],[1,0,8,11,7,6,10,2],[1,0,8,7,6,12,9,10,2],[1,0,1,8,7,6,9,10,13,3],[1,0,8,11,6,9,10,2],[1,0,8,11,7,6,9,14,10,2],[1,0,8,7,6,12,9,2],[1,0,7,6,9,10,2],[3,0,3,9,4,2],[3,0,3,5,4,6,8,2],[3,0,3,5,4,7,6,8,2],[7,0,1,2,2],[11,2,3,1],[2,0,4,5,3,1,2,7,6,10,9,9],[2,0,5,3,1,2,10,9,11,6],[2,0,4,3,1,2,6,10,9,11,7],[53,0,1,2,3,2],[1,0,2,1,11,7,6,12,9,4],[1,0,4,11,7,6,9,3],[1,0,8,7,6,2],[1,0,1,8,7,6,12,9,14,10,3],[1,0,4,8,7,6,12,9,3],[1,0,1,8,7,6,3],[1,0,2,8,7,6,3],[1,0,7,6,12,9,10,2],[1,0,1,8,11,7,6,9,14,10,13,3],[1,0,1,11,7,6,12,9,10,13,3],[1,0,1,8,11,7,6,10,3],[1,0,11,7,6,10,13,2],[1,0,11,6,2],[1,0,8,11,6,10,2],[1,0,8,11,6,9,2],[1,0,1,8,11,6,9,10,13,3],[1,0,1,8,7,6,9,10,3],[1,0,2,3,8,7,6,9,10,4],[1,0,5,11,7,9,10,3],[1,0,8,7,10,2],[1,0,2,3,8,7,6,12,9,10,4],[1,0,2,8,6,3],[8,0,1,4,2,3,5,3],[8,0,1,4,2,3,7,6,3],[3,0,1,3,5,4,6,3],[3,0,1,3,5,4,3],[3,0,2,1,3,5,4,7,6,8,4],[3,0,3,5,4,7,6,2],[20,0,1,2,3,4,2],[13,0,1,2,3,6,2],[21,0,1],[5,0,1,2,3,6,7,8,6],[5,4,5,2,3,7,5],[5,0,1,7,8,3],[5,4,5,7,3],[14,3,4,5,6,1],[14,0,1,2,3,4,5,4],[10,2,0,1,3,4,4],[10,0,1,3,4,3],[10,0,1,3,3],[22,0,1,1],[23,0,1,2,3,4,4],[24,0,1,2,2],[25,0,1,2,3,1],[4,0,3,4,2],[4,2,0,3,4,5,3],[6,3,0,1,2,6,5],[6,0,4,5,6,4],[6,0,1,2,6,4],[26,0,1],[27,0,1,2,3,4,4],[28,0,1,2],[29,0,1],[30,0,1,1],[7,0,1,3,2],[31,0,1],[11,0,2,4,5,6,7,3,8,9,10,11,2],[33,0,1],[2,0,4,8,1,2,7,6,10,9,8],[2,0,3,1,2,6,9,6],[2,0,5,3,1,2,7,10,9,7],[2,0,5,3,1,2,7,10,9,11,7],[2,0,4,5,3,1,2,7,6,10,9,11,9],[2,0,4,3,1,2,10,9,11,6],[34,0,1,1],[35,0,1,1],[12,0,1,14,2,3,4,5,15,6,7,8,9,16,17,18,19,10,11,20,12,21,22,23,25,26,27,28,29,30,31,33,32,24],[12,13,0,1,2,3,4,5,6,7,8,9,10,11,12,25,26,27,28,29,30,31,34,32,15],[12,13,0,1,24,2,3,4,5,6,7,8,9,10,11,12,25,26,27,28,29,30,31,16],[37,0,1],[38,0,1,1],[39,0,1,2,3],[40,0,1,2,3,4,1],[41,0,1,1],[42,0,1,2,3,4,5,6,1],[15,0,2,3,2],[15,1,2,3,2],[43,0,1,1],[44,0,1,1],[16,0,1,2,3,5,4,6,7,8,7],[45,0,1,2,4],[46,0,1,3],[47,0,1],[48,0,1,2,3,4,5,6,1],[49,0,1,1],[17,0,1,2,3],[54,0,1,2,3,4,5,6,7,1],[55,0,1,2,3,4,5,6,7,8,9,10,11,12,13,1],[56,0,1,2,3,4,4],[58,0,1,3],[59,0,1],[60,0,1,2,3,4,5,1],[61,0,1,1],[62,0,1,1],[63,0,1],[64,0,1,3],[65,0,1,1],[66,0,1,2,1],[67,0,1,2,3,4,5,4],[68,0,1,2,3],[69,0,1,3],[70,0,1],[71,0,1],[72,0,1,2,3,1],[73,0,1,1]],[[[{"name":"BG","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[50]],[[{"name":"Dry_Tree","rect":[487,3,109,235],"offset":[0,0],"originalSize":[109,235],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"ZigZac_Scan_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[51]],[[{"name":"Map2","rect":[0,0,603,1080],"offset":[0,0],"originalSize":[603,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[52]],[[{"name":"Rock","rect":[173,486,60,46],"offset":[0,0],"originalSize":[60,46],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Char03","rect":[245,394,179,124],"offset":[0,0],"originalSize":[179,124],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Tree4","rect":[390,705,99,117],"offset":[0,0],"originalSize":[101,117],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Tree3","rect":[3,486,124,164],"offset":[-0.5,0],"originalSize":[125,164],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"1st","rect":[382,933,95,86],"offset":[0,0],"originalSize":[95,86],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[14,"BGM_Game",".mp3",209.808],-1],0,0,[],[],[]],[[{"name":"Continue_To_Play","rect":[754,383,327,153],"offset":[0,0],"originalSize":[327,153],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Tree","rect":[245,245,143,189],"offset":[-0.5,0],"originalSize":[144,189],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"StageTestGame"],[15,"StageTestGame",[-3,-4,-5,-6,-7,-8],[[91,-2]],[13,-1],[5,960,540]],[61,"Block",false,2,[-15,-16,-17,-18],[[92,1,3,true,true,false,-9,[0,0,1]],[96,-11,[0,0,30],[0,0,-78],-10],[98,false,1000,1,-12,[5,70,50]],[101,-14,-13]],[0,"d9zfcSl+5B/o4SQnVwh/u8",1],[4,4286019547],[5,70,50]],[83,"Chain",4,[-24,-25],[[-19,-20,[99,100000,0,-21,[5,20,200]],[102,35,40,-40,-23,-22]],1,1,4,4],[0,"e0SJBNvilHn7GLVzgSPU5K",1],[5,20,200]],[84,"Rope",4,[3,-29],[[-26,[103,[{},{}],-28,-27]],1,4],[0,"6frLYUETRJvZQM+ElF0vuD",1],[0,0.5,0],[0,170,0,0,0,0,1,1,1,1]],[45,"UIManager",1,[-34,-35,-36],[[104,-33,-32,-31,-30]],[0,"2eJmakjLxA5q43Zex9OAkg",1],[-480,-270,0,0,0,0,1,1,1,1]],[30,"GameOverMenu",false,5,[-37,-38,-39],[0,"3dkl+1YWxCz6D592GZkGyQ",1],[480,800,0,0,0,0,1,1,1,1]],[62,"Background",512,[-42],[[28,1,0,-40,[6],7],[107,0,45,100,40,-41]],[0,"1co0RFhV5GLq5ECY8eOPVG",1],[5,100,40]],[52,"ParticleSpawnPlace",2,[[20,"Pos 1",-43,[0,"7fy31B229FeryWdLKQIA3b",1],[-35,25,0,0,0,0,1,1,1,1]],[20,"Pos 2",-44,[0,"d2K8QWVAFCpaBFwy+IRXXE",1],[35,25,0,0,0,0,1,1,1,1]],[20,"Pos 3",-45,[0,"caswY4oOtHnLeIhSPA563n",1],[-35,-25,0,0,0,0,1,1,1,1]],[20,"Pos 4",-46,[0,"655TXbgD5N4phRh8IvgUi4",1],[35,-25,0,0,0,0,1,1,1,1]]],[0,"f6MbV2rYtEZ4tVzGycFMzR",1]],[4,"Ground",1,[-50],[[93,0,0,true,true,-47],[100,1000,1,-48],[110,-49]],[0,"39DehGudhB6oXNqTz2Qg33",1],[5,100,100],[0,-276.536,0,0,0,0,1,1,1,1]],[63,"GameManager",1,[[111,12,20,0.25,-51,4],[112,1,-52]],[0,"ebeMjKvLNHaZKJxg7SIB6v",1]],[89,"BlockSpawner",1,[[-54,[16,"Holder",-55,[0,"7a/fwsDNZAxJ9RRRvgGBqF",1]]],1,4],[[113,-53]],[0,"ccecQtGs5EmZJWanrP9rl1",1]],[45,"ParticleManager",1,[-58,-59],[[114,-57,-56]],[0,"918r1i2atKRbcqNOwjABmE",1],[-480,-270,0,0,0,0,1,1,1,1]],[25,"RopeHolder",1,[4,-60],[0,"b6kCJT9UdOfpFCHwa2Fiy/",1]],[52,"MovePoint",13,[[16,"Point 1",-61,[0,"e7mQb53sRKYI8Brzerhwou",1]],[16,"Point 1 copy",-62,[0,"e0dEXbHzBB1qSZfvnmk523",1]]],[0,"4bcAa0Ej9ELJh7tINEcybK",1]],[26,"DestroyLine",5,4,[[29,-63,[5,960,100]],[116,-64]],[0,"aa41lvOtNLlorAwf/sbHus",1],[0,-490,0,0,0,0,1,1,1,1]],[4,"ResetBtn",6,[7],[[117,2,-65,[[18,"8dd1ej7a4pMcpsg0S4Tgp0f","ResetGame",10]],[4,4293322470],[4,4291348680],[4,3363338360],7,8,9,10,11]],[0,"72LYBLhI1JVZ0NBN1w6+tk",1],[5,100,40],[0,-34.297,0,0,0,0,1,1,1,1]],[27,"RemainLiveUI",5,[-67],[-66],[0,"20kYtu72RBz7STUL/+5B00",1],[800,455.713,0,0,0,0,1,1,1,1]],[27,"ScoreUI",5,[-69],[-68],[0,"af3MVvVUJKn7uDHfdHeVXy",1],[124.782,455.713,0,0,0,0,1,1,1,1]],[64,"Model",3,2,[[2,0,-70,[14],15]],[0,"334Bn6qK9KKpzYzZ1F7JPm",1],[4,4285690589],[5,70,50],[0,0.5,0],[0,-25,0,0,0,0,1,1,1,1]],[26,"OtherBlockHitBox",1,2,[[29,-71,[5,70,1]],[118,-72]],[0,"5bcK2aJ5VKaaZlIbiJosAP",1],[0,-25.626,0,0,0,0,1,1,1,1]],[11,"Model",3,[[2,0,-73,[0],1]],[0,"6821NB+E9IP5qYy6O29IUx",1],[5,20,200]],[20,"HookPlace",3,[0,"9efUx2wLBHErW4qMawmft+",1],[0,-100,0,0,0,0,1,1,1,1]],[94,10,10,3,[0,0,1]],[97,30,20,true,3,[0,0,67],[0,0,144]],[95,1,0,4],[11,"BG",6,[[2,0,-74,[2],3]],[0,"ddYLVm2oJBu7TenW9qsKyc",1],[5,200,200]],[46,"LoseText",6,[[39,"LOSE",-75,[4]]],[0,"eaxvAY5CpEeZS1AX5i4rnn",1],[4,4278190080],[5,106.72,50.4],[0,60.019,0,0,0,0,1,1,1,1]],[65,"Label",512,7,[[119,"Try Again",20,false,1,1,1,1,-76,[5]]],[0,"bbWC5UdOpNrJ1oV2mN2FKC",1],[4,4278190080],[5,100,40]],[36,"Text",17,[-77],[0,"6cWYItflVHKYIzYYk1Wduk",1],[5,117.85,50.4]],[39,"Live: 3",29,[12]],[125,17,30],[36,"Text",18,[-78],[0,"5ctRUW9kdPr7ar4msZEzv3",1],[5,148.96,50.4]],[39,"Score: 0",32,[13]],[126,18,33],[25,"Prefabs",11,[2],[0,"83GPhCqmFKjJFAgp61yGr9",1]],[66,"BlockHitBox",2,2,[[29,-79,[5,70,50]]],[0,"1eva4IjDFNZqdE3qK69ejx",1]],[11,"Model",9,[[2,0,-80,[16],17]],[0,"1b5BdOFEVOupwve/MRPYCX",1],[5,100,100]],[25,"Prefabs",12,[-81],[0,"2bZj+FI4hK3JHDKuqAuwX4",1]],[67,"PrefectDropParticle",false,38,[[127,1,true,true,200,0.1,999.999985098839,0.20000000298023224,0.5,0,360,20,10,5,5,360,360,1,300,100,-92.11000061035156,65.79000091552734,-671.0499877929688,65.79000091552734,-82,[18],[4,2751463423],[4,3321888768],[4,3590324479],[4,3154116608],[0,6,6],[0,30,-1000],19]],[0,"e0LbaSKBpM85pQXLE1xDDL",1]],[16,"Holder",12,[0,"89V7XHaohNxoT2PP88JiWN",1]]],0,[0,4,1,0,0,1,0,-1,10,0,-2,5,0,-3,11,0,-4,9,0,-5,12,0,-6,13,0,0,2,0,13,23,0,0,2,0,0,2,0,18,19,0,0,2,0,-1,19,0,-2,20,0,-3,36,0,-4,8,0,-1,23,0,-2,24,0,0,3,0,19,24,0,0,3,0,-1,21,0,-2,22,0,-1,25,0,20,22,0,0,4,0,-2,15,0,21,34,0,22,6,0,23,31,0,0,5,0,-1,6,0,-2,17,0,-3,18,0,-1,26,0,-2,27,0,-3,16,0,0,7,0,0,7,0,-1,28,0,5,8,0,5,8,0,5,8,0,5,8,0,0,9,0,0,9,0,0,9,0,-1,37,0,0,10,0,0,10,0,0,11,0,-1,35,0,5,11,0,24,40,0,0,12,0,-1,38,0,-2,40,0,-2,14,0,5,14,0,5,14,0,0,15,0,0,15,0,0,16,0,-1,31,0,-1,29,0,-1,34,0,-1,32,0,0,19,0,0,20,0,0,20,0,0,21,0,0,26,0,0,27,0,0,28,0,-1,30,0,-1,33,0,0,36,0,0,37,0,-1,39,0,0,39,0,6,1,2,5,35,3,5,4,4,5,13,7,5,16,24,13,25,82],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-1,1,-1,1,-1,-1,-1,1,25,26,27,28,-1,-1,-1,1,-1,1,-1,1],[0,7,0,7,0,0,0,20,20,53,20,54,0,0,0,7,0,7,0,55]],[[{"name":"ef","rect":[2,1,1271,585],"offset":[0.5,-0.5],"originalSize":[1274,586],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[56]],[[{"name":"2nd","rect":[936,253,98,76],"offset":[0,0],"originalSize":[98,76],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"default_btn_disabled","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[0],0,[0],[2],[57]],[[[42,"Char1_Animation","\r\nChar1_Animation.png\r\nsize: 1607,182\r\nformat: RGBA8888\r\nfilter: Linear,Linear\r\nrepeat: none\r\nbody\r\n rotate: true\r\n xy: 1305, 5\r\n size: 175, 157\r\n orig: 177, 159\r\n offset: 1, 1\r\n index: -1\r\nhand_L\r\n rotate: true\r\n xy: 1543, 8\r\n size: 100, 62\r\n orig: 102, 64\r\n offset: 1, 1\r\n index: -1\r\nhand_R\r\n rotate: true\r\n xy: 1464, 8\r\n size: 100, 77\r\n orig: 102, 79\r\n offset: 1, 1\r\n index: -1\r\nhead\r\n rotate: false\r\n xy: 1110, 11\r\n size: 193, 169\r\n orig: 195, 171\r\n offset: 1, 1\r\n index: -1\r\nsad\r\n rotate: false\r\n xy: 835, 2\r\n size: 126, 44\r\n orig: 128, 46\r\n offset: 1, 1\r\n index: -1\r\ntear1\r\n rotate: false\r\n xy: 835, 48\r\n size: 273, 132\r\n orig: 275, 134\r\n offset: 1, 1\r\n index: -1\r\ntear2\r\n rotate: false\r\n xy: 2, 4\r\n size: 298, 176\r\n orig: 300, 178\r\n offset: 1, 1\r\n index: -1\r\ntear3\r\n rotate: false\r\n xy: 302, 16\r\n size: 260, 164\r\n orig: 262, 166\r\n offset: 1, 1\r\n index: -1\r\ntear4\r\n rotate: false\r\n xy: 564, 25\r\n size: 269, 155\r\n orig: 271, 157\r\n offset: 1, 1\r\n index: -1\r\nwings\r\n rotate: false\r\n xy: 1464, 110\r\n size: 119, 70\r\n orig: 121, 72\r\n offset: 1, 1\r\n index: -1\r\n",["Char1_Animation.png"],{"skeleton":{"hash":"hmz7DZPgZWywQnjqJ1iKcOrPcB4","spine":"3.8.99","x":-146.59,"y":-3.11,"width":335,"height":305,"images":"./Char1_PNGs/","audio":"E:/NGHI/Elofun/Zig Zac/Animation/Character_Animation2/Char1"},"bones":[{"name":"root"},{"name":"All","parent":"root"},{"name":"body","parent":"All","length":115.7,"rotation":81.57,"x":-10.03,"y":20.19},{"name":"hand_L","parent":"body","length":74.53,"rotation":114.57,"x":94.97,"y":24.51},{"name":"hand_R","parent":"body","length":61.31,"rotation":-103.73,"x":107.1,"y":-36.36},{"name":"wings","parent":"body","length":72.74,"rotation":69.37,"x":95.91,"y":53.25},{"name":"head","parent":"body","length":120.12,"rotation":9.33,"x":124.87,"y":-7.21}],"slots":[{"name":"wings","bone":"wings","attachment":"wings"},{"name":"hand_R","bone":"hand_R","attachment":"hand_R"},{"name":"body","bone":"body","attachment":"body"},{"name":"hand_L","bone":"hand_L","attachment":"hand_L"},{"name":"head","bone":"head","attachment":"head"},{"name":"sad","bone":"head","attachment":"sad"},{"name":"tear1","bone":"head","attachment":"tear4"}],"skins":[{"name":"default","attachments":{"body":{"body":{"x":52.37,"y":30.06,"rotation":-81.57,"width":177,"height":159}},"hand_L":{"hand_L":{"x":43.4,"y":-3.29,"rotation":163.86,"width":102,"height":64}},"hand_R":{"hand_R":{"x":31.75,"y":-7.66,"rotation":-21.64,"width":102,"height":79}},"head":{"head":{"x":73.92,"y":10.34,"rotation":-90.9,"width":195,"height":171}},"sad":{"sad":{"x":79.14,"y":-7.25,"rotation":-90.9,"width":128,"height":46}},"tear1":{"tear1":{"x":2.59,"y":-41.55,"rotation":-90.9,"width":275,"height":134},"tear2":{"x":-1.44,"y":-43.99,"rotation":-90.9,"width":300,"height":178},"tear3":{"x":-2.19,"y":-27.98,"rotation":-90.9,"width":262,"height":166},"tear4":{"x":-5.84,"y":-37.42,"rotation":-90.9,"width":271,"height":157}},"wings":{"wings":{"x":40.51,"y":4.17,"rotation":-150.95,"width":121,"height":72}}}}],"animations":{"Cry_Animation":{"slots":{"tear1":{"attachment":[{"name":"tear1"},{"time":0.1,"name":"tear2"},{"time":0.2,"name":"tear3"},{"time":0.3,"name":"tear4"},{"time":0.4,"name":"tear1"},{"time":0.5,"name":"tear2"},{"time":0.6,"name":"tear3"},{"time":0.7,"name":"tear4"},{"time":0.8,"name":"tear1"}]}},"bones":{"wings":{"rotate":[{"angle":-1.6,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.5,"angle":-12.28,"curve":0.243,"c3":0.68,"c4":0.71},{"time":0.8,"angle":-1.6}]},"head":{"rotate":[{"angle":0.7,"curve":0.379,"c2":0.6,"c3":0.724},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.5333,"angle":3.8,"curve":0.242,"c3":0.667,"c4":0.67},{"time":0.8,"angle":0.7}]},"hand_R":{"rotate":[{"angle":-3.58,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.5333,"angle":-14.76,"curve":0.243,"c3":0.655,"c4":0.63},{"time":0.8,"angle":-3.58}]},"hand_L":{"rotate":[{"angle":0.8,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.5,"angle":6.15,"curve":0.243,"c3":0.68,"c4":0.71},{"time":0.8,"angle":0.8}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.4333,"angle":3.92,"curve":0.25,"c3":0.75},{"time":0.8}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.4333,"x":2.47,"y":16.66,"curve":0.25,"c3":0.75},{"time":0.8}]}}},"Idle_Animation":{"slots":{"sad":{"attachment":[{"name":null}]},"tear1":{"attachment":[{"name":null}]}},"bones":{"wings":{"rotate":[{"angle":-1.6,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-12.28,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-1.6}]},"head":{"rotate":[{"angle":0.7,"curve":0.379,"c2":0.6,"c3":0.724},{"time":0.1667,"curve":0.25,"c3":0.75},{"time":0.8333,"angle":3.8,"curve":0.242,"c3":0.667,"c4":0.67},{"time":1.3333,"angle":0.7}]},"hand_R":{"rotate":[{"angle":-3.58,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.2,"curve":0.25,"c3":0.75},{"time":0.8667,"angle":-14.76,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1.3333,"angle":-3.58}]},"hand_L":{"rotate":[{"angle":0.8,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":6.15,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":0.8}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.92,"curve":0.25,"c3":0.75},{"time":1.3333}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"x":2.47,"y":16.66,"curve":0.25,"c3":0.75},{"time":1.3333}]}}}}},[0]]],0,0,[0],[-1],[58]],[[{"name":"Người chơi 2","rect":[984,203,193,33],"offset":[0,0],"originalSize":[193,33],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"Global"],[17,"Global",[[130,-2]],[37,"77NgNIIDNHIbO/YR9D3rBp",-1,0]]],0,[0,4,1,0,0,1,0,6,1,2],[],[],[]],[[{"name":"Noidung_Guide","rect":[3,28,1148,683],"offset":[-0.5,-0.5],"originalSize":[1155,738],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[59]],[[{"name":"Score_bar","rect":[936,3,244,79],"offset":[0,0],"originalSize":[244,79],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"2nd","rect":[483,933,95,86],"offset":[0,0],"originalSize":[95,86],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"BG_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[60]],[[{"name":"LOGO_ELOFUN","rect":[374,975,140,34],"offset":[0,0],"originalSize":[140,34],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"singleColor","rect":[658,648,2,2],"offset":[0,0],"originalSize":[2,2],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"Stage Cover"],[68,"Stage Cover",[[12,45,-2],[56,-4,-3],[2,0,-5,[0],1]],[0,"61q55Tla1Coq/ByFSNWJP7",-1],[4,4278190080],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,0,1,0,14,1,0,0,1,0,0,1,0,6,1,5],[0,0],[-1,1],[0,7]],[[{"name":"default-particle","rect":[2,2,61,61],"offset":[0.5,-0.5],"originalSize":[64,64],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[61]],[[{"name":"QR_Box","rect":[3,3,649,650],"offset":[0,-1],"originalSize":[651,652],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Murshroom2","rect":[173,538,73,57],"offset":[0,0],"originalSize":[73,57],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"atom","rect":[0,0,31,31],"offset":[0,0],"originalSize":[31,31],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[62]],[[{"name":"QR_Txt","rect":[3,659,769,283],"offset":[0,-0.5],"originalSize":[769,284],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Tree5","rect":[382,810,99,117],"offset":[0,0],"originalSize":[101,117],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Item","rect":[239,524,146,158],"offset":[0,0],"originalSize":[146,158],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Start_BTN","rect":[3,329,580,328],"offset":[-0.5,0],"originalSize":[583,330],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[{"name":"Bush","rect":[155,870,129,107],"offset":[0,0],"originalSize":[129,107],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Road","rect":[3,3,236,236],"offset":[0,0],"originalSize":[236,236],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[14,"SFX_Crystal",".mp3",2.048],-1],0,0,[],[],[]],[[{"name":"Continue_To_Play","rect":[375,3,540,306],"offset":[-0.5,-2.5],"originalSize":[549,311],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[{"name":"ForeGround_Left","rect":[0,0,183,1080],"offset":[0,0],"originalSize":[183,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[63]],[[[5,"playGround"],[90,"playGround",[-3,-4,-5,-6,-7,-8,-9,-10,-11],[-2],[13,-1],[5,390,720]],[69,"cuboid",1,1,[-16,-17,-18,-19,-20,-21],[[115,5,-13,[0,50,50]],[131,-15,-14]],[0,"66JYtOUg5MAI769SJxURTw",-12],[5,100,100],[0,0,0],[1674.386,174.32,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[70,"cuboidBase",1,[-23,-24,-25,-26,-27,-28,-29,-30,-31],[[55,5,-22,[5,200,200]]],[0,"4bi4fFIHJK0IfUYg/ZP7Ym",1],[4,4292119636],[5,200,200],[0,-70.7,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[71,"diamond",2,1,[-39,-40,-41],[[132,3,7,-33],[133,-38,-37,-36,-35,-34]],[0,"36og7YXZFORYpiDoXLHcg/",-32],[1674.386,174.32,0,0,0,0,1,1,1,1]],[72,"player",[-45,-46],[[134,-43,-42],[29,-44,[5,5,5]]],[0,"829xQzBptIUp4ha9I8M35x",1],[0,0,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[30,"endGamePopup",false,1,[-47,-48,-49],[0,"38EouarGNFMKlMCpcuCyWE",1],[0,0,0,0,0,0,1,0,0,1]],[4,"banner",6,[-51,-52,-53],[[3,-50,[52],53]],[0,"28c0jWr7pIi4W8QJv60KJU",1],[5,360,107],[0,250,0,0,0,0,1,0.6666667,0.6666667,1]],[31,"banner",[-55,-56,-57],[[3,-54,[69],70]],[0,"a4jpvK1JlCXpCWUp/Vhnd1",1],[5,360,107],[0,250,0,0,0,0,1,0.6666667,0.6666667,1]],[73,"objectDynamic",[-58,-59,-60],[0,"baM/PQ2D5EeoL+D9q+8HAI",1]],[135,1,2,4,3,5,[40,41,42],6],[74,"endGamePopup copy",1,[-61,8,-62],[0,"18QJMoyE9MgJ305BG+S2gj",1],[1713.797,67.013,0,0,0,0,1,0,0,1]],[9,"fence-4",1,2,[-64],[[2,0,-63,[5],6]],[0,"8ahLYZLppLn64fLoz3Qn8i",2],[5,75,96.5],[60,110,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-3",1,2,[-66],[[2,0,-65,[7],8]],[0,"b4XtX6d1xNQ7caJSOcoIkn",2],[5,75,96.5],[110,60,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-2",1,2,[-68],[[2,0,-67,[9],10]],[0,"a5ybZ6nVVEhaFcB3mqucaV",2],[5,75,96.5],[10,62,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-1",1,2,[-70],[[2,0,-69,[11],12]],[0,"4bSDMX0axAZqMns+8+qYuQ",2],[5,75,96.5],[62,10,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[25,"diamondContainer",9,[5],[0,"4f261EFSRChK5kIkLY9vL4",1]],[32,"mask",1,[9],[[136,0,-71,[15]]],[0,"36Br96wXRK54e5W7gVSxQe",1],[5,390,720]],[21,"bg",9,[[28,2,0,-72,[16],17]],[0,"f7my9ukyBOx6Im4s+azuNL",1],[5,603,2700],[0,0.5,0],[0,-360,0,0,0,0,1,0.6666667,0.66667,1]],[75,"cuboidContainer",9,[3],[0,"ceem4EwMNFmY2gT+CijI8e",1],[5,128.98,50.4]],[9,"fence-8",1,3,[-74],[[2,0,-73,[20],21]],[0,"77N5zgG/BHTJoVJsMp5T4i",1],[5,75,96.5],[55,110,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-7",1,3,[-76],[[2,0,-75,[22],23]],[0,"27mpKpLelAiat/ly+7Cpzv",1],[5,75,96.5],[110,55,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-6",1,3,[-78],[[2,0,-77,[24],25]],[0,"86ht3tvfVHxZgA3LH7Znzr",1],[5,75,96.5],[-45,110,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-5",1,3,[-80],[[2,0,-79,[26],27]],[0,"d5837ZpYNKKLZiUO02TgBq",1],[5,75,96.5],[110,-45,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-4",1,3,[-82],[[2,0,-81,[28],29]],[0,"75oZNW8YhMUZiX+jvtZZkc",1],[5,75,96.5],[-95,55,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-3",1,3,[-84],[[2,0,-83,[30],31]],[0,"3314tj241PCK1R7wpC3jU6",1],[5,75,96.5],[-95,-45,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-2",1,3,[-86],[[2,0,-85,[32],33]],[0,"dd4zHkZ7FM/JmymX2Ed49h",1],[5,75,96.5],[55,-95,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-1",1,3,[-88],[[2,0,-87,[34],35]],[0,"65wPFnYM1CGL0dS9Q9gDaN",1],[5,75,96.5],[-45,-95,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[11,"playerBallHitBox",5,[[138,-89,10],[8,1,-90,[0,0,-17.5],[5,30,45]]],[0,"84Ka2Iy/hDVJTj5KX2gYM+",1],[5,1,1]],[22,"bg",7,[-92],[[2,0,-91,[46],47]],[0,"9bf4S4I3dGRZUqIxkiqKje",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[26,"collisionReset",3,1,[[55,4,-93,[5,300,25]],[139,-94,10]],[0,"daPDkEH7FNwY14BUO4q1EC",1],[0,-372.5,0,0,0,0,1,1,1,1]],[22,"bg",8,[-96],[[2,0,-95,[63],64]],[0,"0bbZCzGSVFTKlHlhjKk/oT",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[26,"diamondParticle copy",2,1,[[128,1,1,true,50,3,1000,3,0,360,10,5,1,50,0,-97,[0],[4,4278215935],[4,0],[4,4278215935],[4,0],[0,25,25],1,2]],[0,"bb/iCxCJ5B+LdHaNU/h8Hh",1],[1505.385,193.634,0,0,0,0,1,1,1,1]],[47,"frontFace",1,2,[[2,0,-98,[3],4]],[0,"1flnSDfI5JsZoLIkAunH0O",2],[5,143,143],[50,50,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,12,[[8,2,-99,[0,10,-5],[5,105,20]]],[0,"6dSXF2E79CIYwry1kJN8HQ",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,13,[[8,2,-100,[0,-10,-5],[5,105,20]]],[0,"0aqyl6lm5DMrpX2zomzhoT",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,14,[[8,2,-101,[0,12.5,-5],[5,105,20]]],[0,"76cLYhreBF96nKf/AQCqZt",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,15,[[8,2,-102,[0,-12.5,-5],[5,105,20]]],[0,"604VbQpeJPYKtA65kw+c5w",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[76,"objectRandom",1,2,[-103],[0,"38rcRAXSNJx7QNi9iHU4Xx",2],[5,129,107],[0,0,0,0,0,-0.3826834323650898,0.9238795325112867,0.5,0.5,0.5],[1,0,0,-45]],[77,"objectSprite",1,38,[[3,-104,[13],14]],[0,"d0+vGz/JdCW4S1pYlKIaKH",2],[5,129,107],[400,150,0,0,0,0,1,1,1,1]],[47,"frontFace",1,3,[[2,0,-105,[18],19]],[0,"e8W85Sw8NF+rVU6QOPJWQL",1],[5,285,285],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,20,[[8,2,-106,[0,-2.5,-10],[5,105,5]]],[0,"36oFjc4eZI6an1h0QJ86TU",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,21,[[8,2,-107,[0,2.5,-10],[5,105,5]]],[0,"bdb+Dk2SJN9pzWi+B/Cebl",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,22,[[8,2,-108,[0,-5,-10],[5,105,5]]],[0,"0alePwxQNFUq9Q2LU5QSGw",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,23,[[8,2,-109,[0,-5,-10],[5,105,5]]],[0,"270YtxvQRHAbVd1EgDjoTg",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,24,[[8,2,-110,[0,-5,-5],[5,105,5]]],[0,"b0hGZAsY5LMKAWthd+MQL1",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,25,[[8,2,-111,[0,5,-5],[5,105,5]]],[0,"66NoiIcxBHtJJyM6ktcQFO",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,26,[[8,2,-112,[0,-5,-5],[5,105,5]]],[0,"6d4rtRb+5Boo9mhKzS3ZO9",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,27,[[8,2,-113,[0,-5,-5],[5,105,5]]],[0,"f7tdW0mOVKgaaVwVuKzeNv",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[85,"diamondSprite",2,4,[-114],[0,"b8m5NEk4NOkp0PfC/3L/1M",4],[5,64.8888889,70.2222222]],[105,0,49,[36]],[86,"diamondParticle",2,4,[-115],[0,"fbG5s0of9NfqmYY/Er4Lz/",4]],[129,1,1,true,false,50,3,1000,3,0,360,10,5,1,50,0,51,[37],[4,4278215935],[4,0],[4,4278215935],[4,0],[0,25,25]],[87,"lblScorePlus",false,2,4,[-116],[0,"40rfI1q9hL9Lgo1ndynU07",4],[4,4278215935],[5,39.05,37.8],[0,35,0,0,0,0,1,1,1,1]],[40,"+2",30,30,false,1,1,1,53,[38]],[120,"0",false,1,1,1,[39]],[53,"lblScore",1,[55],[0,"23zG5WBTlKma3wqL6fo0dX",1],[5,39.1,50.4],[0,325,0,0,0,0,1,1,1,1]],[33,"bg",100,6,[[2,0,-117,[43],44]],[0,"23apc97GlJSpdJ34NCsQDx",1],[4,4278190080],[5,390,720]],[54,"lblBanner",29,[-118],[0,"298f+QO7JBi5k7or/SEYml",1],[4,4282143844],[5,275,50.4],[5,0,0,0,0,0,1,1,1,1]],[121,"MẤT KẾT NỐI",60,false,1,2,2,58,[45]],[1,"Char1_Animation",7,[[7,"default","Cry_Animation",0,false,"Cry_Animation",-119,[48],49]],[0,"91q+/Nu31HO6FRDMAU+elu",1],[5,335,305],[-200,-50,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",7,[[7,"default","Sad_Animation",0,false,"Sad_Animation",-120,[50],51]],[0,"c9miZ3KqVEhItSqVFn5QnL",1],[5,313.89,345.29],[200,-50,0,0,0,0,1,0.5,0.5,1]],[36,"endGameLabel",6,[-121],[0,"c1NHVmdMNICbFDGb4Du3K1",1],[5,375,90.4]],[57,"Người chơi 1 đã bị mất kết nối\nNgười chơi 2 sẽ trở thành chủ phòng",13,20,false,1,1,2,2,62,[54]],[1,"playerChar",5,[[140,"Char3","Fly_Animation",0,false,2,"Fly_Animation",-122,[55],56]],[0,"152nSvNsRJcZuKJleGk4qS",1],[5,691,453],[0,-55,0,0,0,0,1,0.35,0.35,1]],[78,"light",false,100,1,[[106,1,0,-123,[57],58]],[0,"f5h1MszApENbA7dwZcXgmC",1],[5,1200,800],[0,125,0,0,0,0,1,1,1,1]],[33,"bg",100,11,[[2,0,-124,[59],60]],[0,"d92n6vHbBFKY0bPipS0V5k",1],[4,4278190080],[5,390,720]],[46,"lblBanner",31,[[122,"MẤT KẾT NỐI",60,false,1,2,2,-125,[61],62]],[0,"bcs5oYD1dAwKIwm3mALr8X",1],[4,4282143844],[5,275,50.4],[5,0,0,0,0,0,1,1,1,1]],[1,"Char1_Animation",8,[[7,"default","Cry_Animation",0,false,"Cry_Animation",-126,[65],66]],[0,"25/4/WraNDAJmaM6q7FWfZ",1],[5,335,305],[-200,-50,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",8,[[7,"default","Sad_Animation",0,false,"Sad_Animation",-127,[67],68]],[0,"0cl5DTBHVKs53mShrQnqwm",1],[5,313.89,345.29],[200,-50,0,0,0,0,1,0.5,0.5,1]],[11,"endGameLabel",11,[[123,"Người chơi 1 đã bị mất kết nối\nNgười chơi 2 sẽ trở thành chủ phòng",13,20,false,1,1,2,2,-128,[71],72]],[0,"5bbk2LG3xDPrFpFUevc9DI",1],[5,375,90.4]]],0,[0,4,1,0,-1,10,0,-1,32,0,-2,2,0,-3,4,0,-4,17,0,-5,65,0,-6,56,0,-7,30,0,-8,6,0,-9,11,0,4,2,0,0,2,0,15,5,0,0,2,0,-1,33,0,-2,12,0,-3,13,0,-4,14,0,-5,15,0,-6,38,0,0,3,0,-1,40,0,-2,20,0,-3,21,0,-4,22,0,-5,23,0,-6,24,0,-7,25,0,-8,26,0,-9,27,0,4,4,0,0,4,0,29,54,0,30,52,0,31,50,0,15,5,0,0,4,0,-1,49,0,-2,51,0,-3,53,0,32,10,0,0,5,0,0,5,0,-1,28,0,-2,64,0,-1,57,0,-2,7,0,-3,62,0,0,7,0,-1,29,0,-2,60,0,-3,61,0,0,8,0,-1,31,0,-2,68,0,-3,69,0,-1,18,0,-2,19,0,-3,16,0,-1,66,0,-3,70,0,0,12,0,-1,34,0,0,13,0,-1,35,0,0,14,0,-1,36,0,0,15,0,-1,37,0,0,17,0,0,18,0,0,20,0,-1,41,0,0,21,0,-1,42,0,0,22,0,-1,43,0,0,23,0,-1,44,0,0,24,0,-1,45,0,0,25,0,-1,46,0,0,26,0,-1,47,0,0,27,0,-1,48,0,0,28,0,0,28,0,0,29,0,-1,58,0,0,30,0,0,30,0,0,31,0,-1,67,0,0,32,0,0,33,0,0,34,0,0,35,0,0,36,0,0,37,0,-1,39,0,0,39,0,0,40,0,0,41,0,0,42,0,0,43,0,0,44,0,0,45,0,0,46,0,0,47,0,0,48,0,-1,50,0,-1,52,0,-1,54,0,0,57,0,-1,59,0,0,60,0,0,61,0,-1,63,0,0,64,0,0,65,0,0,66,0,0,67,0,0,68,0,0,69,0,0,70,0,6,1,3,5,19,5,5,16,8,5,11,9,5,17,10,33,63,10,34,59,10,35,16,10,36,18,10,37,55,10,38,19,55,0,56,128],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,52,52,54,55,59,63],[-1,16,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-2,-3,-1,1,-1,-1,1,-1,7,-1,7,-1,1,-1,-1,7,-1,1,-1,1,-1,3,-1,1,-1,7,-1,7,-1,1,-1,3,1,16,1,3,3,3,3],[0,29,21,0,22,0,6,0,6,0,6,0,6,0,30,0,0,31,0,22,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,0,0,0,64,65,66,0,7,0,0,9,4,15,4,16,0,17,0,4,8,0,21,0,7,0,2,0,9,4,15,4,16,0,17,0,2,67,29,21,2,2,2,2]],[[[14,"SFX_Explode",".mp3",0.968],-1],0,0,[],[],[]],[[[141,"2d-spine-gray",[{"hash":3502088787,"record":null,"name":"2d-spine-gray|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\n#if USE_TINT\n in vec4 a_color0;\n#endif\nin vec2 a_uv0;\nout vec2 v_uv0;\nout vec4 v_light;\n#if USE_TINT\n out vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nin vec2 v_uv0;\nin vec4 v_light;\n#if USE_TINT\n in vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n float gray = 0.2126*texColor.r + 0.7152*texColor.g + 0.0722*texColor.b;\n gl_FragColor = vec4(gray, gray, gray, texColor.a);\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\n#if USE_TINT\n attribute vec4 a_color0;\n#endif\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n float gray = 0.2126*texColor.r + 0.7152*texColor.g + 0.0722*texColor.b;\n gl_FragColor = vec4(gray, gray, gray, texColor.a);\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TINT","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":[]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"passes":[{"program":"2d-spine-gray|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[42,"Char2_Animation","\r\nChar2_Animation.png\r\nsize: 636,268\r\nformat: RGBA8888\r\nfilter: Linear,Linear\r\nrepeat: none\r\nbody\r\n rotate: true\r\n xy: 299, 21\r\n size: 245, 223\r\n orig: 295, 283\r\n offset: 50, 1\r\n index: -1\r\ndrop\r\n rotate: false\r\n xy: 595, 87\r\n size: 28, 55\r\n orig: 30, 57\r\n offset: 1, 1\r\n index: -1\r\nhand_L\r\n rotate: false\r\n xy: 524, 144\r\n size: 110, 122\r\n orig: 112, 124\r\n offset: 1, 1\r\n index: -1\r\nhead\r\n rotate: false\r\n xy: 2, 2\r\n size: 295, 264\r\n orig: 303, 264\r\n offset: 0, 0\r\n index: -1\r\nsad\r\n rotate: true\r\n xy: 524, 5\r\n size: 137, 69\r\n orig: 139, 71\r\n offset: 1, 1\r\n index: -1\r\n",["Char2_Animation.png"],{"skeleton":{"hash":"MtR1eYjJJ1SMeKUUHuJqDVNfggE","spine":"3.8.99","x":-117.7,"y":-16.78,"width":313.89,"height":345.29,"images":"./Char2_PNGs/","audio":"E:/NGHI/Elofun/Zig Zac/Animation/Character_Animation2/Char2"},"bones":[{"name":"root"},{"name":"All","parent":"root"},{"name":"body","parent":"All","length":30.54,"rotation":42.51,"x":-9.05,"y":24.95,"color":"ff4343ff"},{"name":"body2","parent":"body","length":25.42,"rotation":-5.01,"x":36.88,"y":-0.72,"color":"ff4343ff"},{"name":"body3","parent":"body2","length":27.9,"rotation":-10.51,"x":36.83,"y":-2.85,"color":"ff4343ff"},{"name":"body4","parent":"body3","length":23.6,"rotation":-6.04,"x":39.43,"y":-0.09,"color":"ff4343ff"},{"name":"body5","parent":"body4","length":30.27,"rotation":-8.43,"x":32.22,"y":0.21,"color":"ff4343ff"},{"name":"body6","parent":"body5","length":24.21,"rotation":-56.74,"x":37.59,"y":-1.63,"color":"ff4343ff"},{"name":"body7","parent":"body","length":31.31,"rotation":-51.13,"x":8.96,"y":-15.21},{"name":"body8","parent":"body7","length":28.62,"rotation":10.49,"x":44.43,"y":1.04},{"name":"body9","parent":"body8","length":24.03,"rotation":3.72,"x":33.31,"y":-0.15},{"name":"head","parent":"body2","length":30.93,"rotation":38.67,"x":-23.31,"y":54.12,"color":"ff4343ff"},{"name":"head2","parent":"head","length":32.45,"rotation":-6.15,"x":30.93,"color":"ff4343ff"},{"name":"head3","parent":"head2","length":41.53,"rotation":-5.73,"x":34.5,"y":-0.24,"color":"ff4343ff"},{"name":"head4","parent":"head3","length":40.97,"rotation":-34.55,"x":52.7,"y":-45.08,"color":"43ffbeff"},{"name":"head5","parent":"head4","length":34.68,"rotation":12.02,"x":48.25,"y":0.63,"color":"43ffbeff"},{"name":"head6","parent":"head5","length":31.82,"rotation":8.54,"x":38.98,"y":-0.74,"color":"43ffbeff"},{"name":"head7","parent":"head6","length":28.58,"rotation":5.24,"x":44.25,"y":-0.5,"color":"43ffbeff"},{"name":"head8","parent":"head7","length":29.73,"rotation":1.51,"x":33.86,"y":-1.98,"color":"43ffbeff"},{"name":"head9","parent":"head3","length":22.52,"rotation":51.22,"x":37.84,"y":39.03,"color":"43ff52ff"},{"name":"head10","parent":"head9","length":28.65,"rotation":-24.59,"x":28.54,"y":-1.34,"color":"43ff52ff"},{"name":"head11","parent":"head10","length":29.86,"rotation":-22.73,"x":28.65,"color":"43ff52ff"},{"name":"head12","parent":"head11","length":30.03,"rotation":-15.07,"x":29.86,"color":"43ff52ff"},{"name":"head13","parent":"head12","length":32.34,"rotation":-16.26,"x":34.56,"y":-0.65,"color":"43ff52ff"},{"name":"head14","parent":"head","x":51.72,"y":-104.55,"color":"ff4343ff"},{"name":"head15","parent":"head","x":50.08,"y":57.52,"color":"ff4343ff"},{"name":"hand_L","parent":"body","length":81.77,"rotation":168.98,"x":45.95,"y":65.11,"color":"ff4343ff"},{"name":"drop","parent":"head","length":33.71,"rotation":13.83,"x":47.73,"y":-79.8,"color":"ff4343ff"}],"slots":[{"name":"hand_L","bone":"hand_L","attachment":"hand_L"},{"name":"body","bone":"body","attachment":"body"},{"name":"head","bone":"head","attachment":"head"},{"name":"sad","bone":"head","attachment":"sad"},{"name":"drop","bone":"drop","attachment":"drop"}],"skins":[{"name":"default","attachments":{"body":{"body":{"type":"mesh","hull":74,"width":295,"height":283,"uvs":[0.29749,0.74853,0.24856,0.77084,0.17977,0.78518,0.17671,0.81865,0.17059,0.85849,0.20117,0.89833,0.25774,0.93339,0.33418,0.9557,0.3938,0.95889,0.44272,0.96048,0.53751,0.9812,0.61242,0.99395,0.69651,0.98439,0.76072,0.97164,0.81881,0.95889,0.89219,0.94295,0.93653,0.91905,0.92889,0.8824,0.89984,0.87124,0.81881,0.86487,0.75154,0.8569,0.80964,0.8314,0.81575,0.80112,0.78976,0.77881,0.74084,0.7804,0.68733,0.78359,0.63535,0.78359,0.61242,0.77084,0.6644,0.75809,0.71791,0.7549,0.78059,0.73419,0.80811,0.7071,0.84174,0.66247,0.87538,0.68957,0.90748,0.70869,0.94876,0.71188,0.98086,0.70391,1,0.68638,1,0.65291,0.98392,0.61307,0.95029,0.5796,0.92736,0.53179,0.90595,0.49673,0.87232,0.4792,0.84021,0.4792,0.87538,0.43618,0.90137,0.39315,0.91207,0.34375,0.90901,0.3055,0.90595,0.24813,0.89831,0.21625,0.87232,0.20988,0.85703,0.24813,0.82951,0.28637,0.78365,0.32622,0.75636,0.34664,0.72402,0.37084,0.67204,0.38837,0.60478,0.40112,0.55127,0.4043,0.49317,0.4043,0.44731,0.4043,0.40603,0.4043,0.35558,0.4043,0.30054,0.41546,0.25162,0.44096,0.22105,0.46486,0.19811,0.49195,0.19047,0.52861,0.18282,0.56207,0.18588,0.62263,0.20576,0.66566,0.23939,0.70072,0.27608,0.72303,0.27302,0.84415,0.3617,0.85052,0.46718,0.87761,0.59866,0.89196,0.71027,0.90471,0.34947,0.77403,0.48094,0.79315,0.56656,0.79475,0.41368,0.78996,0.24245,0.56367,0.32348,0.58917,0.38463,0.60032,0.47024,0.59076,0.56656,0.5812,0.6644,0.55729,0.73167,0.53339,0.80047,0.50311,0.43661,0.69116,0.55433,0.69275,0.6751,0.67044,0.74849,0.63697,0.3617,0.48399,0.4626,0.49514,0.55127,0.48558,0.643,0.47602,0.71485,0.45211,0.76989,0.41865,0.81728,0.38359,0.85703,0.33578,0.87691,0.29116,0.83257,0.58279,0.89372,0.60032,0.9136,0.64176,0.94417,0.67044,0.33418,0.68638,0.24856,0.65291,0.53445,0.88718,0.79588,0.90949,0.87232,0.90789],"triangles":[52,50,49,50,52,51,103,52,49,53,52,103,103,49,48,102,53,103,54,53,102,101,54,102,55,54,101,102,48,47,48,102,103,46,102,47,101,102,46,100,55,101,56,55,100,45,101,46,99,57,56,99,56,100,98,58,57,98,57,99,44,101,45,100,101,44,95,63,62,64,63,95,97,59,58,97,58,98,96,61,60,90,100,44,99,100,90,89,99,90,98,99,89,88,98,89,83,66,65,67,66,83,68,67,83,69,68,83,65,64,95,87,97,98,87,98,88,104,90,44,89,90,104,95,83,65,84,83,95,62,61,96,95,62,96,97,86,96,60,59,97,97,96,60,86,97,87,85,95,96,85,96,86,84,95,85,42,104,43,41,104,42,105,41,40,70,69,83,94,89,104,88,89,94,104,44,43,104,41,105,106,105,40,106,40,39,109,83,84,70,83,109,32,104,105,32,105,106,94,104,32,71,70,109,93,88,94,87,88,93,107,106,39,107,39,38,108,84,85,109,84,108,107,38,37,33,32,106,34,33,106,91,85,86,108,85,91,92,86,87,92,87,93,91,86,92,72,71,109,73,72,109,36,107,37,31,94,32,107,34,106,35,107,36,34,107,35,108,73,109,30,94,31,29,93,94,0,73,108,30,29,94,93,27,92,28,93,29,28,27,93,79,108,91,0,108,79,82,79,91,80,91,92,81,80,92,82,91,80,27,81,92,21,23,22,74,1,0,74,0,79,75,79,82,74,79,75,20,24,23,20,23,21,76,82,80,75,82,76,110,80,81,76,80,110,81,27,26,77,81,26,110,81,77,3,1,74,1,3,2,74,4,3,5,4,74,20,78,25,20,25,24,112,19,18,111,20,19,111,19,112,78,20,111,6,5,74,112,16,15,17,112,18,16,112,17,7,74,75,6,74,7,8,75,76,7,75,8,14,111,112,14,112,15,9,8,76,13,78,111,13,111,14,10,110,77,26,25,78,77,26,78,9,76,110,10,9,110,12,77,78,12,78,13,11,10,77,12,11,77],"vertices":[3,2,10.71,27.79,0.86194,3,-28.56,26.12,0.13734,4,-69.58,16.55,0.00072,2,2,-4.2,32.89,0.99196,3,-43.85,29.9,0.00804,1,2,-21.9,43.61,1,1,2,-28.97,37.24,1,1,2,-37.92,30.14,1,2,8,-54.12,-17.82,0.01418,2,-38.89,15.74,0.98582,2,8,-36.14,-25.13,0.13738,2,-33.29,-2.85,0.86262,2,8,-12.9,-28,0.60538,2,-20.93,-22.74,0.39462,3,9,-44.11,-19.59,0.00055,8,4.63,-26.26,0.94377,2,-8.58,-35.29,0.05568,2,9,-29.7,-20.51,0.06433,8,18.97,-24.54,0.93567,3,10,-36.94,-24.79,0.00593,9,-1.94,-27.29,0.73868,8,47.49,-26.15,0.25539,3,10,-15.3,-30.54,0.20795,9,20.02,-31.62,0.78127,8,69.88,-26.4,0.01078,2,10,9.65,-30.26,0.81164,9,44.9,-29.73,0.18836,2,10,28.85,-28.52,0.99281,9,63.95,-26.74,0.00719,1,10,46.26,-26.6,1,1,10,68.25,-24.23,1,1,10,81.92,-18.77,1,1,10,80.69,-8.23,1,1,10,72.47,-4.25,1,1,10,48.86,-0.12,1,3,10,29.33,4.06,0.99663,9,62.31,5.8,0.00303,4,35.85,-71.58,0.00034,1,10,47.09,9.57,1,1,10,49.72,17.92,1,3,10,42.71,24.95,0.99643,9,74.31,27.52,0.00331,4,55.93,-57,0.00026,3,10,28.3,25.91,0.9445,9,59.87,27.54,0.04788,4,42.87,-50.85,0.00762,5,10,12.5,26.55,0.71269,9,44.06,27.16,0.23477,3,56.63,-51.77,0.00064,4,28.39,-44.49,0.05148,5,-6.31,-45.32,0.00041,6,10,-2.76,28.05,0.25138,9,28.74,27.66,0.49775,8,67.65,33.47,0.00021,3,44.47,-42.44,0.01733,4,14.73,-37.53,0.22044,5,-20.63,-39.84,0.01288,7,10,-9.14,32.3,0.05725,9,22.09,31.49,0.37067,8,60.42,36.02,0.00337,3,41.3,-35.45,0.03465,4,10.34,-31.25,0.47823,5,-25.65,-34.05,0.05545,6,-52.23,-42.37,0.00038,6,10,6.47,34.4,0.00269,9,37.54,34.59,0.10042,3,55.66,-41.93,0.00061,4,25.64,-34.99,0.52225,5,-10.04,-36.16,0.35297,6,-36.48,-42.18,0.02107,4,9,53.34,34.97,0.03271,4,40.11,-41.35,0.27667,5,5.02,-40.97,0.58827,6,-20.88,-44.72,0.10235,5,9,72.02,40.23,0.00769,4,59.25,-44.52,0.0935,5,24.38,-42.1,0.58795,6,-1.55,-43.01,0.30045,7,13.14,-55.43,0.01041,5,9,80.38,47.62,0.00257,4,69.96,-41.38,0.04151,5,34.71,-37.85,0.47642,6,8.03,-37.29,0.43263,7,13.61,-44.27,0.04686,5,9,90.71,59.92,0.00004,4,84.54,-34.63,0.00333,5,48.49,-29.6,0.14559,6,20.46,-27.11,0.51623,7,11.91,-28.3,0.33481,3,5,55.01,-40.31,0.02575,6,28.48,-36.75,0.22252,7,24.37,-26.88,0.75174,3,5,61.92,-48.75,0.00571,6,36.55,-44.09,0.0968,7,34.93,-24.15,0.89749,3,5,72.97,-53.95,0.00021,6,48.24,-47.61,0.02503,7,44.29,-16.31,0.97476,2,6,57.98,-47.46,0.00427,7,49.51,-8.09,0.99573,1,7,50.09,-0.59,1,1,7,43.49,6.19,1,1,7,32.23,10.97,1,1,7,18.51,10.84,1,2,6,53.14,3.51,0.01738,7,4.23,15.82,0.98262,2,6,49.13,14.57,0.27497,7,-7.22,18.52,0.72503,3,5,75.46,15.61,0.00053,6,40.52,21.56,0.59741,7,-17.79,15.16,0.40206,3,5,66.62,18.99,0.01098,6,31.27,23.62,0.89219,7,-24.58,8.56,0.09684,3,5,80.66,26.65,0.00796,6,44.04,33.25,0.98681,7,-25.63,24.52,0.00523,2,5,92.17,35.28,0.00165,6,54.16,43.48,0.99835,1,6,60.28,56.44,1,1,6,61.75,67.2,1,1,6,64.39,83.25,1,1,6,64.14,92.54,1,1,6,57.05,95.97,1,2,5,94.64,78.29,0.00064,6,50.3,86.38,0.99936,2,5,83.19,71.08,0.00858,6,40.03,77.57,0.99142,4,3,157.98,33.61,0.00019,4,112.46,57.94,0.00184,5,66.52,65.39,0.05039,6,24.37,69.5,0.94758,4,3,148.07,33.93,0.00155,4,102.67,56.45,0.00766,5,56.93,62.87,0.09907,6,15.26,65.6,0.89172,4,3,136.34,34.3,0.00725,4,91.06,54.68,0.02643,5,45.58,59.89,0.19126,6,4.46,60.99,0.77507,5,2,161.03,28.26,0.00066,3,121.15,39.7,0.03055,4,75.14,57.22,0.08964,5,29.48,60.74,0.34435,6,-11.58,59.47,0.5348,5,2,143.97,39.01,0.00889,3,103.21,48.92,0.1021,4,55.82,63.01,0.22659,5,9.66,64.47,0.4103,6,-31.74,60.26,0.25212,5,2,131.72,49.01,0.0287,3,90.14,57.82,0.19851,4,41.35,69.37,0.32292,5,-5.4,69.27,0.33673,6,-47.34,62.8,0.11315,5,2,119.09,60.59,0.06775,3,76.55,68.25,0.32066,4,26.08,77.15,0.34841,5,-21.41,75.4,0.22334,6,-64.07,66.52,0.03984,5,2,109.11,69.73,0.11059,3,65.81,76.49,0.40855,4,14.02,83.29,0.31827,5,-34.04,80.24,0.14847,6,-77.28,69.45,0.01412,5,2,100.14,77.96,0.15534,3,56.15,83.9,0.46986,4,3.17,88.82,0.27183,5,-45.41,84.6,0.0988,6,-89.17,72.09,0.00417,5,2,89.17,88.02,0.20932,3,44.35,92.96,0.51595,4,-10.09,95.57,0.21473,5,-59.31,89.92,0.05964,6,-103.69,75.32,0.00037,4,2,75.06,96.66,0.26384,3,29.54,100.34,0.53991,4,-25.99,100.13,0.16234,5,-75.6,92.78,0.03391,4,2,59.55,101.1,0.31449,3,13.7,103.41,0.54647,4,-42.12,100.25,0.12065,5,-91.66,91.2,0.01838,4,2,48.33,102.2,0.34677,3,2.43,103.53,0.54429,4,-53.23,98.32,0.09753,5,-102.5,88.11,0.01142,4,2,38.16,101.12,0.37148,3,-7.61,101.57,0.53916,4,-62.74,94.56,0.08188,5,-111.56,83.37,0.00748,4,2,29.49,95,0.39928,3,-15.71,94.71,0.52961,4,-69.46,86.34,0.06665,5,-117.38,74.49,0.00446,4,2,21.43,89.54,0.42878,3,-23.27,88.57,0.51636,4,-75.77,78.92,0.0526,5,-122.87,66.45,0.00226,4,2,10.51,76.3,0.48138,3,-32.99,74.43,0.48575,4,-82.74,63.24,0.03261,5,-128.16,50.12,0.00026,3,2,6.61,63.36,0.52345,3,-35.75,61.2,0.45488,4,-83.04,49.73,0.02166,3,2,7.22,49.34,0.58255,3,-33.92,47.29,0.40466,4,-78.71,36.39,0.01279,3,2,10.93,37.38,0.68002,3,-29.17,35.69,0.3141,4,-71.93,25.85,0.00588,2,8,-35.46,0.51,0.00883,2,-12.9,12.72,0.99117,2,8,-9.33,2.65,0.33086,2,5.17,-6.29,0.66914,2,9,-21.72,2.69,0.00016,8,22.59,-0.27,0.99984,1,9,16.91,-2.64,1,1,10,15.89,-8.22,1,2,2,17.13,12.11,0.96265,3,-20.79,11.06,0.03735,5,9,-16.88,26.45,0.08692,8,23.02,23.97,0.29192,2,42.07,-18.09,0.03985,3,6.69,-16.85,0.5355,4,-27.09,-19.27,0.0458,6,10,-23.27,26.89,0.00918,9,8.35,25.17,0.49659,8,48.06,27.31,0.05101,3,26.45,-32.58,0.14639,4,-4.79,-31.13,0.2925,5,-40.71,-35.53,0.00433,4,9,-36.68,28,0.00027,8,3.26,21.89,0.08587,2,28.05,-4.02,0.90366,3,-8.51,-4.05,0.0102,4,2,34.09,77.33,0.4121,3,-9.59,77.51,0.52181,4,-60.3,70.54,0.06175,5,-106.61,59.74,0.00435,4,2,46.83,55.85,0.35931,3,4.98,57.23,0.54541,4,-42.28,53.26,0.08554,5,-86.87,44.45,0.00975,4,2,58,41.34,0.24475,3,17.37,43.74,0.5999,4,-27.63,42.26,0.13833,5,-71.15,35.05,0.01701,5,2,78.44,26.27,0.0701,3,39.05,30.51,0.48193,4,-3.9,33.2,0.39686,5,-46.6,28.54,0.05034,6,-82.12,16.47,0.00078,5,2,101.22,9.06,0.00706,3,63.24,15.36,0.10602,4,22.64,22.72,0.6616,5,-19.09,20.91,0.2138,6,-53.8,12.95,0.01151,5,2,127.07,-5.46,0.00005,3,90.26,3.15,0.01271,4,51.43,15.64,0.0756,5,10.28,16.9,0.80449,6,-24.15,13.29,0.10714,4,3,110.12,-3.56,0.00208,4,72.19,12.66,0.0057,5,31.23,16.13,0.3356,6,-3.31,15.59,0.65661,5,3,131.44,-9.12,0.00003,4,94.16,11.09,0.0002,5,53.25,16.87,0.0321,6,18.36,19.56,0.96097,7,-28.26,-4.47,0.00669,4,2,51.93,12.03,0.1028,3,13.88,14.01,0.87503,4,-25.64,12.39,0.02176,5,-66.02,5.56,0.0004,3,9,5.69,54.13,0.01963,8,40.17,55.31,0.00111,4,5.1,-3.78,0.97926,4,9,41.51,59.28,0.01665,4,39.71,-14.32,0.27207,5,1.78,-14.13,0.6955,6,-28.02,-18.65,0.01578,5,9,63.45,68.03,0.00129,4,63.3,-15.71,0.01672,5,25.38,-13.03,0.63466,6,-4.83,-14.1,0.34382,7,-12.84,-42.32,0.00352,5,2,75.26,70.18,0.22028,3,32.05,73.98,0.52776,4,-18.72,74.66,0.20216,5,-65.69,68.22,0.04964,6,-106.82,52.92,0.00017,5,2,95.07,47.74,0.09347,3,53.74,53.35,0.40192,4,6.37,58.34,0.35574,5,-39.02,54.62,0.13748,6,-78.45,43.38,0.01139,5,2,116.18,32.06,0.02519,3,76.14,39.57,0.19293,4,30.91,48.88,0.38395,5,-13.63,47.79,0.32409,6,-52.33,40.35,0.07384,5,2,137.95,15.77,0.00223,3,99.25,25.24,0.05135,4,56.25,39,0.16301,5,12.61,40.64,0.49367,6,-25.33,37.12,0.28974,4,3,120.19,17.71,0.01168,4,78.21,35.41,0.04023,5,34.82,39.38,0.29733,6,-3.17,39.12,0.65076,4,3,138.83,15.33,0.00198,4,96.97,36.48,0.00889,5,53.37,42.42,0.11927,6,14.74,44.85,0.86985,4,3,155.97,14.69,0.00005,4,113.93,38.97,0.00092,5,69.98,46.68,0.03955,6,30.54,51.5,0.95948,2,5,85.77,55.12,0.0079,6,44.92,62.16,0.9921,2,5,95.76,64.82,0.00126,6,53.38,73.22,0.99874,3,5,54.03,-7.58,0.00895,6,22.71,-4.51,0.93493,7,-5.75,-14.03,0.05611,3,5,69.1,-18.66,0.00363,6,39.24,-13.27,0.1181,7,10.64,-5,0.87827,3,5,70.38,-31.71,0.00501,6,42.42,-25.99,0.08352,7,23.02,-9.32,0.91147,3,5,75.9,-42.52,0.00035,6,49.47,-35.87,0.02381,7,35.14,-8.85,0.97585,4,2,30.57,33.44,0.56683,3,-9.26,33.48,0.41809,4,-51.95,27.31,0.01466,5,-93.76,17.63,0.00042,4,2,18.35,57.49,0.52707,3,-23.53,56.37,0.45,4,-70.16,47.21,0.02268,5,-113.96,35.51,0.00025,2,9,-1.97,-0.67,0.91619,8,42.61,0.03,0.08381,1,10,40.89,-12.03,1,1,10,63.38,-13.78,1],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,74,76,76,78,78,80,80,82,82,84,84,86,86,88,88,90,90,92,92,94,94,96,96,98,98,100,100,102,102,104,104,106,106,108,108,110,110,112,112,114,114,116,116,118,118,120,120,122,122,124,124,126,126,128,128,130,130,132,132,134,134,136,136,138,138,140,140,142,142,144,144,146,0,146]}},"drop":{"drop":{"x":17.66,"y":1.77,"rotation":-90,"width":30,"height":57}},"hand_L":{"hand_L":{"x":35.47,"y":-23.5,"rotation":148.51,"width":112,"height":124}},"head":{"head":{"type":"mesh","hull":80,"width":303,"height":264,"uvs":[0.38103,1,0.46776,0.9891,0.54004,0.96753,0.5863,0.94928,0.64845,0.9244,0.67014,0.89785,0.6658,0.87131,0.69327,0.82817,0.7135,0.78835,0.71061,0.75351,0.67736,0.74522,0.64556,0.74356,0.6181,0.67885,0.60509,0.64899,0.67401,0.63283,0.73762,0.59135,0.80122,0.55154,0.84892,0.50674,0.88506,0.45697,0.89374,0.3906,0.90241,0.34415,0.93132,0.27779,0.95878,0.21308,0.96746,0.15335,0.97179,0.09363,0.97324,0.04219,0.94722,0.04385,0.90241,0.07538,0.84748,0.10524,0.80267,0.14506,0.75063,0.19317,0.70726,0.24129,0.6451,0.30101,0.58873,0.35742,0.53524,0.40719,0.48609,0.45365,0.4514,0.48849,0.41381,0.46858,0.36178,0.4636,0.31118,0.4636,0.26637,0.47522,0.26348,0.39558,0.26203,0.3259,0.2736,0.25456,0.30395,0.18654,0.32997,0.1434,0.36611,0.0986,0.4037,0.06542,0.42538,0.0339,0.42972,0,0.40225,0,0.34877,0,0.31263,0.02726,0.26348,0.06874,0.23457,0.09694,0.19409,0.13842,0.17096,0.18654,0.14639,0.1716,0.12182,0.19317,0.09724,0.23631,0.08712,0.29438,0.07845,0.37069,0.08134,0.43706,0.0958,0.48517,0.10881,0.52167,0.13916,0.55319,0.11459,0.58306,0.0929,0.62785,0.04954,0.62288,0.03075,0.65606,0,0.66767,0,0.74067,0.03219,0.7921,0.05532,0.83026,0.08279,0.88003,0.11314,0.91819,0.1435,0.95303,0.18686,0.97294,0.2418,0.99119,0.30251,1,0.15651,0.89663,0.17675,0.81533,0.21578,0.74731,0.25914,0.64444,0.29094,0.56813,0.33286,0.51669,0.33142,0.96133,0.35744,0.87838,0.39213,0.81699,0.42249,0.7191,0.45863,0.64776,0.46585,0.5814,0.48754,0.9381,0.53524,0.86676,0.55114,0.79542,0.56415,0.72574,0.56849,0.67431,0.10591,0.85017,0.0958,0.77717,0.10013,0.71413,0.12037,0.64113,0.17819,0.65606,0.223,0.57144,0.3213,0.73569,0.38346,0.61624,0.48465,0.81201,0.51789,0.7191,0.26203,0.87672,0.24613,0.93478,0.45863,0.86842,0.42393,0.94308,0.56849,0.53992,0.65088,0.48517,0.73617,0.41549,0.79399,0.34249,0.85181,0.27115,0.90964,0.1716,0.19265,0.48185,0.1912,0.37899,0.1912,0.29769,0.23168,0.19981,0.26203,0.15004,0.29383,0.1069,0.35166,0.05547],"triangles":[74,73,97,73,98,97,97,98,81,73,72,98,98,99,81,82,81,99,82,99,101,101,99,100,98,72,99,99,72,71,99,71,69,99,69,67,69,68,67,71,70,69,99,67,100,67,66,100,101,100,66,0,110,1,110,87,109,87,88,109,1,92,2,1,110,92,3,2,93,2,92,93,4,3,93,6,4,93,110,109,92,94,6,93,94,95,11,92,109,93,4,6,5,6,94,11,7,11,10,7,6,11,109,105,93,109,88,105,93,105,94,8,10,9,8,7,10,88,89,105,105,106,94,94,106,95,121,122,45,122,54,53,45,122,46,122,123,46,122,52,123,122,53,52,46,123,47,48,47,50,52,51,123,47,123,50,123,51,50,48,50,49,43,120,44,56,55,120,120,121,44,120,55,121,44,121,45,55,54,121,122,121,54,118,119,42,119,60,59,119,59,56,59,58,56,58,57,56,42,119,43,119,120,43,119,56,120,118,117,62,119,118,61,62,61,118,117,118,41,118,42,41,60,119,61,101,66,65,101,102,83,101,65,102,65,117,102,102,40,84,102,117,40,65,64,117,117,64,63,117,41,40,63,62,117,22,21,116,116,29,28,22,116,23,28,27,116,116,27,23,23,27,24,27,26,24,24,26,25,114,115,20,20,115,21,114,30,115,30,29,115,115,29,116,21,115,116,16,15,113,16,113,17,17,113,18,113,33,32,113,114,18,18,114,19,113,32,114,114,32,31,19,114,20,31,30,114,111,34,112,111,112,14,14,112,15,15,112,113,34,33,112,112,33,113,13,111,14,96,13,12,96,111,13,95,96,12,105,89,106,95,106,96,89,90,106,106,90,96,90,91,96,91,111,96,90,104,91,104,36,91,111,36,35,111,91,36,35,34,111,95,12,11,82,83,103,88,87,103,88,103,89,103,83,104,103,104,89,104,83,84,83,102,84,84,85,104,104,85,37,104,37,36,37,85,38,85,40,39,85,84,40,85,39,38,89,104,90,107,82,103,82,101,83,79,86,0,0,86,110,86,79,108,79,78,108,78,77,108,108,77,80,108,107,86,86,87,110,86,107,87,77,76,80,76,75,80,108,80,107,74,97,75,75,97,80,80,81,107,80,97,81,81,82,107,87,107,103],"vertices":[5,11,-1.33,-51.38,0.56571,12,-26.56,-54.55,0.10519,13,-55.33,-60.13,0.01517,14,-80.45,-73.66,0.00363,24,-53.04,53.16,0.3103,5,11,7.75,-76.21,0.29343,12,-14.87,-78.26,0.08828,13,-41.34,-82.56,0.02282,14,-56.21,-84.2,0.0062,24,-43.97,28.33,0.58926,5,11,18.51,-96.12,0.11924,12,-2.04,-96.9,0.04061,13,-26.71,-99.82,0.01107,14,-34.37,-90.12,0.00078,24,-33.21,8.43,0.8283,4,11,26.54,-108.58,0.04165,12,7.28,-108.42,0.01346,13,-16.29,-110.36,0.00232,24,-25.18,-4.03,0.94258,3,11,37.42,-125.3,0.00188,12,19.89,-123.88,0.0002,24,-14.3,-20.75,0.99792,1,24,-5.92,-25.45,1,2,14,11.32,-86.97,0.00551,24,0.57,-22.5,0.99449,2,14,24.2,-81.21,0.03771,24,13.62,-27.86,0.96229,2,14,34.74,-75.12,0.06109,24,25.29,-31.3,0.93891,2,14,38.54,-66.7,0.0717,24,34.01,-28.25,0.9283,2,14,30.88,-59.8,0.10946,24,33.73,-17.95,0.89054,2,14,22.73,-54.64,0.22207,24,31.85,-8.49,0.77793,3,12,77.67,-93.08,0.00004,14,23.98,-35.68,0.99042,15,-31.3,-30.47,0.00955,2,14,24.47,-26.88,0.82798,15,-28.99,-21.96,0.17202,3,14,44.72,-33.54,0.48335,15,-10.57,-32.69,0.5084,16,-53.74,-24.24,0.00825,2,15,11.1,-37.35,0.85498,16,-33.01,-32.07,0.14502,4,14,88.83,-34.03,0.00094,15,32.48,-42.35,0.52312,16,-12.61,-40.18,0.471,17,-60.24,-34.33,0.00495,3,15,51.13,-43.15,0.22204,16,5.72,-43.75,0.7316,17,-42.31,-39.56,0.04635,4,15,68.05,-40.64,0.06934,16,22.83,-43.78,0.7893,17,-25.28,-41.15,0.14113,18,-60.15,-37.6,0.00023,4,15,81.68,-29.33,0.00807,16,37.98,-34.61,0.61141,17,-9.35,-33.4,0.36484,18,-44.02,-30.27,0.01567,3,16,49.1,-28.8,0.3009,17,2.25,-28.63,0.62004,18,-32.3,-25.81,0.07905,3,16,68.17,-24.35,0.017,17,21.65,-25.94,0.53883,18,-12.83,-23.63,0.44417,2,17,40.44,-23.13,0.0473,18,6.03,-21.32,0.9527,1,18,20.69,-14.95,1,1,18,34.63,-7.48,1,1,18,46.27,-0.46,1,1,18,41.61,5.92,1,2,17,60.75,11.52,0.02695,18,27.24,12.79,0.97305,2,17,44.84,20.78,0.39447,18,11.57,22.46,0.60553,3,16,70.24,28.03,0.0268,17,28.48,26.03,0.89375,18,-4.63,28.14,0.07945,3,15,84.05,38.43,0.01025,16,50.39,32.04,0.22575,17,9.09,31.84,0.764,3,15,65.79,37.71,0.09189,16,32.22,34.04,0.55686,17,-8.82,35.49,0.35125,4,14,80.57,46.86,0.01813,15,41.24,38.49,0.47591,16,8.06,38.46,0.47099,17,-32.48,42.1,0.03497,3,14,58.35,42.41,0.16796,15,18.58,38.76,0.72965,16,-14.31,42.09,0.10239,4,13,105.94,-34.34,0.01242,14,37.76,39.04,0.52632,15,-2.26,39.75,0.45738,16,-34.77,46.17,0.00388,3,13,88.43,-26.24,0.0993,14,18.75,35.78,0.76449,15,-21.54,40.52,0.13621,4,13,75.59,-20.76,0.3311,14,5.06,33.01,0.64441,15,-35.5,40.66,0.02334,19,-22.97,-66.88,0.00115,4,13,75.38,-8.22,0.60435,14,-2.22,43.22,0.37298,15,-40.5,52.17,0.00179,19,-13.33,-58.86,0.02088,3,13,69.73,6.56,0.74667,14,-15.26,52.19,0.137,19,-5.35,-45.2,0.11632,4,13,63.07,20.37,0.62366,14,-28.57,59.79,0.02305,19,1.25,-31.36,0.35032,20,-12.32,-38.66,0.00297,5,13,54.42,31.27,0.21634,14,-41.88,63.87,0.00013,19,4.34,-17.79,0.71467,20,-15.16,-25.03,0.06751,21,-30.74,-40.01,0.00135,4,13,72.98,41.18,0.00347,19,23.69,-26.05,0.31365,20,5.87,-24.5,0.58529,21,-11.55,-31.39,0.0976,4,19,40.48,-33.58,0.03426,20,24.27,-24.35,0.4061,21,5.37,-24.15,0.5463,22,-17.36,-29.69,0.01334,3,20,43.05,-28.16,0.03203,21,24.16,-20.41,0.619,22,-0.19,-21.19,0.34897,3,21,44.25,-22.28,0.0689,22,19.69,-17.78,0.81925,23,-9.47,-20.61,0.11186,3,21,57.75,-25.37,0.00008,22,33.53,-17.25,0.34198,23,3.67,-16.23,0.65794,2,22,49.56,-18.91,0.00007,23,19.52,-13.33,0.99993,1,23,33.89,-13.16,1,1,23,44.14,-10.44,1,1,23,50.56,-4.07,1,1,23,43.9,0.92,1,1,23,30.94,10.64,1,1,23,17.86,11.46,1,2,22,37.21,10.69,0.32339,23,-0.63,11.63,0.67661,2,22,26,13.23,0.96689,23,-12.1,10.93,0.03311,2,21,43.68,13.34,0.08622,22,9.88,16.48,0.91378,2,21,29.28,15.13,0.80587,22,-4.48,14.46,0.19413,3,20,65.57,10.02,0.00735,21,30.18,23.51,0.93965,22,-5.8,22.78,0.053,3,20,59.99,17.56,0.03787,21,22.13,28.31,0.95427,22,-14.82,25.32,0.00786,2,20,48.73,25.19,0.17905,21,8.79,30.99,0.82095,2,20,33.45,28.5,0.52894,21,-6.58,28.14,0.47106,3,19,53.76,21.71,0.05563,20,13.34,31.45,0.87929,21,-26.27,23.1,0.06508,3,19,37.58,28.47,0.32641,20,-4.19,30.86,0.67087,25,71.2,14.8,0.00271,4,12,71.64,73.12,0.00053,19,24.23,29.99,0.64326,20,-16.96,26.69,0.33843,25,59.91,7.51,0.01778,4,12,63.93,66.13,0.00441,19,13.83,30.58,0.80455,20,-26.66,22.9,0.14379,25,51.5,1.38,0.04724,5,12,59.25,54.64,0.02714,13,19.15,57.07,0.0172,19,2.36,25.86,0.77283,20,-35.13,13.84,0.01735,25,45.62,-9.54,0.16549,5,12,49.3,58.94,0.05301,13,8.82,60.36,0.03323,19,-1.55,35.98,0.52367,20,-42.89,21.41,0.00063,25,36.18,-4.2,0.38946,4,12,35.94,61.07,0.04273,13,-4.69,61.15,0.02139,19,-9.39,47,0.2169,25,23.13,-0.65,0.71898,4,12,32.68,73.87,0.00485,13,-9.2,73.56,0.00224,19,-2.55,58.3,0.06488,25,21.26,12.43,0.92803,3,12,22.5,76.23,0.00006,19,-8,67.21,0.02095,25,11.39,15.86,0.97899,2,19,-6.75,76.94,0.00162,25,6.19,24.18,0.99838,2,11,37.56,77.08,0.0149,25,-12.52,19.57,0.9851,3,11,26.7,64.37,0.12288,12,-11.1,63.54,0.00674,25,-23.38,6.85,0.87038,3,11,18.6,55.16,0.29616,12,-18.17,53.52,0.02543,25,-31.48,-2.36,0.67841,3,11,7.83,43.93,0.55599,12,-27.68,41.2,0.02417,25,-42.25,-13.58,0.41984,3,11,0.24,32.59,0.76528,12,-34,29.12,0.00599,25,-49.84,-24.92,0.22873,2,11,-6.49,21.46,0.8974,25,-56.57,-36.05,0.1026,2,11,-8.45,7.45,0.97848,25,-58.53,-50.07,0.02152,3,11,-9.15,-9.86,0.97604,12,-38.79,-14.1,0.00308,24,-60.87,94.68,0.02088,5,11,-7.01,-28.28,0.83659,12,-34.69,-32.19,0.04806,13,-65.65,-38.69,0.00148,14,-101.11,-61.85,0.00005,24,-58.73,76.26,0.11382,3,11,8.91,21.2,0.83551,12,-24.16,18.71,0.01229,25,-41.17,-36.32,0.1522,5,11,31.22,20.37,0.45342,12,-1.9,20.29,0.31111,13,-38.26,16.79,0.00228,19,-65,45.39,0.00459,25,-18.86,-37.14,0.2286,5,11,51.48,13.18,0.03152,12,19.02,15.31,0.70718,13,-16.95,13.92,0.07761,19,-53.89,26.99,0.03652,25,1.4,-44.33,0.14717,4,12,49.03,12.24,0.10843,13,13.22,13.87,0.67212,19,-35.04,3.43,0.16921,25,30.91,-50.6,0.05023,4,12,71.26,10.07,0.00409,13,35.55,13.92,0.70787,19,-21.01,-13.94,0.28443,25,52.78,-55.14,0.0036,3,13,53.3,8.37,0.79027,14,-29.82,44.36,0.03647,19,-14.22,-31.26,0.17327,5,11,4.99,-34.35,0.72262,12,-22.1,-36.93,0.09384,13,-52.66,-42.16,0.00851,14,-88.44,-57.34,0.00298,24,-46.72,70.2,0.17205,5,11,28.14,-36.77,0.43922,12,1.17,-36.86,0.2541,13,-29.5,-39.76,0.06801,14,-70.73,-42.23,0.03392,24,-23.57,67.78,0.20475,5,11,46.39,-43.1,0.18973,12,20,-41.2,0.24806,13,-10.34,-42.2,0.2076,14,-53.56,-33.38,0.11357,24,-5.33,61.44,0.24104,5,11,73.68,-45.86,0.03233,12,47.43,-41.01,0.06781,13,16.93,-39.28,0.39731,14,-32.75,-15.5,0.34836,24,21.97,58.69,0.15419,5,11,94.59,-51.99,0.00393,12,68.87,-44.86,0.00744,13,38.65,-40.97,0.22001,14,-13.9,-4.58,0.70772,24,42.87,52.56,0.06089,3,13,55.39,-35.35,0.17404,14,-3.31,9.54,0.82556,15,-48.57,19.45,0.0004,5,11,22.25,-78.82,0.21075,12,-0.17,-79.29,0.07519,13,-26.61,-82.12,0.02662,14,-44.32,-75.48,0.01514,24,-29.46,25.73,0.6723,5,11,44,-88.35,0.06503,12,22.47,-86.44,0.03395,13,-3.37,-86.97,0.02606,14,-22.43,-66.3,0.0548,24,-7.72,16.2,0.82016,5,11,63.44,-88.53,0.01951,12,41.81,-84.53,0.01778,13,15.69,-83.14,0.02955,14,-8.9,-52.34,0.22251,24,11.72,16.02,0.71065,5,11,82.24,-87.96,0.00421,12,60.45,-81.95,0.00625,13,33.97,-78.71,0.01527,14,3.65,-38.32,0.501,24,30.52,16.59,0.47327,5,11,95.74,-85.99,0.00102,12,73.66,-78.54,0.00231,13,46.78,-74.01,0.00436,14,11.52,-27.18,0.99082,15,-41.71,-19.56,0.00149,3,11,17.16,39.01,0.51196,12,-17.87,37.31,0.04736,25,-32.92,-18.5,0.44068,5,11,35.14,46.6,0.18639,12,-0.81,46.78,0.07802,13,-39.82,43.26,0.0019,19,-45.34,63.19,0.00358,25,-14.94,-10.92,0.73011,5,11,51.61,49.3,0.02141,12,15.28,51.23,0.06659,13,-24.26,49.3,0.01234,19,-30.89,54.84,0.03725,25,1.53,-8.22,0.86241,4,12,35.49,52.06,0.07964,13,-4.23,52.13,0.04354,19,-16.14,41,0.27649,25,21.71,-9.56,0.60033,5,11,72.15,30,0.00108,12,37.77,34.24,0.19564,13,-0.18,34.63,0.17059,19,-27.24,26.89,0.29942,25,22.07,-27.52,0.33328,4,12,63.4,29.12,0.03408,13,25.83,32.09,0.2114,19,-12.93,5.01,0.69498,25,47.01,-35.36,0.05954,5,11,62.1,-17.13,0.02108,12,32.83,-13.69,0.25996,13,-0.32,-13.55,0.64316,14,-61.55,-4.09,0.04278,24,10.38,87.41,0.03301,4,11,97.22,-27.88,0.00023,13,36.27,-16.84,0.75194,14,-29.55,13.94,0.2383,24,45.51,76.66,0.00953,5,11,54.37,-70.01,0.08619,12,30.81,-67.09,0.07594,13,3,-66.89,0.10606,14,-28.57,-46.14,0.20553,24,2.65,34.54,0.52629,5,11,80.59,-73.93,0.01283,12,57.3,-68.18,0.01817,13,29.47,-65.33,0.06494,14,-7.65,-29.85,0.56122,24,28.88,30.62,0.34284,5,11,21.66,-8.59,0.88352,12,-8.29,-9.54,0.09388,13,-41.65,-13.53,0.00094,14,-95.61,-27.51,0.00167,24,-30.06,95.95,0.01999,4,11,5.62,-7.58,0.97773,12,-24.35,-10.25,0.00716,14,-107.4,-38.43,0.00007,24,-46.1,96.97,0.01505,5,11,38.02,-65.91,0.19279,12,14.12,-64.77,0.11402,13,-13.84,-66.25,0.08158,14,-42.8,-55.16,0.08668,24,-13.69,38.63,0.52493,5,11,16.37,-60.42,0.38172,12,-7.99,-61.63,0.11952,13,-36.15,-65.33,0.03445,14,-61.71,-67.06,0.01743,24,-35.35,44.13,0.44688,3,13,78.74,-58.62,0.07521,14,29.13,3.62,0.26,15,-18.08,6.9,0.66479,2,14,57.97,3.78,0.00595,15,10.17,1.06,0.99405,2,16,2.43,-2.08,1,17,-41.78,2.24,0,3,16,28.45,-3.25,0.99096,17,-15.98,-1.3,0.00894,18,-49.8,2,0.00011,3,16,54.14,-4.7,0.00509,17,9.47,-5.08,0.96537,18,-24.47,-2.46,0.02954,1,18,7.12,-2.87,1,3,12,82.49,45.84,0.00035,19,12.38,3.13,0.99599,25,67.78,-20.78,0.00366,3,19,37.07,-8.18,0.01834,20,10.6,-2.67,0.9686,21,-15.61,-9.43,0.01305,3,19,56.44,-17.42,0.00036,20,32.06,-3.02,0.06964,21,4.31,-1.46,0.93,3,21,32.86,-3.25,0.12941,22,3.75,-2.36,0.87047,23,-29.1,-10.27,0.00012,3,21,48.48,-6.91,0.00341,22,19.78,-1.83,0.9878,23,-13.85,-5.28,0.00879,2,22,34.67,-2.71,0.03576,23,0.69,-1.95,0.96424,1,23,22.85,-1.6,1],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,74,76,76,78,78,80,80,82,82,84,84,86,86,88,88,90,90,92,92,94,94,96,96,98,98,100,100,102,102,104,104,106,106,108,108,110,110,112,112,114,114,116,116,118,118,120,120,122,122,124,124,126,126,128,128,130,130,132,132,134,134,136,136,138,138,140,140,142,142,144,144,146,146,148,148,150,150,152,152,154,154,156,156,158,0,158]}},"sad":{"sad":{"x":92.91,"y":-17.94,"rotation":-76.17,"width":139,"height":71}}}}],"animations":{"Idle_Animation":{"slots":{"drop":{"attachment":[{"name":null}]},"sad":{"attachment":[{"name":null}]}},"bones":{"head":{"rotate":[{"angle":-0.51,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-3.95,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-0.51}],"translate":[{"x":-0.49,"y":0.71,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"x":-3.76,"y":5.43,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"x":-0.49,"y":0.71}]},"hand_L":{"rotate":[{"angle":0.26,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":6.08,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.3333,"angle":0.26}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"x":-21.58,"y":5.11,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body9":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head13":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head12":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head11":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head10":{"rotate":[{"angle":-6.67,"curve":0.375,"c2":0.5,"c3":0.75},{"time":0.3333,"curve":0.25,"c3":0.75},{"time":1,"angle":-13.34,"curve":0.25,"c3":0.625,"c4":0.5},{"time":1.3333,"angle":-6.67}]},"head8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head5":{"rotate":[{"angle":-1.25,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-9.61,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-1.25}]},"body6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body5":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body2":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}]}}},"Sad_Animation":{"slots":{"drop":{"attachment":[{"name":null},{"time":0.2,"name":"drop"},{"time":1.1667,"name":null}]}},"bones":{"drop":{"translate":[{"curve":0.3,"c3":0.636,"c4":0.36},{"time":0.2,"x":52.39,"y":12.89,"curve":0.318,"c2":0.26,"c3":0.653,"c4":0.6},{"time":0.5,"x":-14.19,"y":-3.49}],"scale":[{"curve":0.3,"c3":0.636,"c4":0.36},{"time":0.2,"x":0.5,"y":0.5,"curve":0.296,"c2":0.19,"c3":0.756},{"time":0.5}]},"head":{"rotate":[{"angle":-0.51,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8333,"angle":-3.95,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.6667,"angle":-0.51}],"translate":[{"x":-0.49,"y":0.71,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8333,"x":-3.76,"y":5.43,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.6667,"x":-0.49,"y":0.71}]},"hand_L":{"rotate":[{"angle":0.26,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":6.08,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.6667,"angle":0.26}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"x":-21.58,"y":5.11,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body9":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head13":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head12":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head11":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head10":{"rotate":[{"angle":-6.67,"curve":0.375,"c2":0.5,"c3":0.75},{"time":0.3333,"curve":0.25,"c3":0.75},{"time":1.1667,"angle":-13.34,"curve":0.25,"c3":0.625,"c4":0.5},{"time":1.6667,"angle":-6.67}]},"head8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head5":{"rotate":[{"angle":-1.25,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8333,"angle":-9.61,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.6667,"angle":-1.25}]},"body6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body5":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body2":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}]}}}}},[0]]],0,0,[0],[-1],[68]],[[{"name":"Khung_3rd","rect":[735,717,254,280],"offset":[0.5,0],"originalSize":[255,280],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Khung_1st","rect":[589,590,311,344],"offset":[0,0],"originalSize":[311,344],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[[142,"2d-spine-gray",{"0":{"defines":{}}}]],0,0,[0],[39],[69]],[[{"name":"1st","rect":[913,383,124,94],"offset":[0,0],"originalSize":[124,94],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Khung_2nd","rect":[474,717,255,280],"offset":[0,0],"originalSize":[255,280],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Start1_BTN","rect":[639,3,581,330],"offset":[0,0],"originalSize":[583,330],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[[5,"PeerManager"],[17,"PeerManager",[[143,-2]],[0,"83dvmovvBD97hMqS/70CKt",-1]]],0,[0,4,1,0,0,1,0,6,1,2],[],[],[]],[[{"name":"Start_BTN","rect":[3,663,549,311],"offset":[0,0],"originalSize":[549,311],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[{"name":"GameName","rect":[3,764,395,140],"offset":[0,0.5],"originalSize":[397,141],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Road","rect":[3,245,236,235],"offset":[0,-0.5],"originalSize":[236,236],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"fence","rect":[3,823,114,146],"offset":[0,0.5],"originalSize":[114,147],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Player3","rect":[163,948,121,21],"offset":[-19.5,2],"originalSize":[194,33],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Tree","rect":[440,358,104,156],"offset":[0,0],"originalSize":[104,156],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Khung_Character","rect":[474,292,274,419],"offset":[0,0],"originalSize":[274,419],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Char01","rect":[238,676,146,116],"offset":[0,0],"originalSize":[146,116],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Char1","rect":[487,244,108,108],"offset":[0,0],"originalSize":[108,108],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[42,"MC_Animation","\r\nMC_Animation.png\r\nsize: 1277,299\r\nformat: RGBA8888\r\nfilter: Linear,Linear\r\nrepeat: none\r\n1\r\n rotate: true\r\n xy: 893, 144\r\n size: 153, 145\r\n orig: 691, 453\r\n offset: 230, 232\r\n index: -1\r\n10\r\n rotate: true\r\n xy: 1040, 148\r\n size: 149, 147\r\n orig: 691, 453\r\n offset: 241, 228\r\n index: -1\r\n11\r\n rotate: true\r\n xy: 153, 3\r\n size: 122, 104\r\n orig: 691, 453\r\n offset: 238, 273\r\n index: -1\r\n12\r\n rotate: false\r\n xy: 540, 29\r\n size: 83, 96\r\n orig: 691, 453\r\n offset: 233, 279\r\n index: -1\r\n2\r\n rotate: true\r\n xy: 749, 132\r\n size: 165, 142\r\n orig: 691, 453\r\n offset: 227, 236\r\n index: -1\r\n3\r\n rotate: true\r\n xy: 455, 127\r\n size: 170, 146\r\n orig: 691, 453\r\n offset: 227, 236\r\n index: -1\r\n4\r\n rotate: true\r\n xy: 603, 129\r\n size: 168, 144\r\n orig: 691, 453\r\n offset: 225, 238\r\n index: -1\r\n5\r\n rotate: true\r\n xy: 2, 126\r\n size: 171, 149\r\n orig: 691, 453\r\n offset: 225, 234\r\n index: -1\r\n6\r\n rotate: true\r\n xy: 153, 127\r\n size: 170, 149\r\n orig: 691, 453\r\n offset: 226, 238\r\n index: -1\r\n7\r\n rotate: true\r\n xy: 304, 127\r\n size: 170, 149\r\n orig: 691, 453\r\n offset: 226, 238\r\n index: -1\r\n8\r\n rotate: false\r\n xy: 921, 6\r\n size: 150, 136\r\n orig: 691, 453\r\n offset: 243, 235\r\n index: -1\r\n9\r\n rotate: false\r\n xy: 1073, 2\r\n size: 149, 144\r\n orig: 691, 453\r\n offset: 242, 230\r\n index: -1\r\nChar2/body\r\n rotate: false\r\n xy: 625, 26\r\n size: 73, 101\r\n orig: 73, 101\r\n offset: 0, 0\r\n index: -1\r\nChar2/head\r\n rotate: false\r\n xy: 2, 25\r\n size: 149, 99\r\n orig: 149, 99\r\n offset: 0, 0\r\n index: -1\r\nChar2/wing_L\r\n rotate: true\r\n xy: 867, 44\r\n size: 86, 52\r\n orig: 86, 52\r\n offset: 0, 0\r\n index: -1\r\nChar2/wing_R\r\n rotate: false\r\n xy: 1189, 245\r\n size: 86, 52\r\n orig: 86, 52\r\n offset: 0, 0\r\n index: -1\r\nChar3/body\r\n rotate: false\r\n xy: 700, 30\r\n size: 59, 97\r\n orig: 59, 97\r\n offset: 0, 0\r\n index: -1\r\nChar3/head\r\n rotate: true\r\n xy: 358, 23\r\n size: 102, 98\r\n orig: 102, 98\r\n offset: 0, 0\r\n index: -1\r\nChar3/wing_L\r\n rotate: false\r\n xy: 1189, 192\r\n size: 82, 51\r\n orig: 82, 51\r\n offset: 0, 0\r\n index: -1\r\nChar3/wing_R\r\n rotate: true\r\n xy: 1224, 108\r\n size: 82, 51\r\n orig: 82, 51\r\n offset: 0, 0\r\n index: -1\r\nbody\r\n rotate: false\r\n xy: 458, 4\r\n size: 80, 121\r\n orig: 691, 453\r\n offset: 266, 61\r\n index: -1\r\nhead\r\n rotate: true\r\n xy: 259, 3\r\n size: 122, 97\r\n orig: 691, 453\r\n offset: 245, 136\r\n index: -1\r\nwing_L\r\n rotate: true\r\n xy: 815, 30\r\n size: 100, 50\r\n orig: 691, 453\r\n offset: 185, 133\r\n index: -1\r\nwing_R\r\n rotate: true\r\n xy: 761, 28\r\n size: 102, 52\r\n orig: 691, 453\r\n offset: 330, 135\r\n index: -1\r\n",["MC_Animation.png"],{"skeleton":{"hash":"6H+myYbMPVp/Y+f6kH8TlP86Am8","spine":"3.8.99","x":-306.4,"y":-58.28,"width":691,"height":453,"images":"./MC_Animation_PNGs/","audio":"E:/NGHI/Elofun/Zig Zac/Animation"},"bones":[{"name":"root"},{"name":"All","parent":"root"},{"name":"body","parent":"All","length":104.1,"rotation":-89.79,"x":-0.39,"y":118.33},{"name":"head","parent":"body","length":42.96,"rotation":179.79,"x":-5.42,"y":0.02,"transform":"noScale"},{"name":"wing_L","parent":"body","length":23.98,"rotation":-98.44,"x":19.35,"y":-31.85,"transform":"noScale"},{"name":"wing_L2","parent":"wing_L","length":24.31,"rotation":-0.57,"x":26.53,"y":0.37},{"name":"wing_L3","parent":"wing_L2","length":18.67,"rotation":14.07,"x":26.01,"y":0.26},{"name":"wing_L4","parent":"wing_L3","length":18.81,"rotation":22.85,"x":21,"y":0.36},{"name":"wing_R","parent":"body","length":26.33,"rotation":99.87,"x":17.5,"y":30.03,"transform":"noScale"},{"name":"wing_R2","parent":"wing_R","length":20.22,"rotation":0.59,"x":26.94,"y":0.18},{"name":"wing_R3","parent":"wing_R2","length":20.45,"rotation":-11.48,"x":22.72,"y":-0.76},{"name":"wing_R4","parent":"wing_R3","length":19.97,"rotation":-23.91,"x":22.49,"y":-1.41},{"name":"1","parent":"All","x":13.01,"y":172.1,"scaleX":1.414,"scaleY":1.414}],"slots":[{"name":"body","bone":"body","attachment":"body2"},{"name":"wing_R","bone":"wing_R","attachment":"wing_R"},{"name":"wing_L","bone":"wing_L","attachment":"wing_L2"},{"name":"head","bone":"head","attachment":"head2"},{"name":"1","bone":"1"}],"skins":[{"name":"default","attachments":{"1":{"1":{"x":20.27,"y":-22.87,"width":691,"height":453},"2":{"x":20.28,"y":-22.87,"width":691,"height":453},"3":{"x":20.28,"y":-22.87,"width":691,"height":453},"4":{"x":20.28,"y":-22.87,"width":691,"height":453},"5":{"x":20.28,"y":-22.87,"width":691,"height":453},"6":{"x":20.28,"y":-22.87,"width":691,"height":453},"7":{"x":20.28,"y":-22.87,"width":691,"height":453},"8":{"x":20.28,"y":-22.87,"width":691,"height":453},"9":{"x":20.28,"y":-22.87,"width":691,"height":453},"10":{"x":20.28,"y":-22.87,"width":691,"height":453},"11":{"x":20.28,"y":-22.87,"width":691,"height":453},"12":{"x":20.28,"y":-22.87,"width":691,"height":453}}}},{"name":"Char1","attachments":{"body":{"body2":{"name":"body","x":-49.74,"y":39.67,"rotation":89.79,"width":691,"height":453}},"head":{"head2":{"name":"head","x":44.47,"y":-39.49,"rotation":-90,"width":691,"height":453}},"wing_L":{"wing_L2":{"name":"wing_L","type":"mesh","hull":25,"width":691,"height":453,"uvs":[0.40971,0.64395,0.41056,0.65643,0.41132,0.66748,0.38947,0.66552,0.37244,0.66944,0.35734,0.67924,0.34449,0.69149,0.32939,0.70472,0.31847,0.70227,0.31333,0.68512,0.30883,0.66699,0.29373,0.66993,0.27863,0.66993,0.26803,0.66552,0.27124,0.6464,0.28345,0.62239,0.29534,0.61014,0.30883,0.60132,0.3265,0.59789,0.34256,0.59691,0.35606,0.60475,0.3657,0.62092,0.38015,0.62925,0.39525,0.6317,0.40939,0.63268,0.39423,0.6502,0.37971,0.6502,0.36368,0.64906,0.34591,0.64638,0.33464,0.63836,0.31612,0.63455,0.29784,0.64104,0.28307,0.65555],"triangles":[32,14,15,31,32,15,13,14,32,12,13,32,11,32,31,12,32,11,30,17,18,16,17,30,31,16,30,15,16,31,10,31,30,11,31,10,29,10,30,29,18,19,29,19,20,28,29,20,30,18,29,21,28,20,5,28,27,29,9,10,6,29,28,6,28,5,9,29,6,7,8,9,6,7,9,27,28,21,27,21,22,25,22,23,26,27,22,26,22,25,3,26,25,1,25,0,23,24,0,25,23,0,1,3,25,2,3,1,4,27,26,4,26,3,5,27,4],"vertices":[1,4,-8.19,-5.37,1,1,4,-9.58,0.14,1,1,4,-10.81,5.02,1,1,4,4.26,6.3,1,3,4,15.65,9.74,0.85855,5,-10.98,9.26,0.13995,6,-33.68,17.72,0.0015,3,4,25.34,15.63,0.21708,5,-1.34,15.24,0.7293,6,-22.89,21.18,0.05362,3,4,33.33,22.39,0.01458,5,6.58,22.09,0.77939,6,-13.53,25.89,0.20603,2,5,15.98,29.61,0.62616,6,-2.59,30.9,0.37384,2,5,23.61,29.66,0.56812,6,4.82,29.1,0.43188,3,5,28.3,22.53,0.46741,6,7.64,21.04,0.53254,7,-4.28,24.24,0.00005,3,5,32.63,14.89,0.17349,6,9.98,12.57,0.78022,7,-5.41,15.53,0.04629,3,5,42.74,17.8,0.00218,6,20.5,12.94,0.41141,7,4.42,11.79,0.58641,2,6,30.89,11.98,0.01831,7,13.62,6.87,0.98169,1,7,19.14,1.66,1,1,7,13.1,-4.93,1,2,6,25.59,-9.15,0.35084,7,0.54,-10.55,0.64916,3,5,45.79,-9.14,0.00274,6,16.9,-13.93,0.91646,7,-9.32,-11.57,0.0808,2,5,37.18,-14.51,0.11883,6,7.25,-17.05,0.88117,3,4,51.71,-17.8,0.0008,5,25.35,-17.91,0.62789,6,-5.05,-17.47,0.37131,3,4,40.78,-19.83,0.03739,5,14.45,-20.05,0.90549,6,-16.15,-16.89,0.05712,3,4,31.05,-17.64,0.17295,5,4.69,-17.97,0.82586,6,-25.1,-12.5,0.00119,2,4,23.41,-11.35,0.62578,5,-3.01,-11.75,0.37422,2,4,12.98,-9.04,0.99898,5,-13.46,-9.54,0.00102,1,4,2.49,-9.44,1,1,4,-7.24,-10.39,1,1,4,2,-1.04,1,2,4,11.93,0.4,0.99977,5,-14.6,-0.12,0.00023,3,4,22.96,1.47,0.88163,5,-3.58,1.06,0.11801,6,-28.51,7.97,0.00036,2,5,8.74,1.75,0.99455,6,-16.39,5.64,0.00545,2,4,43.51,-0.45,0.00004,5,16.99,-0.65,0.99996,1,6,3.62,-1.6,1,3,5,41.94,4.43,0.00001,6,16.47,0.17,0.99812,7,-4.25,1.59,0.00186,2,6,27.23,5.78,0.02359,7,7.85,2.57,0.97641],"edges":[4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,0,2,2,4,0,48]}},"wing_R":{"wing_R":{"type":"mesh","hull":23,"width":691,"height":453,"uvs":[0.48246,0.63492,0.50167,0.62917,0.51573,0.62498,0.52327,0.6187,0.52911,0.60562,0.53459,0.59307,0.54832,0.58888,0.57164,0.59778,0.59325,0.60824,0.61143,0.62341,0.61673,0.63718,0.62412,0.65637,0.60628,0.66788,0.58399,0.66474,0.57199,0.66893,0.56993,0.69247,0.56101,0.70084,0.54832,0.69666,0.52877,0.67782,0.51025,0.66841,0.49722,0.66631,0.4787,0.66108,0.47904,0.64172,0.49585,0.64853,0.51848,0.648,0.54146,0.65062,0.55141,0.63754,0.57164,0.63283,0.58811,0.6344,0.60629,0.64539],"triangles":[28,8,9,29,28,9,29,9,10,13,28,29,12,13,29,29,10,11,12,29,11,27,7,8,28,27,8,26,7,27,13,27,28,14,27,13,26,27,14,14,17,25,17,14,16,15,16,14,26,6,7,4,5,6,26,4,6,3,4,26,25,24,3,26,25,3,14,25,26,17,18,25,24,2,3,1,2,24,23,0,1,23,1,24,19,20,23,22,0,23,23,21,22,20,21,23,24,19,23,18,24,25,19,24,18],"vertices":[1,8,-1.61,4.76,1,1,8,11.91,5,1,2,8,21.81,5.17,0.79083,9,-5.08,5.04,0.20917,2,8,27.44,7.06,0.19454,9,0.57,6.87,0.80546,3,8,32.45,12.19,0.00412,9,5.63,11.95,0.99508,10,-19.28,9.06,0.0008,2,9,10.4,16.83,0.97498,10,-15.57,14.8,0.02502,2,9,20.08,16.94,0.80957,10,-6.11,16.83,0.19043,2,9,35.17,10,0.12374,10,10.06,13.02,0.87626,2,10,25.06,8.49,0.70725,11,-1.66,10.1,0.29275,2,10,37.72,1.8,0.02298,11,12.62,9.11,0.97702,1,11,18.56,4.97,1,1,11,26.83,-0.79,1,1,11,17.82,-10.68,1,4,8,65.1,-20.82,0.0099,9,37.94,-21.39,0.00525,10,19.02,-17.19,0.37407,11,3.23,-15.83,0.61078,4,8,56.6,-21.23,0.07022,9,29.43,-21.72,0.09535,10,10.75,-19.2,0.67739,11,-3.51,-21.02,0.15704,4,8,53.33,-31.49,0.15807,9,26.06,-31.94,0.18813,10,9.48,-29.89,0.62407,11,-0.35,-31.3,0.02973,4,8,46.6,-34.14,0.18896,9,19.31,-34.52,0.2134,10,3.38,-33.76,0.58235,11,-4.36,-37.32,0.0153,4,8,38.3,-30.74,0.25816,9,11.04,-31.04,0.26039,10,-5.42,-31.99,0.47683,11,-13.12,-39.27,0.00461,3,8,26.49,-19.97,0.64978,9,-0.66,-20.15,0.21693,10,-19.05,-23.65,0.13329,3,8,14.64,-13.53,0.99308,9,-12.44,-13.59,0.0012,10,-31.9,-19.57,0.00571,1,8,5.94,-11.02,1,1,8,-6.25,-6.45,1,1,8,-4.48,2.14,1,1,8,6.42,-2.92,1,2,8,21.86,-5.43,0.9964,10,-26.35,-10.24,0.0036,4,8,37.29,-9.38,0.18794,9,10.24,-9.66,0.68479,10,-10.45,-11.2,0.12709,11,-26.14,-22.3,0.00018,4,8,45.09,-4.74,0.01489,9,18.09,-5.11,0.78255,10,-3.66,-5.18,0.20201,11,-22.38,-14.05,0.00055,3,8,59.23,-5.09,0.00073,10,10.29,-2.85,0.99109,11,-10.57,-6.26,0.00817,3,8,70.31,-7.78,0.00005,10,21.67,-3.4,0.26347,11,0.06,-2.15,0.73647,1,11,13.56,-1.42,1],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,22,24,18,20,20,22,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,0,44]}}}},{"name":"Char2","attachments":{"body":{"body2":{"name":"Char2/body","x":39.39,"y":-0.73,"rotation":89.79,"width":73,"height":101}},"head":{"head2":{"name":"Char2/head","x":0.18,"y":0.59,"rotation":-90,"width":149,"height":99}},"wing_L":{"wing_L2":{"name":"Char2/wing_L","type":"mesh","hull":38,"width":86,"height":52,"uvs":[1,0.41263,0.89238,0.31248,0.7727,0.2004,0.69917,0.09071,0.62275,0.00963,0.55498,0,0.45694,0,0.37331,0.01202,0.29545,0.08594,0.23922,0.16225,0.17578,0.24809,0.10945,0.35063,0.06043,0.48179,0.02006,0.59625,0,0.77032,0,0.88717,0.01861,1,0.07629,1,0.12243,0.95394,0.16857,0.85855,0.22912,0.81563,0.3041,0.80609,0.3488,0.80848,0.37187,0.89671,0.4108,0.94917,0.46126,1,0.52038,0.99925,0.56364,0.9134,0.62852,0.85855,0.69196,0.81563,0.75684,0.80848,0.84191,0.83948,0.88949,0.90386,0.95294,0.93725,0.99187,0.87286,1,0.66779,1,0.58194,1,0.47463,0.91534,0.64758,0.80884,0.59023,0.6751,0.5206,0.55373,0.44687,0.40265,0.44277,0.27882,0.50421,0.15993,0.63529,0.08315,0.82781,0.38532,0.21339,0.57603,0.21339,0.46705,0.76637,0.64537,0.70492],"triangles":[45,13,44,19,45,44,14,13,45,15,14,45,18,45,19,17,16,15,45,17,15,18,17,45,46,43,9,10,9,43,11,10,43,44,11,43,12,11,44,13,12,44,22,21,43,20,44,43,21,20,43,20,19,44,47,5,4,46,7,6,8,7,46,46,41,42,6,5,47,47,46,6,47,41,46,46,9,8,43,46,42,48,42,41,48,41,49,42,22,43,48,22,42,28,48,49,23,22,48,27,48,28,24,23,48,48,25,24,48,27,25,27,26,25,47,4,3,1,0,37,2,40,47,2,47,3,39,40,2,41,47,40,38,39,1,1,39,2,1,37,38,36,38,37,38,36,35,49,41,40,49,40,39,30,49,39,29,49,30,31,39,38,30,39,31,28,49,29,34,38,35,32,31,38,34,32,38,33,32,34],"vertices":[1,4,-6.98,-12.78,1,2,4,2.93,-16.61,0.99636,5,-23.43,-17.21,0.00364,2,4,13.95,-20.9,0.86555,5,-12.37,-21.4,0.13445,2,4,21.02,-25.64,0.64595,5,-5.25,-26.07,0.35405,3,4,28.13,-28.88,0.4733,5,1.89,-29.23,0.52478,6,-30.56,-22.74,0.00192,3,4,33.97,-28.54,0.35612,5,7.72,-28.83,0.6309,6,-24.81,-23.78,0.01297,3,4,42.31,-27.33,0.18932,5,16.06,-27.54,0.7423,6,-16.41,-24.55,0.06839,3,4,49.34,-25.68,0.09877,5,23.07,-25.82,0.74003,6,-9.19,-24.59,0.1612,3,4,55.42,-20.92,0.04089,5,29.1,-21,0.62381,6,-2.17,-21.38,0.3353,3,4,59.64,-16.3,0.01276,5,33.27,-16.34,0.41965,6,3.01,-17.87,0.56759,3,4,64.4,-11.1,0.00092,5,37.98,-11.09,0.1471,6,8.85,-13.93,0.85198,2,5,42.8,-4.95,0.00868,6,15.02,-9.14,0.99132,2,6,19.85,-2.74,0.85773,7,-2.26,-2.41,0.14227,2,6,23.85,2.87,0.00066,7,3.6,1.2,0.99934,2,6,26.4,11.72,0.02872,7,9.39,8.38,0.97128,2,6,26.96,17.77,0.02234,7,12.26,13.73,0.97766,2,6,25.91,23.76,0.02431,7,13.61,19.66,0.97569,2,6,20.97,24.22,0.05866,7,9.24,22,0.94134,3,5,36.9,25.88,0.00168,6,16.8,22.2,0.14054,7,4.61,21.76,0.85778,3,5,33.74,20.37,0.0332,6,12.39,17.63,0.39818,7,-1.23,19.25,0.56863,3,5,28.93,17.37,0.17201,6,7,15.88,0.59212,7,-6.88,19.74,0.23587,3,5,22.64,15.89,0.52412,6,0.53,15.98,0.41879,7,-12.8,22.34,0.05709,3,5,18.82,15.43,0.78232,6,-3.28,16.46,0.20259,7,-16.13,24.26,0.01509,4,4,42.88,19.86,0.00002,5,16.16,19.66,0.92995,6,-4.84,21.21,0.06862,7,-15.72,29.25,0.00141,4,4,39.18,22.08,0.00378,5,12.43,21.84,0.96572,6,-7.92,24.23,0.03047,7,-17.38,33.23,0.00003,3,4,34.51,24.08,0.01754,5,7.74,23.79,0.97392,6,-12,27.26,0.00854,3,4,29.48,23.31,0.04266,5,2.72,22.97,0.95598,6,-17.07,27.69,0.00136,2,4,26.44,18.36,0.13985,5,-0.27,17.99,0.86015,2,4,21.32,14.74,0.43912,5,-5.35,14.32,0.56088,2,4,16.24,11.75,0.7963,5,-10.4,11.28,0.2037,2,4,10.77,10.59,0.96952,5,-15.86,10.06,0.03048,1,4,3.3,11.13,1,1,4,-1.23,13.86,1,1,4,-6.88,14.8,1,1,4,-9.71,11.01,1,1,4,-8.88,0.35,1,1,4,-8.24,-4.07,1,1,4,-7.44,-9.59,1,1,4,-1.52,0.35,1,1,4,7.97,-1.29,1,2,4,19.87,-3.22,0.99391,5,-6.62,-3.66,0.00609,2,4,30.75,-5.52,0.19554,5,4.28,-5.85,0.80446,3,4,43.64,-3.88,0.00918,5,17.15,-4.07,0.98476,6,-9.64,-2.05,0.00605,3,5,27.19,0.71,0.00411,6,1.25,0.15,0.99579,7,-18.28,7.47,0.0001,3,5,36.25,9.01,0.01216,6,12.06,6,0.82209,7,-6.05,8.67,0.16575,3,5,41.24,19.91,0.00164,6,19.56,15.36,0.16594,7,4.49,14.38,0.83241,3,4,46.82,-15.47,0.0673,5,20.45,-15.63,0.76992,6,-9.26,-14.07,0.16278,3,4,30.59,-17.82,0.41619,5,4.24,-18.14,0.58101,6,-25.59,-12.56,0.0028,3,4,35.75,11.98,0.01377,5,9.1,11.71,0.96773,6,-13.61,15.21,0.0185,2,4,21.03,6.63,0.71511,5,-5.56,6.2,0.28489],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,0,74]}},"wing_R":{"wing_R":{"name":"Char2/wing_R","type":"mesh","hull":36,"width":86,"height":52,"uvs":[0,0.51315,0.03237,0.35136,0.10314,0.32382,0.17599,0.26186,0.24259,0.16892,0.3092,0.09663,0.37164,0.01746,0.44865,0,0.54856,0,0.66863,0.04155,0.74356,0.1345,0.83514,0.24121,0.89967,0.37201,0.95587,0.4925,0.99541,0.63707,1,0.79542,1,0.87459,0.9517,1,0.87677,0.9813,0.83514,0.87803,0.7623,0.8264,0.6728,0.81263,0.62701,0.87115,0.5937,0.97786,0.53959,1,0.48547,1,0.4376,0.91246,0.36683,0.84361,0.30023,0.80575,0.20864,0.8264,0.15037,0.85394,0.1129,0.92278,0.06711,0.93311,0.01091,0.88148,0,0.71969,0,0.60609,0.07649,0.63005,0.19408,0.56624,0.32452,0.48421,0.47149,0.45686,0.57254,0.45079,0.66991,0.50852,0.78749,0.61183,0.86623,0.69387,0.90848,0.80629,0.39774,0.71817,0.53553,0.70601,0.38121,0.25632,0.5686,0.22594],"triangles":[43,42,13,43,13,14,44,43,14,15,44,14,19,20,43,44,15,16,44,19,43,18,19,44,17,18,44,16,17,44,10,41,48,41,10,11,42,41,11,12,42,11,42,12,13,21,41,42,46,41,21,20,21,42,20,42,43,48,8,9,47,6,7,5,6,47,48,41,40,10,48,9,7,48,47,48,7,8,39,48,40,39,47,48,47,4,5,38,47,39,38,4,47,46,39,40,46,40,41,45,38,39,45,39,46,22,46,21,26,24,25,46,22,24,26,46,24,22,23,24,3,4,38,37,3,38,2,3,37,36,35,0,2,0,1,36,2,37,2,36,0,34,35,36,28,37,38,28,38,45,29,37,28,36,37,29,27,28,45,30,36,29,34,36,30,33,34,30,26,45,46,27,45,26,30,32,33,31,32,30],"vertices":[2,8,-5.52,7.19,0.99963,9,-32.39,7.34,0.00037,2,8,-1.3,14.98,0.98398,9,-28.09,15.09,0.01602,2,8,4.94,15.33,0.93265,9,-21.85,15.37,0.06735,2,8,11.67,17.4,0.74041,9,-15.09,17.38,0.25959,2,8,18.16,21.16,0.43787,9,-8.57,21.06,0.56213,2,8,24.46,23.86,0.20355,9,-2.24,23.7,0.79645,3,8,30.46,26.97,0.07663,9,3.79,26.75,0.91876,10,-24.02,23.2,0.0046,3,8,37.14,26.7,0.02175,9,10.47,26.42,0.94709,10,-17.41,24.2,0.03116,3,8,45.6,25.2,0.00024,9,18.91,24.82,0.86388,10,-8.82,24.32,0.13588,2,9,28.66,20.79,0.60066,10,1.54,22.3,0.39934,2,9,34.1,14.85,0.31871,10,8.05,17.56,0.68129,2,9,40.81,7.94,0.05286,10,16,12.13,0.94714,3,9,45.01,0.22,0.00045,10,21.65,5.4,0.95334,11,-3.53,5.89,0.04621,2,10,26.57,-0.79,0.01249,11,3.48,2.22,0.98751,1,11,9.72,-3.19,1,1,11,13.52,-10.5,1,2,10,30.65,-20.61,0.0009,11,15.24,-14.24,0.9991,2,10,26.58,-27.19,0.01848,11,14.19,-21.9,0.98152,2,10,20.13,-26.3,0.06475,11,7.93,-23.71,0.93525,4,8,61.88,-24.07,0.00091,9,34.68,-24.61,0.00223,10,16.47,-20.99,0.22659,11,2.44,-20.33,0.77027,4,8,56.18,-20.33,0.01208,9,29.02,-20.81,0.04272,10,10.17,-18.39,0.54075,11,-4.38,-20.51,0.40445,4,8,48.73,-18.27,0.07941,9,21.59,-18.68,0.25297,10,2.46,-17.78,0.56305,11,-11.67,-23.08,0.10457,4,8,44.32,-20.58,0.18639,9,17.16,-20.94,0.40653,10,-1.43,-20.88,0.37903,11,-13.97,-27.49,0.02805,4,8,40.53,-25.54,0.27933,9,13.32,-25.86,0.4435,10,-4.22,-26.47,0.27175,11,-14.26,-33.73,0.00542,4,8,35.74,-25.86,0.32797,9,8.53,-26.13,0.44152,10,-8.85,-27.69,0.22904,11,-18,-36.72,0.00146,4,8,31.16,-25.05,0.37658,9,3.96,-25.27,0.43031,10,-13.51,-27.75,0.19307,11,-22.23,-38.67,0.00004,3,8,27.9,-19.84,0.48982,9,0.75,-20.04,0.37941,10,-17.69,-23.26,0.13078,3,8,22.54,-15.25,0.77184,9,-4.57,-15.39,0.18395,10,-23.82,-19.76,0.04421,3,8,17.24,-12.31,0.96654,9,-9.83,-12.4,0.02529,10,-29.58,-17.88,0.00818,2,8,9.3,-11.99,0.99996,10,-37.44,-19.06,0.00004,1,8,4.11,-12.52,1,1,8,0.32,-15.49,1,1,8,-3.66,-15.33,1,1,8,-7.94,-11.84,1,1,8,-7.4,-3.39,1,1,8,-6.36,2.43,1,2,8,-0.1,0.05,1,9,-27.05,0.15,0,2,8,10.43,1.55,0.99461,9,-16.5,1.53,0.00539,2,8,22.23,3.78,0.75475,9,-4.68,3.65,0.24525,1,9,8,2.71,1,1,9,16.6,1.41,1,4,8,51.25,-2.66,0.00184,9,24.28,-3.09,0.01078,10,1.99,-1.97,0.9829,11,-18.51,-8.82,0.00448,4,8,60.27,-9.72,0.00189,9,33.22,-10.24,0.0037,10,12.18,-7.2,0.76807,11,-7.08,-9.47,0.22634,4,8,66.19,-15.1,0.00024,9,39.08,-15.69,0.00019,10,19.01,-11.37,0.28577,11,0.86,-10.52,0.71381,3,8,68.74,-21.5,0.00001,10,22.73,-17.17,0.09677,11,6.6,-14.31,0.90322,3,8,26.3,-9.3,0.71404,9,-0.75,-9.47,0.25336,10,-21.26,-13.2,0.0326,4,8,38.07,-10.75,0.18452,9,11.02,-11.05,0.61792,10,-9.42,-12.4,0.19322,11,-24.71,-22.98,0.00434,3,8,29.1,14.6,0.13303,9,2.3,14.39,0.86673,10,-23.02,10.79,0.00024,2,9,18.43,12.96,0.84054,10,-6.93,12.6,0.15946],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,0,70]}}}},{"name":"Char3","attachments":{"body":{"body2":{"name":"Char3/body","x":39.39,"y":-0.73,"rotation":89.79,"width":59,"height":97}},"head":{"head2":{"name":"Char3/head","x":0.18,"y":0.59,"rotation":-90,"width":102,"height":98}},"wing_L":{"wing_L2":{"name":"Char3/wing_L","type":"mesh","hull":38,"width":82,"height":51,"uvs":[1,0.41263,0.89238,0.31248,0.7727,0.2004,0.69917,0.09071,0.62275,0.00963,0.55498,0,0.45694,0,0.37331,0.01202,0.29545,0.08594,0.23922,0.16225,0.17578,0.24809,0.10945,0.35063,0.06043,0.48179,0.02006,0.59625,0,0.77032,0,0.88717,0.01861,1,0.07629,1,0.12243,0.95394,0.16857,0.85855,0.22912,0.81563,0.3041,0.80609,0.3488,0.80848,0.37187,0.89671,0.4108,0.94917,0.46126,1,0.52038,0.99925,0.56364,0.9134,0.62852,0.85855,0.69196,0.81563,0.75684,0.80848,0.84191,0.83948,0.88949,0.90386,0.95294,0.93725,0.99187,0.87286,1,0.66779,1,0.58194,1,0.47463,0.91534,0.64758,0.80884,0.59023,0.6751,0.5206,0.55373,0.44687,0.40265,0.44277,0.27882,0.50421,0.15993,0.63529,0.08315,0.82781,0.38532,0.21339,0.57603,0.21339,0.46705,0.76637,0.64537,0.70492],"triangles":[45,13,44,19,45,44,14,13,45,15,14,45,18,45,19,17,16,15,45,17,15,18,17,45,46,43,9,10,9,43,11,10,43,44,11,43,12,11,44,13,12,44,22,21,43,20,44,43,21,20,43,20,19,44,47,5,4,46,7,6,8,7,46,46,41,42,6,5,47,47,46,6,47,41,46,46,9,8,43,46,42,48,42,41,48,41,49,42,22,43,48,22,42,28,48,49,23,22,48,27,48,28,24,23,48,48,25,24,48,27,25,27,26,25,47,4,3,1,0,37,2,40,47,2,47,3,39,40,2,41,47,40,38,39,1,1,39,2,1,37,38,36,38,37,38,36,35,49,41,40,49,40,39,30,49,39,29,49,30,31,39,38,30,39,31,28,49,29,34,38,35,32,31,38,34,32,38,33,32,34],"vertices":[1,4,-7.41,-9.78,1,2,4,2.49,-13.61,0.99636,5,-23.9,-14.22,0.00364,2,4,13.51,-17.9,0.86555,5,-12.84,-18.4,0.13445,2,4,20.59,-22.64,0.64595,5,-5.71,-23.07,0.35405,3,4,27.7,-25.88,0.4733,5,1.43,-26.23,0.52478,6,-30.28,-19.72,0.00192,3,4,33.54,-25.54,0.35612,5,7.26,-25.84,0.6309,6,-24.53,-20.76,0.01297,3,4,41.88,-24.33,0.18932,5,15.59,-24.55,0.7423,6,-16.13,-21.53,0.06839,3,4,48.91,-22.68,0.09877,5,22.61,-22.83,0.74003,6,-8.91,-21.57,0.1612,3,4,54.99,-17.92,0.04089,5,28.64,-18.01,0.62381,6,-1.89,-18.36,0.3353,3,4,59.21,-13.3,0.01276,5,32.81,-13.34,0.41965,6,3.29,-14.85,0.56759,3,4,63.97,-8.1,0.00092,5,37.52,-8.1,0.1471,6,9.13,-10.91,0.85198,2,5,42.34,-1.96,0.00868,6,15.3,-6.12,0.99132,2,6,20.13,0.28,0.85773,7,-0.84,0.27,0.14227,2,6,24.13,5.89,0.00066,7,5.03,3.88,0.99934,2,6,26.68,14.74,0.02872,7,10.82,11.05,0.97128,2,6,27.24,20.79,0.02234,7,13.68,16.41,0.97766,2,6,26.18,26.78,0.02431,7,15.04,22.34,0.97569,2,6,21.25,27.24,0.05866,7,10.66,24.67,0.94134,3,5,36.44,28.87,0.00168,6,17.07,25.22,0.14054,7,6.04,24.43,0.85778,3,5,33.27,23.37,0.0332,6,12.67,20.64,0.39818,7,0.2,21.93,0.56863,3,5,28.47,20.36,0.17201,6,7.28,18.9,0.59212,7,-5.45,22.41,0.23587,3,5,22.17,18.89,0.52412,6,0.81,19,0.41879,7,-11.37,25.02,0.05709,3,5,18.35,18.42,0.78232,6,-3.01,19.48,0.20259,7,-14.7,26.94,0.01509,4,4,42.45,22.86,0.00002,5,15.69,22.65,0.92995,6,-4.56,24.23,0.06862,7,-14.29,31.92,0.00141,4,4,38.75,25.08,0.00378,5,11.97,24.84,0.96572,6,-7.64,27.25,0.03047,7,-15.95,35.9,0.00003,3,4,34.07,27.08,0.01754,5,7.27,26.79,0.97392,6,-11.72,30.28,0.00854,3,4,29.05,26.31,0.04266,5,2.26,25.97,0.95598,6,-16.79,30.71,0.00136,2,4,26,21.36,0.13985,5,-0.74,20.99,0.86015,2,4,20.89,17.74,0.43912,5,-5.82,17.32,0.56088,2,4,15.81,14.75,0.7963,5,-10.87,14.28,0.2037,2,4,10.34,13.59,0.96952,5,-16.32,13.06,0.03048,1,4,2.87,14.13,1,1,4,-1.66,16.86,1,1,4,-7.31,17.8,1,1,4,-10.14,14.01,1,1,4,-9.31,3.35,1,1,4,-8.67,-1.07,1,1,4,-7.87,-6.59,1,1,4,-1.95,3.35,1,1,4,7.54,1.71,1,2,4,19.44,-0.22,0.99391,5,-7.09,-0.66,0.00609,2,4,30.32,-2.53,0.19554,5,3.81,-2.86,0.80446,3,4,43.21,-0.88,0.00918,5,16.69,-1.08,0.98476,6,-9.37,0.96,0.00605,3,5,26.72,3.71,0.00411,6,1.53,3.17,0.99579,7,-16.85,10.15,0.0001,3,5,35.78,12.01,0.01216,6,12.34,9.01,0.82209,7,-4.62,11.34,0.16575,3,5,40.78,22.91,0.00164,6,19.83,18.38,0.16594,7,5.92,17.06,0.83241,3,4,46.39,-12.47,0.0673,5,19.98,-12.64,0.76992,6,-8.98,-11.05,0.16278,3,4,30.16,-14.82,0.41619,5,3.78,-15.15,0.58101,6,-25.31,-9.54,0.0028,3,4,35.32,14.98,0.01377,5,8.64,14.7,0.96773,6,-13.33,18.23,0.0185,2,4,20.6,9.63,0.71511,5,-6.03,9.2,0.28489],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,0,74]}},"wing_R":{"wing_R":{"name":"Char3/wing_R","type":"mesh","hull":36,"width":82,"height":51,"uvs":[0,0.51315,0.03237,0.35136,0.10314,0.32382,0.17599,0.26186,0.24259,0.16892,0.3092,0.09663,0.37164,0.01746,0.44865,0,0.54856,0,0.66863,0.04155,0.74356,0.1345,0.83514,0.24121,0.89967,0.37201,0.95587,0.4925,0.99541,0.63707,1,0.79542,1,0.87459,0.9517,1,0.87677,0.9813,0.83514,0.87803,0.7623,0.8264,0.6728,0.81263,0.62701,0.87115,0.5937,0.97786,0.53959,1,0.48547,1,0.4376,0.91246,0.36683,0.84361,0.30023,0.80575,0.20864,0.8264,0.15037,0.85394,0.1129,0.92278,0.06711,0.93311,0.01091,0.88148,0,0.71969,0,0.60609,0.07649,0.63005,0.19408,0.56624,0.32452,0.48421,0.47149,0.45686,0.57254,0.45079,0.66991,0.50852,0.78749,0.61183,0.86623,0.69387,0.90848,0.80629,0.39774,0.71817,0.53553,0.70601,0.38121,0.25632,0.5686,0.22594],"triangles":[43,42,13,43,13,14,44,43,14,15,44,14,19,20,43,44,15,16,44,19,43,18,19,44,17,18,44,16,17,44,10,41,48,41,10,11,42,41,11,12,42,11,42,12,13,21,41,42,46,41,21,20,21,42,20,42,43,48,8,9,47,6,7,5,6,47,48,41,40,10,48,9,7,48,47,48,7,8,39,48,40,39,47,48,47,4,5,38,47,39,38,4,47,46,39,40,46,40,41,45,38,39,45,39,46,22,46,21,26,24,25,46,22,24,26,46,24,22,23,24,3,4,38,37,3,38,2,3,37,36,35,0,2,0,1,36,2,37,2,36,0,34,35,36,28,37,38,28,38,45,29,37,28,36,37,29,27,28,45,30,36,29,34,36,30,33,34,30,26,45,46,27,45,26,30,32,33,31,32,30],"vertices":[2,8,-6.27,2.92,0.99963,9,-33.19,3.08,0.00037,2,8,-2.06,10.72,0.98398,9,-28.89,10.83,0.01602,2,8,4.18,11.06,0.93265,9,-22.65,11.11,0.06735,2,8,10.91,13.14,0.74041,9,-15.89,13.12,0.25959,2,8,17.4,16.89,0.43787,9,-9.37,16.81,0.56213,2,8,23.7,19.59,0.20355,9,-3.05,19.44,0.79645,3,8,29.71,22.71,0.07663,9,2.99,22.49,0.91876,10,-23.96,18.87,0.0046,3,8,36.39,22.44,0.02175,9,9.67,22.16,0.94709,10,-17.35,19.87,0.03116,3,8,44.84,20.94,0.00024,9,18.11,20.57,0.86388,10,-8.75,19.99,0.13588,2,9,27.86,16.53,0.60066,10,1.6,17.98,0.39934,2,9,33.3,10.59,0.31871,10,8.11,13.23,0.68129,2,9,40.01,3.68,0.05286,10,16.07,7.8,0.94714,3,9,44.21,-4.03,0.00045,10,21.71,1.07,0.95334,11,-1.72,1.96,0.04621,2,10,26.63,-5.12,0.01249,11,5.29,-1.71,0.98751,1,11,11.53,-7.12,1,1,11,15.33,-14.43,1,2,10,30.71,-24.94,0.0009,11,17.05,-18.17,0.9991,2,10,26.64,-31.52,0.01848,11,16,-25.84,0.98152,2,10,20.19,-30.63,0.06475,11,9.74,-27.65,0.93525,4,8,61.12,-28.33,0.00091,9,33.88,-28.86,0.00223,10,16.53,-25.32,0.22659,11,4.25,-24.27,0.77027,4,8,55.42,-24.59,0.01208,9,28.22,-25.06,0.04272,10,10.23,-22.72,0.54075,11,-2.57,-24.45,0.40445,4,8,47.97,-22.54,0.07941,9,20.79,-22.93,0.25297,10,2.52,-22.11,0.56305,11,-9.86,-27.01,0.10457,4,8,43.56,-24.84,0.18639,9,16.36,-25.2,0.40653,10,-1.37,-25.21,0.37903,11,-12.16,-31.43,0.02805,4,8,39.77,-29.81,0.27933,9,12.51,-30.12,0.4435,10,-4.16,-30.8,0.27175,11,-12.44,-37.66,0.00542,4,8,34.98,-30.12,0.32797,9,7.73,-30.39,0.44152,10,-8.79,-32.02,0.22904,11,-16.19,-40.66,0.00146,4,8,30.4,-29.31,0.37658,9,3.15,-29.53,0.43031,10,-13.45,-32.08,0.19307,11,-20.42,-42.6,0.00004,3,8,27.14,-24.11,0.48982,9,-0.05,-24.29,0.37941,10,-17.63,-27.59,0.13078,3,8,21.78,-19.52,0.77184,9,-5.37,-19.65,0.18395,10,-23.76,-24.09,0.04421,3,8,16.48,-16.58,0.96654,9,-10.63,-16.65,0.02529,10,-29.52,-22.21,0.00818,2,8,8.54,-16.26,0.99996,10,-37.38,-23.39,0.00004,1,8,3.36,-16.79,1,1,8,-0.44,-19.75,1,1,8,-4.41,-19.59,1,1,8,-8.7,-16.1,1,1,8,-8.15,-7.65,1,1,8,-7.12,-1.84,1,2,8,-0.86,-4.21,1,9,-27.85,-4.11,0,2,8,9.68,-2.72,0.99461,9,-17.3,-2.72,0.00539,2,8,21.47,-0.48,0.75475,9,-5.48,-0.61,0.24525,1,9,7.2,-1.55,1,1,9,15.8,-2.85,1,4,8,50.49,-6.92,0.00184,9,23.47,-7.35,0.01078,10,2.05,-6.3,0.9829,11,-16.7,-12.75,0.00448,4,8,59.51,-13.98,0.00189,9,32.42,-14.5,0.0037,10,12.24,-11.53,0.76807,11,-5.27,-13.4,0.22634,4,8,65.43,-19.37,0.00024,9,38.28,-19.95,0.00019,10,19.07,-15.7,0.28577,11,2.67,-14.45,0.71381,3,8,67.98,-25.76,0.00001,10,22.79,-21.5,0.09677,11,8.41,-18.24,0.90322,3,8,25.54,-13.56,0.71404,9,-1.55,-13.73,0.25336,10,-21.2,-17.53,0.0326,4,8,37.32,-15.01,0.18452,9,10.21,-15.3,0.61792,10,-9.36,-16.73,0.19322,11,-22.9,-26.91,0.00434,3,8,28.34,10.33,0.13303,9,1.5,10.14,0.86673,10,-22.96,6.46,0.00024,2,9,17.63,8.7,0.84054,10,-6.87,8.27,0.15946],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,0,70]}}}}],"animations":{"Appear":{"slots":{"body":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff"}]},"head":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff"}]},"wing_L":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff"}]},"wing_R":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff","curve":"stepped"},{"time":1.3333,"color":"ffffffff"}]}},"bones":{"body":{"translate":[{"y":0.96}]},"wing_R4":{"rotate":[{"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.34}]},"wing_L4":{"rotate":[{"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.43}]}}},"Crash_Animation":{"slots":{"1":{"attachment":[{"time":0.1,"name":"1"},{"time":0.1333,"name":"2"},{"time":0.2333,"name":"3"},{"time":0.2667,"name":"4"},{"time":0.3,"name":"5"},{"time":0.3667,"name":"6"},{"time":0.4333,"name":"7"},{"time":0.4667,"name":"8"},{"time":0.5,"name":"9"},{"time":0.5333,"name":"10"},{"time":0.6,"name":"11"},{"time":0.6667,"name":"12"},{"time":0.7333,"name":null}]},"body":{"attachment":[{"time":0.2333,"name":null}]},"head":{"attachment":[{"time":0.2333,"name":null}]},"wing_L":{"attachment":[{"time":0.2333,"name":null}]},"wing_R":{"attachment":[{"time":0.2333,"name":null}]}},"bones":{"1":{"translate":[{},{"time":0.1,"x":-12.13,"y":16.78},{"time":0.1333,"x":-0.03,"y":-75.92}]},"body":{"translate":[{"y":0.96,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1,"y":0.21},{"time":0.7333,"y":0.96}],"scale":[{"curve":0.297,"c3":0.634,"c4":0.37},{"time":0.1,"x":0.768,"curve":0.3,"c2":0.21,"c3":0.756},{"time":0.7333}]},"head":{"translate":[{},{"time":0.1,"x":3.69,"y":-0.01},{"time":0.2333,"x":5.82,"y":-0.02},{"time":0.7333}]},"wing_L":{"rotate":[{},{"time":0.1,"angle":12.13},{"time":0.7333}]},"wing_R":{"rotate":[{},{"time":0.1,"angle":-8.3},{"time":0.7333}]},"wing_R4":{"rotate":[{"angle":-1.93,"curve":0.337,"c2":0.35,"c3":0.671,"c4":0.68},{"time":0.1,"angle":-10.23,"curve":0.38,"c2":0.6,"c3":0.726},{"time":0.7333,"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04,"curve":0.338,"c2":0.35,"c3":0.671,"c4":0.69},{"time":0.1,"angle":-9.34,"curve":0.372,"c2":0.62,"c3":0.711},{"time":0.7333,"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.34,"curve":0.336,"c2":0.35,"c3":0.67,"c4":0.69},{"time":0.1,"angle":-8.64,"curve":0.357,"c2":0.65,"c3":0.692},{"time":0.7333,"angle":-0.34}]},"wing_L4":{"rotate":[{"angle":2.46,"curve":0.337,"c2":0.35,"c3":0.671,"c4":0.68},{"time":0.1,"angle":14.58,"curve":0.38,"c2":0.6,"c3":0.726},{"time":0.7333,"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03},{"time":0.1,"angle":-6.88},{"time":0.7333,"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.43,"curve":0.336,"c2":0.35,"c3":0.67,"c4":0.69},{"time":0.1,"angle":12.56,"curve":0.357,"c2":0.65,"c3":0.692},{"time":0.7333,"angle":0.43}]}}},"Fly_Animation":{"bones":{"body":{"translate":[{"y":0.96,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"x":-0.03,"y":7.37,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"y":0.96}]},"wing_L":{"rotate":[{},{"time":0.6667,"angle":10.14},{"time":1.3333}]},"wing_R":{"rotate":[{},{"time":0.6667,"angle":-7.96},{"time":1.3333}]},"wing_R4":{"rotate":[{"angle":-1.93,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.2,"curve":0.25,"c3":0.75},{"time":0.8667,"angle":-7.96,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1.3333,"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-7.96,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.34,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":-7.96,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.3333,"angle":-0.34}]},"wing_L4":{"rotate":[{"angle":2.46,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.2,"curve":0.25,"c3":0.75},{"time":0.8667,"angle":10.14,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1.3333,"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03},{"time":0.1333},{"time":0.8,"angle":10.14},{"time":1.3333,"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.43,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":10.14,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.3333,"angle":0.43}]}}},"Fly_Animation2":{"bones":{"body":{"translate":[{"y":0.96,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.5667,"x":-0.04,"y":10.44,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1,"y":0.96}]},"head":{"translate":[{"x":0.17,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0333,"curve":0.25,"c3":0.75},{"time":0.5333,"x":3.95,"y":-0.01,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1,"x":0.17}]},"wing_L":{"rotate":[{},{"time":0.5,"angle":20.41},{"time":1}]},"wing_R":{"rotate":[{},{"time":0.5,"angle":-15.82},{"time":1}]},"wing_R4":{"rotate":[{"angle":-1.93,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.6,"angle":-7.96,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1,"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.5667,"angle":-24.75,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1,"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.85,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0333,"angle":-0.34,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.5333,"angle":-12.28,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1,"angle":-0.85}]},"wing_L4":{"rotate":[{"angle":2.46,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.6,"angle":10.14,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1,"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03},{"time":0.0667},{"time":0.5667,"angle":19.99},{"time":1,"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.93,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0333,"angle":0.43,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.5333,"angle":12.18,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1,"angle":0.93}]}}}}},[0]]],0,0,[0],[-1],[70]],[[{"name":"Tree2","rect":[430,468,126,166],"offset":[-0.5,0],"originalSize":[127,166],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"SoundMgr"],[17,"SoundMgr",[[144,-2,0,1,2,3,4,5]],[0,"d5+DYQ6bhB5oeIiG3yRP82",-1]]],0,[0,4,1,0,0,1,0,6,1,2],[0,0,0,0,0,0],[40,41,42,43,44,45],[71,72,73,74,75,76]],[[[5,"StageQRscan"],[15,"StageQRscan",[-6,-7,-8],[[145,-3,-2],[43,2,-5,[[23,6,[[18,"824b3x307FID6iZwnCxazfr","nextStage",-4]]]]]],[13,-1],[5,960,540]],[27,"qrCode",1,[-10,-11,-12],[-9],[0,"c42gRiMHdAL7JPDcf0TczP",1],[-217.5,-43.125,0,0,0,0,1,0.75,0.75,0.75]],[11,"loading_icon",2,[[2,0,-13,[6],7],[44,-14]],[0,"71PdmVfyhFVaVIjoGb1Qfd",1],[5,266,266]],[1,"bg",1,[[2,0,-15,[0],1],[6,-16,2,3]],[0,"59J4R7fPZIUKTh57MBqXMg",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[1,"Version",1,[[124,"Version: 0.0.3",15,false,1,1,-17,[8],9],[108,36,7.734999999999999,10,-18]],[0,"9fdKdr6oVBkq/wBALDXGOQ",1],[5,150.03,50.4],[397.25,-234.8,0,0,0,0,1,1,1,1]],[11,"bg",2,[[2,0,-19,[4],5]],[0,"2ex8UwP4tOLpI83Dk2/1dL",1],[5,310,310]],[16,"qr",2,[0,"faUDjTroFC75JHPS9M/JOw",1]],[60,300,2,7,3]],0,[0,4,1,0,17,8,0,0,1,0,10,1,0,0,1,0,-1,4,0,-2,2,0,-3,5,0,-1,8,0,-1,6,0,-2,7,0,-3,3,0,0,3,0,0,3,0,0,4,0,0,4,0,0,5,0,0,5,0,0,6,0,6,1,19],[0,0,0,0,0,0,0,0,0,0],[-1,1,8,9,-1,1,-1,1,-1,3],[0,32,77,32,0,9,0,23,0,2]],[[{"name":"Murshroom","rect":[3,943,73,57],"offset":[0,0],"originalSize":[73,57],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"MATKETNOI","rect":[3,910,360,107],"offset":[0,0],"originalSize":[360,107],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"QR_Txt","rect":[3,3,768,283],"offset":[0.5,-0.5],"originalSize":[769,284],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"default_sprite_splash","rect":[0,0,2,2],"offset":[0,0],"originalSize":[2,2],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[78]],[[{"name":"Người chơi 1","rect":[984,402,186,32],"offset":[0,0],"originalSize":[186,32],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Item","rect":[630,948,49,59],"offset":[0,0],"originalSize":[49,59],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"StageLobby"],[15,"StageLobby",[-13,-14,-15,-16,-17,-18,-19],[[147,-9,-8,-7,-6,[-3,-4,-5],-2,70,71],[43,2,-12,[[23,6,[[18,"cd1c1/ESEpLhb7U8uTj4hYv","nextStage",-10]]],[23,7,[[18,"cd1c1/ESEpLhb7U8uTj4hYv","previousStage",-11]]]]]],[13,-1],[5,960,540]],[4,"playerLobby",1,[-21,-22,-23],[[2,2,-20,[40],41]],[0,"94iouubU5EfYucnd509Nml",1],[5,234,333],[15,-18.75,0,0,0,0,1,0.5,0.5,0.5]],[4,"playerLobby copy",1,[-25,-26,-27],[[2,2,-24,[54],55]],[0,"e7k2OXWMdM/IIR7R2etp9u",1],[5,234,333],[187.5,-18.75,0,0,0,0,1,0.5,0.5,0.5]],[4,"playerLobby copy",1,[-29,-30,-31],[[2,2,-28,[68],69]],[0,"0aLm+Qhx5HoL2HCHSYBUCa",1],[5,234,333],[360,-18.75,0,0,0,0,1,0.5,0.5,0.5]],[27,"qrCode",1,[-33,-34,-35],[-32],[0,"16HL1NCmdEQagqtonDNlLm",1],[-225,-56.25,0,0,0,0,1,0.75,0.75,0.75]],[4,"Rectangle 4",1,[-38,-39],[[2,2,-36,[24],25],[6,-37,26,27]],[0,"18hnLNyghMWpJM6vw6rjJe",1],[5,639,320],[194.208,162.07875,0,0,0,0,1,0.5,0.5,0.5]],[4,"bg",1,[-41,-42],[[2,0,-40,[6],7]],[0,"e7CsyQIhJE3b0USNoFCfC2",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[35,"btnNext",1,[[[2,2,-43,[8],9],-44,[6,-45,10,11]],4,1,4],[0,"4fx6Agw9VBG7i7NMwjibq1",1],[5,549,311],[187.5,-187.5,0,0,0,0,1,0.5,0.5,0.5]],[11,"loading_icon",5,[[2,0,-46,[18],19],[44,-47]],[0,"a4gu3PkyxOoYoSwgeXRvsV",1],[5,266,266]],[1,"GameName",7,[[3,-48,[2],3],[6,-49,4,5]],[0,"8cNuWj5oBFfbQEs3hKZHPl",1],[5,395,140],[550,300,0,0,0,0,1,0.45,0.55,1]],[32,"bg",5,[-51],[[2,0,-50,[16],17]],[0,"86Kc9uBERHXaFam4ye3UAO",1],[5,434,434.6666667]],[1,"QR_Txt",11,[[2,0,-52,[12],13],[6,-53,14,15]],[0,"37Dr0YwNtOSLHZjXQbEm9i",1],[5,512.6666667,189.3333333],[-80.19,285,0,0,0,0,1,1,1,1]],[22,"bgDomain",6,[-55],[[2,0,-54,[22],23]],[0,"c91fqJFAJNHLBs4Jida/jS",1],[4,4282129436],[5,500,75],[-10,55,0,0,0,0,1,1,1,1]],[1,"playerNotReady",2,[[3,-56,[28],29],[6,-57,30,31]],[0,"368bf81/1Ibq1a2+Ee1J3e",1],[5,178,33],[0,-130,0,0,0,0,1,1,1,1]],[4,"playerReady",2,[-59],[[2,0,-58,[36],37]],[0,"09D92Wjb9I+rvwty5ILYHl",1],[5,366,322.6666667],[-15,30,0,0,0,0,1,1,1,1]],[1,"sẵn sàng",15,[[3,-60,[32],33],[6,-61,34,35]],[0,"33h9N9vtdGFruKN+RgdcDn",1],[5,186,32],[20,-160,0,0,0,0,1,1,1,1]],[1,"playerNotReady",3,[[3,-62,[42],43],[6,-63,44,45]],[0,"70HuC2/sVIJ6Gvr4Z2JTYY",1],[5,178,33],[0,-130,0,0,0,0,1,1,1,1]],[4,"playerReady",3,[-65],[[2,0,-64,[50],51]],[0,"4dIIaxZyVDiJv2RxEV3pvG",1],[5,366,322.6666667],[-15,30,0,0,0,0,1,1,1,1]],[1,"sẵn sàng",18,[[3,-66,[46],47],[6,-67,48,49]],[0,"39YIQ4GbJGMI6zVrAFDaOj",1],[5,193,33],[25,-160,0,0,0,0,1,1,1,1]],[1,"playerNotReady",4,[[3,-68,[56],57],[6,-69,58,59]],[0,"82WV93R25ObYncPJQBgRQD",1],[5,178,33],[0,-130,0,0,0,0,1,1,1,1]],[4,"playerReady",4,[-71],[[2,0,-70,[64],65]],[0,"2bU2riQjdFxbixEdjZJh4l",1],[5,366,322.6666667],[-15,30,0,0,0,0,1,1,1,1]],[1,"sẵn sàng",21,[[3,-72,[60],61],[6,-73,62,63]],[0,"94T2FYymtOupssSfe2XwZZ",1],[5,194,33],[25,-160,0,0,0,0,1,1,1,1]],[1,"LOGO_ELOFUN",7,[[2,0,-74,[0],1]],[0,"54KQPZW+lK86ENdCxbE/aa",1],[5,93.3333333,22.6666667],[-565,335,0,0,0,0,1,1.5,1.5,1]],[38,true,8],[16,"qr",5,[0,"69iQ66/r9G1Z6o7iqf7pUS",1]],[60,325,5,25,9],[54,"lblRoomCode",6,[-75],[0,"5d4o9rhYtJALTvGW1lBLMt",1],[4,4293298560],[5,318.49,50],[-5,-115,0,0,0,0,1,1,1,1]],[40,"01234567",50,50,false,1,1,2,27,[20]],[88,"lblDomain",13,[-76],[0,"ceD67Hj0ZKwIMZxHMYPn2+",1],[4,4293298560],[5,500,44.1]],[57,"https://dk.eloplay.vn",50,50,false,1,1,2,2,29,[21]],[1,"playerSprite",2,[[7,"Char3","Fly_Animation",0,false,"Fly_Animation",-77,[38],39]],[0,"47xGikDOtMW5Juwp3rzEuO",1],[5,691,453],[0,-75,0,0,0,0,1,1,1,1]],[1,"playerSprite",3,[[7,"Char2","Fly_Animation",0,false,"Fly_Animation",-78,[52],53]],[0,"93A2y9klpIc7swtcAOxaho",1],[5,691,453],[0,-75,0,0,0,0,1,1,1,1]],[1,"playerSprite",4,[[7,"Char1","Fly_Animation",0,false,"Fly_Animation",-79,[66],67]],[0,"f9ofVGVkZA4bZmOOILEPlr",1],[5,691,453],[0,-75,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,46,30,0,-1,2,0,-2,3,0,-3,4,0,47,28,0,48,24,0,17,26,0,0,1,0,10,1,0,10,1,0,0,1,0,-1,7,0,-2,8,0,-3,5,0,-4,6,0,-5,2,0,-6,3,0,-7,4,0,0,2,0,-1,14,0,-2,15,0,-3,31,0,0,3,0,-1,17,0,-2,18,0,-3,32,0,0,4,0,-1,20,0,-2,21,0,-3,33,0,-1,26,0,-1,11,0,-2,25,0,-3,9,0,0,6,0,0,6,0,-1,27,0,-2,13,0,0,7,0,-1,23,0,-2,10,0,0,8,0,-2,24,0,0,8,0,0,9,0,0,9,0,0,10,0,0,10,0,0,11,0,-1,12,0,0,12,0,0,12,0,0,13,0,-1,29,0,0,14,0,0,14,0,0,15,0,-1,16,0,0,16,0,0,16,0,0,17,0,0,17,0,0,18,0,-1,19,0,0,19,0,0,19,0,0,20,0,0,20,0,0,21,0,-1,22,0,0,22,0,0,22,0,0,23,0,-1,28,0,-1,30,0,0,31,0,0,32,0,0,33,0,6,1,79],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,28,30],[-1,1,-1,1,8,9,-1,1,-1,1,8,9,-1,1,8,9,-1,1,-1,1,-1,-1,-1,1,-1,1,8,9,-1,1,8,9,-1,1,8,9,-1,1,-1,7,-1,1,-1,1,8,9,-1,1,8,9,-1,1,-1,7,-1,1,-1,1,8,9,-1,1,8,9,-1,1,-1,7,-1,1,49,50,11,12,3,3],[0,33,0,24,24,25,0,34,0,35,79,35,0,36,80,36,0,81,0,23,0,0,0,9,0,37,82,37,0,10,26,10,0,38,83,38,0,27,4,8,0,28,0,10,26,10,0,39,84,39,0,27,4,8,0,28,0,10,26,10,0,40,85,40,0,27,4,8,0,28,4,86,0,18,2,2]],[[{"name":"Play again","rect":[777,3,374,153],"offset":[0,0],"originalSize":[374,153],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Player1","rect":[416,948,114,21],"offset":[-16,2.5],"originalSize":[186,32],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Map3","rect":[0,0,570,1080],"offset":[0,0],"originalSize":[570,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[87]],[[{"name":"Player2","rect":[290,948,120,21],"offset":[-19.5,2],"originalSize":[193,33],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"StageInGame"],[15,"StageInGame",[-9,-10,-11,-12],[[148,-8,-7,[-4,-5,-6],[37,38,39],-3,-2,[42,43,44],[45,46,47],[48,49,50,51],[52,53,54,55,56],[57,58,59,60,61,62],36,40,41]],[13,-1],[5,960,540]],[48,"Tutorial",1,[-13,-14,-15,-16],[0,"4ekk3dee5C0arFvGcMUEpW",1],[5,1920,1080],[0,0,0,0,0,0,1,0.5,0.5,0.5]],[4,"banner",2,[-18,-19,-20],[[3,-17,[34],35]],[0,"c70Q/Zg1tDcqP2ZritDbr0",1],[5,360,107],[0,375,0,0,0,0,1,1.5,1.5,1.5]],[4,"bg",1,[-22,-23],[[2,0,-21,[4],5]],[0,"5dHuanmAJBHbFdeGK2RnbR",1],[5,1920,1080],[0,0,0,0,0,0,1,0.5,0.5,0.5]],[48,"rank",1,[-24,-25,-26],[0,"3fNBnuBzNFiIA+GlZJlyvw",1],[5,300,200],[-450,61.27575,0,0,0,0,1,0.5,0.5,0.5]],[4,"Player01",5,[-28],[[3,-27,[8],9]],[0,"1fS6aI75pDtoRa0bUHmkEF",1],[5,108,108],[0,50,0,0,0,0,1,1,1,1]],[4,"Player02",5,[-30],[[3,-29,[12],13]],[0,"1dxIzAAOJJ+aD6txyevqpT",1],[5,108,108],[0,-125,0,0,0,0,1,1,1,1]],[4,"Player03",5,[-32],[[3,-31,[16],17]],[0,"941/qep0BLCIFROPSjMKrQ",1],[5,108,108],[0,-300,0,0,0,0,1,1,1,1]],[1,"container",1,[[149,1,1,100,-33,[5,100,0]]],[0,"8043U9WV5MTpU8ukZNfoKa",1],[5,100,0],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[49,"mask",2,[-35],[[137,true,-34,[24]]],[0,"10JQ1jMK1F74FhUl8U+E2J",1],[5,200,200],[0,0.5,0],[0,100,0,0,0,0,1,1,1,1]],[1,"Shape 1 copy",10,[[3,-36,[20],21],[6,-37,22,23]],[0,"87EOqpCpFE3LwQqqSfgny3",1],[5,1148,683],[0,-213.902,0,0,0,0,1,1,1,1]],[22,"bg",3,[-39],[[2,0,-38,[28],29]],[0,"d35sbDP3tDuJam5FEOL8ce",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[50,"lblBanner",12,[[58,"SẴN SÀNG",70,false,1,1,-40,[26],27],[24,"READY","SẴN SÀNG",-41]],[0,"26Wr5+Zq5DVaIEN6nTQYs1",1],[4,4282143844],[5,284.38,88.2]],[21,"ForeGround_Left",4,[[3,-42,[0],1]],[0,"fbvj4mrJ1EwrinTfcILo6r",1],[5,183,1080],[0,0,0.5],[-960,0,0,0,0,0,1,1,1,1]],[1,"Logo",4,[[3,-43,[2],3]],[0,"fbSvHRWdhKK7q6S7GKJwIK",1],[5,181,43],[-880,510,0,0,0,0,1,0.6666667,0.6666667,1]],[21,"rank",6,[[3,-44,[6],7]],[0,"1ahYJInbVJ7Z9F6GDzSExJ",1],[5,95,86],[0,0,0.5],[0,50,0,0,0,0,1,1,1,1]],[21,"rank",7,[[3,-45,[10],11]],[0,"2711A+melPx4KQ76fE8JHD",1],[5,95,86],[0,0,0.5],[0,50,0,0,0,0,1,1,1,1]],[21,"rank",8,[[3,-46,[14],15]],[0,"ce0GtvVXZCEZ6ZwFP4GDKR",1],[5,95,86],[0,0,0.5],[0,50,0,0,0,0,1,1,1,1]],[33,"bg",150,2,[[2,0,-47,[18],19]],[0,"73adhzL+BPzJ2aIPDsRXUC",1],[4,4278190080],[5,1920,1080]],[53,"lblTimer",2,[-48],[0,"b79U3RKD9JcK/EGrhQ/rgN",1],[5,118.14,150],[0,175,0,0,0,0,1,1,1,1]],[40,"5",150,150,false,1,1,2,20,[25]],[1,"Char1_Animation",3,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-49,[30],31]],[0,"9fp1pBr/pGGry/Ez176zEM",1],[5,335,305],[-195.698,-75,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",3,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-50,[32],33]],[0,"79Sy4jaDZNHaIUSGyvgEHp",1],[5,313.89,345.29],[200,-75,0,0,0,0,1,0.5,0.5,1]]],0,[0,4,1,0,51,21,0,52,2,0,-1,6,0,-2,7,0,-3,8,0,53,9,0,0,1,0,-1,4,0,-2,9,0,-3,5,0,-4,2,0,-1,19,0,-2,10,0,-3,20,0,-4,3,0,0,3,0,-1,12,0,-2,22,0,-3,23,0,0,4,0,-1,14,0,-2,15,0,-1,6,0,-2,7,0,-3,8,0,0,6,0,-1,16,0,0,7,0,-1,17,0,0,8,0,-1,18,0,0,9,0,0,10,0,-1,11,0,0,11,0,0,11,0,0,12,0,-1,13,0,0,13,0,0,13,0,0,14,0,0,15,0,0,16,0,0,17,0,0,18,0,0,19,0,-1,21,0,0,22,0,0,23,0,6,1,50],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21],[-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,8,9,-1,-1,-1,3,-1,1,-1,7,-1,7,-1,1,54,-1,-2,-3,55,56,-1,-2,-3,-1,-2,-3,-1,-2,-3,-4,-1,-2,-3,-4,-5,-1,-2,-3,-4,-5,-6,3],[0,88,0,41,0,89,0,42,0,90,0,43,0,91,0,44,0,92,0,9,0,45,45,93,0,0,0,2,0,9,4,15,4,16,0,17,94,42,43,44,0,18,31,95,96,22,97,98,30,99,100,101,102,103,104,105,106,107,108,109,110,111,112,2]],[[[150,"atom",".plist"],-1],0,0,[0],[57],[113]],[[{"name":"3rd","rect":[487,810,95,86],"offset":[0,-0.5],"originalSize":[95,87],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"UIs"],[51,"UIs",[[151,-2],[12,45,-3]],[0,"08FG1uPSBHM47a4lQxL1jy",-1],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,0,1,0,0,1,0,6,1,3],[],[],[]],[[{"name":"loading_icon","rect":[3,3,133,133],"offset":[0,0],"originalSize":[137,137],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[[5,"StageGameEnd"],[15,"StageGameEnd",[-13,-14,-15,-16,-17],[[152,-9,-8,-7,[-4,-5,-6],-3,-2],[43,2,-12,[[23,6,[[18,"d0df7MrCDxIOqiQAqLISxA9","nextStage",-10]]],[23,7,[[18,"d0df7MrCDxIOqiQAqLISxA9","previousStage",-11]]]]]],[13,-1],[5,960,540]],[49,"endGameSingle",1,[-19,-20,-21,-22,-23,-24,-25],[[2,2,-18,[94],95]],[0,"eal5PfYl9DpZbR9e+qMG4x",1],[5,274,419],[0,0.5,0],[0,-138.75,0,0,0,0,1,0.5,0.5,0.5]],[34,"1",[-27,-28,-29,-30,-31,-32],[[2,2,-26,[38],39]],[0,"40bAKJTeJFYZmyen704fEF",1],[5,274,419],[0,0.5,0],[0,-185,0,0,0,0,1,0.66667,0.66667,0.66667]],[34,"2",[-34,-35,-36,-37,-38,-39],[[2,2,-33,[54],55]],[0,"17kEs41c1GpY9Zu5zRfbcr",1],[5,274,419],[0,0.5,0],[-250,-185,0,0,0,0,1,0.66667,0.66667,0.66667]],[34,"3",[-41,-42,-43,-44,-45,-46],[[2,2,-40,[70],71]],[0,"b49SMYzyRIP6cZjC6ATtUq",1],[5,274,419],[0,0.5,0],[250,-185,0,0,0,0,1,0.66667,0.66667,0.66667]],[4,"bg",1,[-48,-49,-50],[[2,0,-47,[14],15]],[0,"1eXFkg9x5APJd3K+Xfy8h2",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[4,"banner",6,[-52,-53,-54],[[3,-51,[12],13]],[0,"e8Tf0k0jhLDJiwK5jYyWCS",1],[5,360,107],[0,250,0,0,0,0,1,1,1,1]],[35,"btnPlay",1,[[[28,1,2,-55,[16],17],[6,-56,18,19],-57,[146,2,6,-58]],4,4,1,4],[0,"bbH9Zj5XNBr7XxGIUsfhzA",1],[5,327,153],[112.5,-206.25,0,0,0,0,1,0.5,0.5,0.5]],[30,"endGameMulti",false,1,[3,4,5],[0,"31FRQPDf5IZ5UZ5qGR8Yy9",1],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[35,"btnBack",1,[[[28,1,2,-59,[20],21],-60,[6,-61,22,23]],4,1,4],[0,"a9Q82HRuZAYIlS7yS79uUJ",1],[5,327,153],[-112.5,-206.25,0,0,0,0,1,0.5,0.5,0.5]],[4,"Score_bar",2,[-63,-64],[[3,-62,[76],77]],[0,"947x1eudBEib4T1rX/nLzG",1],[5,244,79],[0,50,0,0,0,0,1,0.6666667,0.6666667,1]],[4,"Score_bar copy",2,[-66,-67],[[3,-65,[82],83]],[0,"88+XsZyvJAzrMyTG3nXrt1",1],[5,244,79],[0,145,0,0,0,0,1,0.6666667,0.6666667,1]],[22,"bg",7,[-69],[[2,0,-68,[6],7]],[0,"54d/w7Jf9JaILmmekQqCrG",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[50,"lblBanner",13,[[58,"KẾT QUẢ",70,false,1,1,-70,[4],5],[24,"RESULT","KẾT QUẢ",-71]],[0,"2bJpnHRNtO24oIGRmp+WKF",1],[4,4282143844],[5,243.67,88.2]],[4,"Score_bar",3,[-73],[[3,-72,[26],27]],[0,"f2SD52xipBzpAfpFZOqeWb",1],[5,244,79],[0,50,0,0,0,0,1,1,1,1]],[4,"Score_bar",4,[-75],[[3,-74,[42],43]],[0,"e24+DBFgpM3bzsnthqxohq",1],[5,244,79],[0,50,0,0,0,0,1,1,1,1]],[4,"Score_bar",5,[-77],[[3,-76,[58],59]],[0,"f9e+qi0ipOL4CUhDY+hr/4",1],[5,244,79],[0,50,0,0,0,0,1,1,1,1]],[1,"scoreLabel",11,[[59,"Kỷ lục",30,false,1,1,1,-78,[74],75],[24,"Record","Kỷ lục",-79]],[0,"37GBEfcXFG3JN5g0kjw/Yi",1],[5,127.57,50.4],[0,60,0,0,0,0,1,1,1,1]],[1,"scoreLabel",12,[[59,"Điểm",30,false,1,1,1,-80,[80],81],[24,"Point","Điểm",-81]],[0,"e8qWVQrb9EOaO1AtZW24LM",1],[5,102.74,50.4],[0,60,0,0,0,0,1,1,1,1]],[1,"player",2,[[41,"Người chơi 1",25,25,false,1,1,2,-82,[92],93],[24,"Player 1","Người chơi 1",-83]],[0,"8ai1nIJY9E2pv1/5EA45py",1],[5,205.22,25],[0,280,0,0,0,0,1,1,1,1]],[1,"LOGO_ELOFUN",6,[[3,-84,[0],1]],[0,"9cvQzqWl5JwYViO7vz5GZ1",1],[5,140,34],[-550,325,0,0,0,0,1,1,1,1]],[1,"ef",6,[[2,2,-85,[2],3]],[0,"10qorLKZBDmYwQgYvcT9YG",1],[5,1274,586],[50,50,0,0,0,0,1,0.8,0.8,0.8]],[1,"Char1_Animation",7,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-86,[8],9]],[0,"8eSew4KzVFxpIdAs3Z498i",1],[5,335,305],[-195.698,-75,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",7,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-87,[10],11]],[0,"b5odWJOyRAmLf76qUt6aha",1],[5,313.89,345.29],[200,-75,0,0,0,0,1,0.5,0.5,1]],[38,true,8],[38,true,10],[1,"Item",15,[[3,-88,[24],25]],[0,"3eV5FzYq5MNYeBsHurZ/oO",1],[5,49,59],[-75,0,0,0,0,0,1,1,1,1]],[1,"Khung_1st",3,[[3,-89,[28],29]],[0,"52zd6a8q5G7amzFsW9SRuX",1],[5,311,344],[0,385,0,0,0,0,1,1,1,1]],[1,"1st",3,[[3,-90,[30],31]],[0,"5dS04h33FAt7CHKH5kesC8",1],[5,124,94],[0,150,0,0,0,0,1,1,1,1]],[1,"lblScore",3,[[19,"2000",35,35,false,1,1,-91,[32],33]],[0,"14H/YaS1NJV4RypL9Io1Jf",1],[5,129.235,44.1],[35,45,0,0,0,0,1,1,1,1]],[1,"playerSprite",3,[[7,"Char1","Fly_Animation",0,false,"Fly_Animation",-92,[34],35]],[0,"015ARaoZlPRqAa79iQRUjD",1],[5,691,453],[0,300,0,0,0,0,1,1,1,1]],[1,"player",3,[[19,"Người chơi 1",25,25,false,1,1,-93,[36],37]],[0,"c40ygxiPlEQKVLruIN2dtA",1],[5,205.21,31.5],[0,280,0,0,0,0,1,1,1,1]],[1,"Item",16,[[3,-94,[40],41]],[0,"7cD6/K2hFKTb3kjhk1ptf5",1],[5,49,59],[-75,0,0,0,0,0,1,1,1,1]],[1,"Khung_2nd",4,[[3,-95,[44],45]],[0,"97Hz/1Vx9JZ4+PlSvW4FCE",1],[5,255,280],[0,350,0,0,0,0,1,1,1,1]],[1,"2nd",4,[[3,-96,[46],47]],[0,"9du1MYcDtMBJnLJj1FtdPw",1],[5,98,76],[0,150,0,0,0,0,1,1,1,1]],[1,"lblScore",4,[[19,"2000",35,35,false,1,1,-97,[48],49]],[0,"9aGXxKjEJM1rtK6ywviy8I",1],[5,129.235,44.1],[35,45,0,0,0,0,1,1,1,1]],[1,"player",4,[[19,"Người chơi 1",20,20,false,1,1,-98,[50],51]],[0,"cbcOfgMANOWrdygFxyaprQ",1],[5,164.17,25.2],[0,270,0,0,0,0,1,1,1,1]],[1,"playerSprite",4,[[7,"Char2","Fly_Animation",0,false,"Fly_Animation",-99,[52],53]],[0,"27eCJQLZBMTLE1Y+YiesU8",1],[5,691,453],[0,285,0,0,0,0,1,0.75,0.75,1]],[1,"Item",17,[[3,-100,[56],57]],[0,"08SADnlyFPeb4+8o2InF7f",1],[5,49,59],[-75,0,0,0,0,0,1,1,1,1]],[1,"Khung_3rd",5,[[3,-101,[60],61]],[0,"bcu/ABKEhNBrPPpMEJIXVo",1],[5,254,280],[0,350,0,0,0,0,1,1,1,1]],[1,"3rd",5,[[3,-102,[62],63]],[0,"56QklGyKtE1aRzR5rh8hMq",1],[5,88,67],[0,150,0,0,0,0,1,1,1,1]],[1,"lblScore",5,[[19,"2000",35,35,false,1,1,-103,[64],65]],[0,"01udCm33tCQb1r/r/+4mrw",1],[5,129.235,44.1],[35,45,0,0,0,0,1,1,1,1]],[1,"player",5,[[19,"Người chơi 1",25,25,false,1,1,-104,[66],67]],[0,"9fm6PblfNPxrVIzKpUCS7/",1],[5,205.21,31.5],[0,270,0,0,0,0,1,1,1,1]],[1,"playerSprite",5,[[7,"Char3","Fly_Animation",0,false,"Fly_Animation",-105,[68],69]],[0,"c4QKBLFrBLDJqHUEuQSoT/",1],[5,691,453],[0,285,0,0,0,0,1,0.75,0.75,1]],[1,"Item",11,[[3,-106,[72],73]],[0,"2ev+fJMGVHW6ySUmlI8fdE",1],[5,49,59],[-85,0,0,0,0,0,1,1,1,1]],[1,"Item",12,[[3,-107,[78],79]],[0,"429lwjfmxLjpCkgmMIc3Ge",1],[5,49,59],[-85,0,0,0,0,0,1,1,1,1]],[1,"Khung_1st",2,[[3,-108,[84],85]],[0,"70tqwBmthGe4QL+NrWha+Z",1],[5,311,344],[0,385,0,0,0,0,1,1,1,1]],[1,"lblScore",2,[[41,"2000",28,35,false,1,1,2,-109,[86],87]],[0,"76LOoIbfxA47FDtkXXr0uY",1],[5,103.38,35],[20,142.5,0,0,0,0,1,1,1,1]],[1,"lblHighScore",2,[[41,"2000",28,35,false,1,1,2,-110,[88],89]],[0,"e8arnK1N5IDYyBs3iwCUM2",1],[5,103.38,35],[20,47.5,0,0,0,0,1,1,1,1]],[1,"playerSprite",2,[[7,"Char3","Fly_Animation",0,false,"Fly_Animation",-111,[90],91]],[0,"1c+N2+aPpJfLk2X+s0y8RK",1],[5,691,453],[0,285,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,58,2,0,59,9,0,-1,3,0,-2,4,0,-3,5,0,60,26,0,61,25,0,0,1,0,10,1,0,10,1,0,0,1,0,-1,6,0,-2,8,0,-3,10,0,-4,9,0,-5,2,0,0,2,0,-1,11,0,-2,12,0,-3,47,0,-4,48,0,-5,49,0,-6,50,0,-7,20,0,0,3,0,-1,15,0,-2,28,0,-3,29,0,-4,30,0,-5,31,0,-6,32,0,0,4,0,-1,16,0,-2,34,0,-3,35,0,-4,36,0,-5,37,0,-6,38,0,0,5,0,-1,17,0,-2,40,0,-3,41,0,-4,42,0,-5,43,0,-6,44,0,0,6,0,-1,21,0,-2,22,0,-3,7,0,0,7,0,-1,13,0,-2,23,0,-3,24,0,0,8,0,0,8,0,-3,25,0,0,8,0,0,10,0,-2,26,0,0,10,0,0,11,0,-1,45,0,-2,18,0,0,12,0,-1,46,0,-2,19,0,0,13,0,-1,14,0,0,14,0,0,14,0,0,15,0,-1,27,0,0,16,0,-1,33,0,0,17,0,-1,39,0,0,18,0,0,18,0,0,19,0,0,19,0,0,20,0,0,20,0,0,21,0,0,22,0,0,23,0,0,24,0,0,27,0,0,28,0,0,29,0,0,30,0,0,31,0,0,32,0,0,33,0,0,34,0,0,35,0,0,36,0,0,37,0,0,38,0,0,39,0,0,40,0,0,41,0,0,42,0,0,43,0,0,44,0,0,45,0,0,46,0,0,47,0,0,48,0,0,49,0,0,50,0,6,1,3,5,9,4,5,9,5,5,9,111],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,26,26],[-1,1,-1,1,-1,3,-1,1,-1,7,-1,7,-1,1,-1,1,-1,1,8,9,-1,1,8,9,-1,1,-1,1,-1,1,-1,1,-1,3,-1,7,-1,3,-1,1,-1,1,-1,1,-1,1,-1,1,-1,3,-1,3,-1,7,-1,1,-1,1,-1,1,-1,1,-1,1,-1,3,-1,3,-1,7,-1,1,-1,1,-1,3,-1,1,-1,1,-1,3,-1,1,-1,1,-1,3,-1,3,-1,7,-1,3,-1,1,11,12,11,12],[0,33,0,114,0,2,0,9,4,15,4,16,0,17,0,34,0,46,115,46,0,47,116,47,0,13,0,14,0,48,0,117,0,2,4,8,0,2,0,19,0,13,0,14,0,118,0,119,0,2,0,2,4,8,0,19,0,13,0,14,0,120,0,121,0,2,0,2,4,8,0,19,0,13,0,2,0,14,0,13,0,2,0,14,0,48,0,2,0,2,4,8,0,2,0,19,0,18,0,18]],[[{"name":"Logo","rect":[187,975,181,43],"offset":[0,0],"originalSize":[181,43],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Char3","rect":[268,798,108,108],"offset":[0,0],"originalSize":[108,108],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Waiting","rect":[3,948,154,32],"offset":[0,0],"originalSize":[154,32],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Txt_RoomCode","rect":[3,3,630,320],"offset":[0,0],"originalSize":[630,320],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[[5,"Loading Cover"],[31,"Loading Cover",[-5],[[12,45,-2],[153,-4,-3]],[0,"425RuVPuxFxa/9Mfr5Anzl",-1],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]],[32,"Container",1,[-7,-8],[[12,45,-6]],[0,"e3chFbfklMNo9XIuGirfSv",1],[5,1280,720]],[11,"BG",2,[[12,45,-9],[56,-11,-10]],[0,"1bSRbLWIVFkYlMhX8u9/gj",1],[5,1280,720]],[11,"loading_icon",2,[[3,-12,[0],1],[44,-13]],[0,"5be+Z0kCpDO4RcS/0KM7Cq",1],[5,133,133]]],0,[0,4,1,0,0,1,0,62,2,0,0,1,0,-1,2,0,0,2,0,-1,3,0,-2,4,0,0,3,0,14,3,0,0,3,0,0,4,0,0,4,0,6,1,13],[0,0],[-1,1],[0,23]],[[[14,"Buttons",".mp3",0.10449],-1],0,0,[],[],[]],[[{"name":"Char02","rect":[3,616,154,96],"offset":[0,0],"originalSize":[154,96],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"StageStartGame"],[15,"StageStartGame",[-4,-5,-6,-7],[[154,-3,-2]],[13,-1],[5,960,540]],[1,"Start_BTN",1,[[3,-8,[2],3],[6,-9,4,5]],[0,"d7cktjsiZC3pUICsHO/NL2",1],[5,581,330],[0,-56.25,0,0,0,0,1,0.5,0.5,0.5]],[1,"GameName",1,[[3,-10,[6],7],[6,-11,8,9]],[0,"aaXk13LjFOxZlY/NedeN/b",1],[5,207,141],[-375,187.5,0,0,0,0,1,0.5,0.5,0.75]],[1,"bg",1,[[2,0,-12,[0],1]],[0,"dcc4JAiqpB9bI/b4OqRF+/",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[1,"Logo",1,[[3,-13,[10],11]],[0,"84tSHCADdB2Ks/89p6mvRZ",1],[5,181,43],[0,251.25,0,0,0,0,1,0.5,0.5,0.5]]],0,[0,4,1,0,63,2,0,0,1,0,-1,4,0,-2,2,0,-3,3,0,-4,5,0,0,2,0,0,2,0,0,3,0,0,3,0,0,4,0,0,5,0,6,1,13],[0,0,0,0,0,0,0,0,0,0,0,0],[-1,1,-1,1,8,9,-1,1,8,9,-1,1],[0,122,0,49,123,49,0,25,24,25,0,41]],[[[5,"Localization"],[17,"Localization",[[155,-2]],[37,"222jEG7UlOFL6oRdKJB1xV",-1,0]]],0,[0,4,1,0,0,1,0,6,1,2],[],[],[]],[[[156,"game",null],[79,"Canvas","1ejC82zbNJkaSuMcrSgbBo",[-4],[[157,-1,[5,960,540]],[12,45,-2],[158,-3,[0,1,2,3,4,5],[6,7,8,9,10]]],[5,960,540],[480,270,0,0,0,0,1,1,1,1]],[159,"New Node",false,true,[1],[0,0,0],[0,0,0,0,0,0,1,1,1,1]],[80,"Main Camera",1,[[160,7,-1,-5]],[0,0,231.22878281044513,0,0,0,1,1,1,1]]],0,[0,0,1,0,0,1,0,0,1,0,-1,3,0,0,3,0,64,2,1,5,2,5],[0,0,0,0,0,0,0,0,0,0,0],[-1,-2,-3,-4,-5,-6,-1,-2,-3,-4,-5],[124,125,126,127,128,129,130,131,132,133,134]],[[{"name":"BG_WaitingRoom_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[135]],[[{"name":"Khung_Character","rect":[778,648,234,333],"offset":[0,0],"originalSize":[234,333],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Txt_RoomCode","rect":[658,3,639,320],"offset":[0,0],"originalSize":[639,320],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Đang chờ..","rect":[3,987,178,33],"offset":[0.5,0],"originalSize":[179,33],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Tree3","rect":[3,718,99,150],"offset":[0,0],"originalSize":[99,150],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[161,"SVN-Supercell-Magic","SVN-Supercell-Magic.ttf"],-1],0,0,[],[],[]],[[{"name":"Bone","rect":[163,617,119,69],"offset":[0,0],"originalSize":[119,69],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Char2","rect":[268,912,108,108],"offset":[0,0],"originalSize":[108,108],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"3rd","rect":[536,948,88,67],"offset":[0.5,0],"originalSize":[89,67],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"FrameMgr"],[17,"FrameMgr",[[162,-2]],[0,"27y5kv10JGtp43T01mWJ02",-1]]],0,[0,4,1,0,0,1,0,6,1,2],[],[],[]],[[{"name":"Người chơi 3","rect":[984,3,194,33],"offset":[0,0],"originalSize":[194,33],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Home","rect":[216,3,327,153],"offset":[0,0],"originalSize":[327,153],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[{"name":"Tree2","rect":[403,600,99,150],"offset":[0,0],"originalSize":[99,150],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Map1","rect":[0,0,603,1080],"offset":[0,0],"originalSize":[603,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[136]],[[[5,"Events"],[17,"Events",[[163,-2]],[37,"e8+0wKfOVO6pSF3cLWwNah",-1,0]]],0,[0,4,1,0,0,1,0,6,1,2],[],[],[]],[[{"name":"ZigZac_Scan_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[137]],[[[5,"PopupManager"],[31,"PopupManager",[-7,-8,-9],[[12,45,-2],[164,-6,-5,-4,-3]],[0,"e6NYRDQ8tMDI2YBs4wI67s",-1],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]],[81,"Popup Bg",false,180,1,[[2,0,-10,[0],1],[109,45,2,2,-11]],[0,"22r0HsLvROCrF3tNiNzX5g",1],[4,4278190080],[5,1280,720.0000000000001],[0,0,0,0,0,0,1,1,0.9999999999999999,1]],[11,"Shown Popups",1,[[12,45,-12]],[0,"c3CnAi//VPh47kwQ+eb9pd",1],[5,1280,720]],[82,"Popup Container",false,1,[0,"11j0ZlJulMTKrsoJG/QIXx",1]]],0,[0,4,1,0,0,1,0,65,3,0,66,4,0,67,2,0,0,1,0,-1,4,0,-2,2,0,-3,3,0,0,2,0,0,2,0,0,3,0,6,1,12],[0,0],[-1,1],[0,7]],[[{"name":"default_btn_pressed","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[0],0,[0],[2],[138]],[[[5,"Stages"],[51,"Stages",[[165,-2,[0,1,2,3,4,5]],[12,45,-3]],[13,-1],[5,960,540],[480,270,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,0,1,0,0,1,0,6,1,3],[0,0,0,0,0,0],[-1,-2,-3,-4,-5,-6],[139,140,141,142,143,144]],[[{"name":"GameName","rect":[3,142,207,141],"offset":[0,0],"originalSize":[209,141],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[[14,"Select",".mp3",0.2165],-1],0,0,[],[],[]],[[{"name":"default_btn_normal","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[0],0,[0],[2],[145]],[[{"name":"Thorn","rect":[159,742,122,73],"offset":[-1.5,-4.5],"originalSize":[125,82],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Glow","rect":[3,292,466,465],"offset":[36.5,-3.5],"originalSize":[549,484],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Flare","rect":[1,1,29,29],"offset":[-0.5,0.5],"originalSize":[32,32],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[146]],[[[14,"SFX_Endscreen",".mp3",3.604898],-1],0,0,[],[],[]],[[{"name":"road","rect":[245,3,236,236],"offset":[0,0],"originalSize":[236,236],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Noidung_Guide","rect":[0,0,1155,738],"offset":[0,0],"originalSize":[1155,738],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[147]],[[{"name":"Home","rect":[3,336,327,153],"offset":[0,0],"originalSize":[327,153],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]]]] \ No newline at end of file diff --git a/assets/main/import/08/087adbee5.cb20e.json b/assets/main/import/08/087adbee5.cb20e.json new file mode 100644 index 0000000..d3180dc --- /dev/null +++ b/assets/main/import/08/087adbee5.cb20e.json @@ -0,0 +1 @@ +[1,["ecpdLyjvZBwrvm+cedCcQy","13834b9cd","d9naGJA1JBDbViZmkWgqjV","1bd4a81d0","7a/QZLET9IDreTiBfRn2PD","19db12b98","7fIeYSqoJCLZ6mdzQGEmFB","3fVcogOMtCnawsDSlmYf6Q","8a6686cUVG5oX7684vmw40","a2MjXRFdtLlYQ5ouAFv/+R","d70EC+Nj9CLrdekjX7bkqU","110836bd5","197f6f60f","a7OfeHzAFKgboKWB8H7Myh","3ath2hLFRBVLpn+Nkp0Hsr","30sWYJF9dMVYBV5ZHcSnXv","6cN0HN3SxIoK66zUSfobRw","9eim3FsO9LDrljceAAKr11","3ae7efMv1CLq2ilvUY/tQi","865wWpgR5J74ceuJ+4C9HV","43APlBugNNGb2xlZ70DxhS","7bRh+DjwNCxLBXb84nHye4","b78N+ZtwZGnJnnHGTAhhEb","78WwcvlnhJk6mYpDkR8RUK","ebnOSGnn5NF6CXCC4bIU4y","bfWjaA+o9OYo/iVnRa9XrO","f4ipEZostIl75FqCL79pAd","d5w4PYsEBFxJ7OFPALnekU","a1U5RdJRFMFL57BdJC9H1X","b2aHrECZ5APKGS/0d2hvT1","57nfWaBehJXpJ2P8MAPtKX","e0BAHF6idNu5K2a+Fqx8d7","05W7AonMRD0ZhGV7eNmBFs","3eokK7Q69KGowfk7+CzAmN","d3ClhbhMZCCZo7u3vxRsWo","77lcwqDrNA2aza2wm5aXX4","48NztQmi1Hbqh0fLwrAtqi","d5+qnWVmBPZLwh8MzHPhLz","a4rd+eFCVLLaw9aUJU5BQl","32JrNCo/pLJ4IE6gw/xtF3","dexYn7zgZNwojySgr8UOrD","baZrCM5EJB5Kxs8Q/MoRJM","16aGFjmuFB1ry72aQnhRIV","3cM0N7r91KD6mFkfGR9U1F","b2s4Fxh15JS6JLJvG+AEBx","37IdAtij1BHqsDo+i6UmPs","1cveSaYgdL0q6YQzEeSy/+","de9Zfqf7FBfqWQiB+pb/bX","709X0VX1JHvrObbYSChXvX","77JRXmFrhMcYE7I9WxJDsY","84HZH67WlK4IFctOtYV3od","a5vugzmiRFcaeRtIfqQiMQ","08+ItpxuBAJLxwbNFP4FN8","59npvrSsNLP6358vH5eo1A","f5ZZG+vUpKbK7akuNt2Dtv","77bRX6kd5CKI3Bhr9+rLva","1e/qZbDwBHBqfmljK4ieYq","c0NmQqOwRF3IO/eRfGVZcm","a5POJ+yYxEkKwKHX9g6Svk","60AwGqM1dKELCGhPAR+jK6","d0qC05vt5GxLaYyB/w3t//","d0DUTsaLFI6YjuMUjA138i","89arjCzMBEBLNY0c1Rlt1Y","c3FVxFtwhIrbINpNIj0PMW","0bp3UMsBhK5LKc1b8o86IL","54tkQqqoRAE6Ghu4QwDAgd","5980ZmQsZKur0nDa4QmJ8x","69cJ6mf9FBF5JXXF8TUGeu","f6B/EMISRNba+h8dlALV4s","18vNJZKklLnLOiQttOjWyl","c2uYevjsBDa6SXRIsin9QB","edmHG92QBOeYLWZ8iFqrS6","f6NiDkH1ZLxY/KTdHkyxrs","68INk1h8FOFqcssrGKI7oJ","60ewcUng1Px4Cf/Z++gTIB","e66izAIq5MoYeaw6UEE7m9","02delMVqdBD70a/HSD99FK","62DA7JDzFCa4aDy3ddmDZm","a0DJbYS1xJ9r+DfLi/sRN9","45ixMaNUhGqriFLcY4+Mst","c1r27+DstLNbrdX3qX3Hho","a9utVHvnRDlL+i2aq6w6k2","adnYKjllpGcZmcLKnyXMIj","81H1h6QppKRbBkNGkSJStK","72nHxR9INFCp945JoKMSHZ","c3jqOjn/pJbYpGVg4ye8Qy","66mB58E3ZDppWuqgsm1t8b","02rqr/TSVL7pZqVOodCtzz","89eFFFqiRIDJMHSsmnLed0","deBs+390NPZqAw/2jKfeTS","be3JQP4eNLj65fS6lIAh+M","ffTFAoOoFMlKBguuhCOUdO","68HX4D2QZCdKg4A/HoxLQA","089dyLZfdN4aZl95pJ0/0j","aaiHzvYRFOtpBgx6k/469l","5chAz64mVDgLYUIRoZ4Di4","fe1vXPhnhFWbYSz20Lw5vv","04sCXKHzJN46FuoXjxnI4a","9bbNwRBChPQZphy7qb8Z5f","461VvWPgBGMqUZ25dyYKuw","dbJ1/FG/9Gp6KNh8msVkan","0bPMgx0W9M4YgsVwytK/Yl","1c9k/vUhpEF5QAfJkaUD3s","8eZVlKJ7hFUJ6Mx8PA3+kC","15gey8oc9Cqr+s4B1BKE0E","f21vmLVBFLzbab6Y8I3iTj","82wZgZiCJK9KYjnWcBmzDP","df0kwGW+9HBLV/NRjVj+P3","d8nxcs8ZtGh5+6FfhlB5Hx","12jhDypJxBWq0LS3lkFHoX","4baqINv+FON5WXR54mf90k","47LfXTNedBhJ5sf0G+5l7j","24FOXuv3pLn6A8U0oZc32Q","a9ndjleDpKgLxDbhKl5Kyh","ff274HzxJOfq7zm3GBkd8P","72+DrtTKNIyKTARiOpVKWY","73rBJ/iAREpp1bKWDb3A7K","289VPq4OlM9KoTOBsOIGXs","70mwglqDxEeZOPKM9YgMqR","debHarSSpKnLl4RQPijPRu","3cR/6w9aVE64iEAsTbbxMK","56xNcuUgtC8aeihyXXLaXv","33iXx2NNxKHZloGMMwH2PT","e0Qg4UUOtPRbJup3M32ERG","debzmRv1VDDb7GOfQzo97p","c5AIbjn/hDlI0L+1R8rjC7","8fRKJclkpEer+e4Dc3Me/j","77gL8blpVJuLccLFWaeDA9","eaySrZ+G9OHpkIwUHb4PPy","b7E+vivl5O67m+pLdIT/Nl","e90ku2kIROeYW9z9dGZZfD","c13eP11StKPZVYw/WuxBbh","40f9fLVthBHJ/g9Lnw+0ts","14EV6EC5FLQKNBf68ju0Lk","f37xhO14BK27BpUsoLTbP7","eaCVxnbQxAyLBxD2m6JnYo","95+I4EhJdLUrpbIGGvLoRQ","a9l1kB0ixF74BjWICG3COP","af0jhUgVFNqLhFhJLQpmAr","b9u+Zq6pFDQ7vZfNIdSnkl","c33Z9t2ohEOaUJTIZC0NK5","1d6Kjc6/1AcpYt089/03Hm","f8MKtBrYNMgbGWqE/4Cz5s","dawHr/+FRDrZaz5CtGtENS"],["node","_spriteFrame","_textureSetter","_N$file","root","data","_N$skeletonData","EN","VI","_parent","target","_file","_normalMaterial","_grayMaterial","ballHolder","holder","_N$target","player","qrCode","timeToBounceHolder","fadeWallHolder","wall","trajectoryLine","fadeWall","timeNeedToTouch","label","lblScorePlus","diamondParticle","diamondSprite","PlayGround","popupLabel","bannerLabel","diamondContainer","bg","lblScore","cuboidContainer","_effectAsset","BGM","SFX_BUTTON","SFX_SELECT","SFX_ENDSCREEN","SFX_EXPLODE","SFX_CRYSTAL","msg","lblRoomCode","btnNext","normalSpine","graySpine","lblTimer","tutorialPopup","container","playGround","normalSprite","graySprite","spriteFrame","endGameSingle","endGameMulti","btnBack","btnPlay","Container","startButton","scene","ShownPopups","PopupContainer","PopupBackground"],["cc.SpriteFrame",["cc.Node",["_name","_groupIndex","_active","_opacity","_id","_prefab","_components","_parent","_contentSize","_trs","_children","_color","_eulerAngles","_anchorPoint"],-2,4,9,1,5,7,2,5,5,5],["cc.Label",["_string","_isSystemFontUsed","_N$horizontalAlign","_N$verticalAlign","_lineHeight","_fontSize","_N$cacheMode","_N$overflow","_materials","node","_N$file"],-5,3,1,6],["cc.Node",["_name","_groupIndex","_active","_components","_prefab","_parent","_contentSize","_trs","_color","_children"],0,2,4,1,5,7,5,2],["cc.Sprite",["_sizeMode","_type","_dstBlendFactor","node","_materials","_spriteFrame"],0,1,3,6],["cc.BoxCollider",["tag","node","_size","_offset"],2,1,5,5],["cc.Node",["_name","_groupIndex","_components","_prefab","_contentSize","_parent","_color","_trs"],1,12,4,5,1,5,7],["cc.PrefabInfo",["fileId","root","asset"],2,1,1],["cc.RigidBody",["_gravityScale","_type","enabledContactListener","node"],0,1],["cc.ParticleSystem",["_dstBlendFactor","_custom","totalParticles","duration","emissionRate","life","angle","angleVar","startSize","startSizeVar","speed","tangentialAccel","_srcBlendFactor","_positionType","autoRemoveOnFinish","lifeVar","endSize","endSizeVar","startSpinVar","endSpinVar","speedVar","tangentialAccelVar","radialAccel","radialAccelVar","playOnLoad","node","_materials","_startColor","_startColorVar","_endColor","_endColorVar","posVar","_file","_spriteFrame","gravity"],-22,1,3,8,8,8,8,5,6,6,5],["cc.Widget",["_alignFlags","_right","_bottom","_originalWidth","_originalHeight","node"],-2,1],["cc.CircleCollider",["_radius","tag","node"],1,1],["cc.Button",["_N$enableAutoGrayEffect","node","_N$target"],2,1,1],["cc.Mask",["_N$alphaThreshold","_N$inverted","node","_materials"],1,1,3],["sp.Skeleton",["defaultSkin","defaultAnimation","_preCacheMode","premultipliedAlpha","_animationName","timeScale","node","_materials","_N$skeletonData"],-3,1,3,6],["1c65drFRtpG/LO3xlybZ0cn",["type","actionPhase","node","actionHandler"],1,1,9],["cc.AudioClip",["_name","_native","duration"],0],["cc.Prefab",["_name"],2],["0c894rNk45KaZ1YxbpCwkvS",["node","ballHolder"],3,1,1],["cc.PhysicsCircleCollider",["_density","_friction","_restitution","_radius","node"],-1,1],["7c355CUI69PM6g7uROFEL0+",["node"],3,1],["250d1eyNKNE8YBb3TY+ZhBo",["node","wall","fadeWallHolder","timeToBounceHolder","ballHolder"],3,1,1,1,1,1],["ad4efPsBOtAZqP0kazbwXDn",["moveSpeed","node","ball","trajectoryLine"],2,1,1,1],["cc.PhysicsBoxCollider",["node","_size"],3,1,5],["f2113SZgMVJLpPG2bS7uOAw",["node","holder"],3,1,1],["ab89e3YJghAfZuNvXoYnmFX",["node","holder"],3,1,1],["cc.Graphics",["node","_materials"],3,1,3],["bdaffaF72hHi4PuAcpqk95k",["width","trailLength","node","color","target"],1,1,5,1],["e06c1K0nHtLqrm+uKkRc3aJ",["node"],3,1],["1589dfnk4VMIp1dekOxl3G2",["node","timeNeedToTouch","fadeWall"],3,1,1,1],["84042I9KIdEGo233ywZTGud",["TimeNeedToTouch","node"],2,1],["70e104pF95DF4JScfXbPalN",["node"],3,1],["bbc84lQ+TNPhogR2CwFzPYR",["node","winWall"],3,1,1],["sp.SkeletonData",["_name","_atlasText","textureNames","_skeletonJson","textures"],-1,3],["d20a0HD4J5Lx6vX5OXcGy4+",["node"],3,1],["cc.ParticleAsset",["_name","_native"],1],["1bcb2GEmxRB1458fn5Fjmnu",["node","player"],3,1,1],["085b587D41NjKlGgaQmpnmJ",["node","player","diamondSprite","diamondParticle","lblScorePlus"],3,1,1,1,1,1],["9a52dKv1yRLFb9DOGF+w6r+",["node","PlayGround"],3,1,1],["7c0988P9KdKaoNjh5pLuFPn",["node","cuboid","diamond","cuboidBase","playerBall","dragonSP","endGamePopup"],3,1,1,1,1,1,3,1],["055aeKjXC5P5JH+PuFhm8cO",["node","PlayGround"],3,1,1],["a17f9LZSlxJWIxURW1Pdn8u",["node","PlayGround"],3,1,1],["cc.EffectAsset",["_name","shaders","techniques"],0],["cc.Material",["_name","_techniqueData"],1],["f9ace5O2YJCy7edETP5LCWv",["node"],3,1],["2fbc04KsHtO9rOLJqTjEbZu",["node","BGM","SFX_BUTTON","SFX_SELECT","SFX_ENDSCREEN","SFX_EXPLODE","SFX_CRYSTAL"],3,1,6,6,6,6,6,6],["824b3x307FID6iZwnCxazfr",["node","qrCode"],3,1,1],["PeerHandler",["actionName","eventHandler"],2,9],["cc.ClickEvent",["_componentId","handler","target"],1,1],["9bb946QoZVOMKPUS/9hPO3J",["node"],3,1],["8ba3d+Bn6NI76jJhS1uJSSp",["node","EN","VI"],3,1,6,6],["8d77cuBjJ1BGq6/i3kFeUx7",["size","node","qrCode","loadingCover"],2,1,1,1],["cd1c1/ESEpLhb7U8uTj4hYv",["node","qrCode","btnNext","lblRoomCode","players","msg","normalSpine","graySpine"],3,1,1,1,1,2,1,6,6],["8531fDf7L1KwZdv2KsCCznt",["node","container","playerAvatar","playerRankSpriteFrames","tutorialPopup","lblTimer","bgSpriteFrames","roadSpriteFrames","objectsSpriteFrame1","objectsSpriteFrame2","objectsSpriteFrame3","playGround","normalSprite","graySprite"],3,1,1,2,3,1,1,3,3,3,3,3,6,6,6],["cc.Layout",["_resize","_N$layoutType","_N$paddingLeft","node","_layoutSize"],0,1,5],["d9adbSs7VdIeaPiYGmWgXvR",["EN","VI","node"],1,1],["8e195aDavdHDKGbdlAqNUxo",["node"],3,1],["d0df7MrCDxIOqiQAqLISxA9",["node","btnPlay","btnBack","playerRankBases","endGameMulti","endGameSingle"],3,1,1,1,2,1,1],["5efa34rLMBL6Z7zYO5/5lDg",["node","Container"],3,1,1],["0e252LdYfhIyIZLhk6PCy9f",["node","startButton"],3,1,1],["bd45doTXaVJGazSbf1+Ekni",["node"],3,1],["cc.SceneAsset",["_name","asyncLoadAssets"],1],["cc.Canvas",["node","_designResolution"],3,1,5],["1b8496GkHdFirfeeZ/dlzhB",["node","SystemPrefabs","PlaceHolderPrefabs"],3,1,3,3],["cc.Scene",["_name","_active","autoReleaseAssets","_children","_anchorPoint","_trs"],0,2,5,7],["cc.Camera",["_clearFlags","_depth","node"],1,1],["cc.TTFFont",["_name","_native"],1],["2af42k1WypJMIZ/nsc3uFll",["node"],3,1],["ea18dqOuq1Cx7O+U51FB9JD",["node"],3,1],["30835F+tMxLu4+MZ1zfvBzu",["node","PopupBackground","PopupContainer","ShownPopups"],3,1,1,1,1],["fd6a8RrsDtCgJjnXG0oVHlf",["node","StagePrefabs"],3,1,3]],[[7,0,1,2],[1,0,7,6,5,8,9,2],[4,0,3,4,5,2],[4,3,4,5,1],[1,0,7,10,6,5,8,9,2],[17,0,2],[50,0,1,2,1],[14,0,1,2,3,4,6,7,8,6],[5,0,1,3,2,2],[1,0,1,7,10,6,5,8,9,12,3],[1,0,1,7,6,5,9,12,3],[10,0,5,2],[1,0,7,6,5,8,2],[7,1,1],[16,0,1,2,4],[1,0,10,6,5,8,2],[1,0,6,5,2],[23,0,1,1],[2,0,5,4,1,2,3,9,8,10,7],[1,0,1,7,6,5,8,9,3],[1,0,7,6,5,8,13,9,2],[1,0,7,10,6,5,11,8,9,2],[8,1,0,3,3],[47,0,1,2],[48,0,1,2,3],[55,0,1,2,3],[1,0,7,10,5,2],[1,0,7,5,2],[1,0,2,7,10,5,9,3],[1,0,10,6,5,8,9,2],[1,0,7,10,6,5,8,2],[1,0,3,7,6,5,11,8,3],[1,0,10,6,5,8,13,9,2],[6,0,5,2,3,4,7,2],[3,0,5,3,4,6,7,2],[7,0,1,2,2],[4,1,0,3,4,5,3],[2,0,5,4,1,2,3,6,9,8,8],[2,0,5,4,1,2,3,6,9,8,10,8],[33,0,1,2,3,4,5],[12,0,1,2],[15,0,2,3,2],[49,0,1],[1,0,7,10,6,5,2],[1,0,1,7,6,5,3],[1,0,1,7,6,5,9,3],[1,0,1,7,6,5,8,9,12,3],[1,0,7,10,5,8,9,2],[1,0,7,10,6,5,8,13,9,2],[1,0,7,6,5,11,8,2],[1,0,6,5,8,9,2],[3,0,5,3,4,8,6,7,2],[3,0,5,9,3,4,7,2],[26,0,1,1],[5,1,2,1],[5,0,1,2,2],[2,0,5,4,1,2,3,7,6,9,8,9],[2,0,4,1,2,3,9,8,10,6],[2,0,5,1,2,3,6,9,8,10,7],[12,1,2,1],[35,0,1,3],[51,0,1,2,3,2],[1,0,1,10,6,5,8,3],[1,0,2,7,10,6,5,3],[1,0,2,1,6,5,8,4],[1,0,7,10,6,5,9,2],[1,0,7,6,5,2],[1,0,2,7,6,5,3],[1,0,6,5,11,8,9,2],[1,0,1,7,10,6,5,8,13,9,12,3],[1,0,1,10,6,5,11,8,9,12,3],[1,0,1,7,10,6,5,9,3],[1,0,10,6,5,9,12,2],[1,0,10,5,2],[1,0,7,10,5,9,2],[1,0,7,10,5,8,2],[1,0,1,7,10,5,8,9,12,3],[1,0,2,3,7,6,5,8,9,4],[1,0,7,6,5,11,8,9,2],[1,0,4,10,6,8,9,3],[1,0,7,6,9,2],[1,0,2,3,7,6,5,11,8,9,4],[1,0,2,7,5,3],[6,0,1,2,3,6,4,3],[6,0,5,2,3,2],[3,0,9,3,4,6,2],[3,0,1,5,3,4,6,3],[3,0,1,5,3,4,3],[3,0,2,1,5,3,4,8,6,7,4],[3,0,5,3,4,6,2],[3,0,5,3,4,8,6,2],[18,0,1,1],[8,0,2,3,3],[8,1,3,2],[19,0,1,2,3,4,5],[4,0,3,4,2],[4,2,0,3,4,5,3],[20,0,1],[21,0,1,2,3,4,1],[22,0,1,2,3,2],[24,0,1,1],[25,0,1,1],[27,0,1,2,3,4,3],[28,0,1],[5,0,1,3,2],[29,0,1,2,1],[30,0,1,2],[11,0,2,2],[11,1,0,2,3],[31,0,1],[32,0,1,1],[2,0,9,8,2],[2,0,1,2,3,6,8,6],[2,0,4,1,2,3,7,9,8,7],[2,0,4,1,2,3,7,9,8,10,7],[2,0,5,4,1,2,3,7,6,9,8,10,9],[2,0,5,1,2,3,9,8,10,6],[9,0,1,14,2,3,4,5,15,6,7,8,9,16,17,18,19,10,20,11,21,22,23,25,26,27,28,29,30,31,34,32,33,23],[9,12,0,1,2,3,4,5,6,7,8,9,13,10,11,25,26,27,28,29,30,31,32,33,15],[9,12,0,1,24,2,3,4,5,6,7,8,9,13,10,11,25,26,27,28,29,30,31,16],[34,0,1],[10,0,1,2,5,4],[10,0,3,4,5,4],[36,0,1,1],[37,0,1,2,3,4,1],[38,0,1,1],[39,0,1,2,3,4,5,6,1],[13,0,2,3,2],[13,1,2,3,2],[40,0,1,1],[41,0,1,1],[14,0,1,2,3,5,4,6,7,8,7],[42,0,1,2,4],[43,0,1,3],[44,0,1],[45,0,1,2,3,4,5,6,1],[46,0,1,1],[15,0,1,2,3],[52,0,1,2,3,4,5,6,7,1],[53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,1],[54,0,1,2,3,4,4],[56,0,1],[57,0,1,2,3,4,5,1],[58,0,1,1],[59,0,1,1],[60,0,1],[61,0,1,3],[62,0,1,1],[63,0,1,2,1],[64,0,1,2,3,4,5,4],[65,0,1,2,3],[66,0,1,3],[67,0,1],[68,0,1],[69,0,1,2,3,1],[70,0,1,1]],[[[{"name":"BG","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[50]],[[{"name":"Dry_Tree","rect":[487,3,109,235],"offset":[0,0],"originalSize":[109,235],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"ZigZac_Scan_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[51]],[[{"name":"Map2","rect":[0,0,603,1080],"offset":[0,0],"originalSize":[603,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[52]],[[{"name":"Rock","rect":[173,486,60,46],"offset":[0,0],"originalSize":[60,46],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Char03","rect":[245,394,179,124],"offset":[0,0],"originalSize":[179,124],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Tree4","rect":[390,705,99,117],"offset":[0,0],"originalSize":[101,117],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Tree3","rect":[3,486,124,164],"offset":[-0.5,0],"originalSize":[125,164],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"1st","rect":[382,933,95,86],"offset":[0,0],"originalSize":[95,86],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[14,"BGM_Game",".mp3",209.808],-1],0,0,[],[],[]],[[{"name":"Continue_To_Play","rect":[754,383,327,153],"offset":[0,0],"originalSize":[327,153],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Tree","rect":[245,245,143,189],"offset":[-0.5,0],"originalSize":[144,189],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"StageTestGame"],[15,"StageTestGame",[-4,-5,-6],[[91,-3,-2]],[13,-1],[5,960,540]],[62,"Ball",2,[-11],[[92,0,true,-7],[94,0,0,1,30,-8],[2,0,-9,[8],9],[97,-10]],[0,"09p0dId9pN64jDP3BVUr3S",1],[5,40,40]],[43,"PlayGround",1,[-17,-18,-19,-20,-21],[[98,-16,-15,-14,-13,-12]],[0,"96GAegUlxJu5vyTY9SvzkA",1]],[63,"BallHolder",false,3,[2,-24,-25],[[99,500,-23,2,-22]],[0,"5cp2c/Yj9A1YFL4gqMEgSL",1]],[26,"Wall",3,[-26,-27,-28,-29],[0,"2dfPgW2/lDNLNaRadOw4f0",1]],[83,"FadeAbleWall",1,[[[2,0,-30,[12],13],[93,0,-31],[17,-32,[5,100,230]],-33],4,4,4,1],[0,"91V7G0TvdI3ZfT6WZTS1dY",1],[4,4278190330],[5,100,230]],[34,"Score",3,[-34,-35],[0,"e4RnSYQ0tEOrJQiMVHC08T",1],[5,104.49,50.4],[0,142.956,0,0,0,0,1,1,1,1]],[19,"Left",1,5,[[2,0,-36,[0],1],[22,0,0,-37],[17,-38,[5,100,1334]]],[0,"2eHbF/imBB7pVsEt6JujPl",1],[5,100,1334],[-480,0,0,0,0,0,1,1,1,1]],[19,"Right",1,5,[[2,0,-39,[2],3],[22,0,0,-40],[17,-41,[5,100,1334]]],[0,"1feE2p22JK5KwXv2FItmrw",1],[5,100,1334],[480,320,0,0,0,0,1,1,1,1]],[19,"Top",1,5,[[2,0,-42,[4],5],[22,0,0,-43],[17,-44,[5,960,100]]],[0,"7b5vbOUr9C47xbH6gZmVHE",1],[5,960,100],[0,270,0,0,0,0,1,1,1,1]],[19,"Down",1,5,[[2,0,-45,[6],7],[22,0,0,-46],[17,-47,[5,960,100]]],[0,"1dN8Ki3XZA9YtTsBs8qHaN",1],[5,960,100],[0,-270,0,0,0,0,1,1,1,1]],[28,"FadeAbleWallHolder",false,3,[6,-48],[0,"f3yTjJsatObqYFBVNNGjUX",1],[480,-120,0,0,0,0,1,1,1,1]],[43,"ObstaclesWallSpawner",3,[-51,-52],[[100,-50,-49]],[0,"cfF0qXF8RJqZHdCMZuVUKh",1]],[64,"wall",false,1,[[2,0,-53,[14],15],[22,0,0,-54],[17,-55,[5,20,20]]],[0,"46lDst6whKsLLc+chRENL7",1],[5,94,100]],[65,"ParticleManager",1,[-58,-59],[[101,-57,-56]],[0,"73t1HGNqlOUbtCp3klU3x5",1],[-480,-270,0,0,0,0,1,1,1,1]],[84,"TrajectoryLine",4,[[-60,[53,-61,[10]]],1,4],[0,"eb/dHcXOdDRZYEabxbb3vt",1]],[66,"Trail",4,[[102,30,25,-62,[4,2690012856],2],[53,-63,[11]]],[0,"819CBtgrNBjZf0M5aZLnTy",1]],[44,"WinDetect",3,12,[[103,-64],[54,-65,[5,50,230]]],[0,"bcIeklO7hPMLbAnv5HX93C",1]],[1,"GameManager",1,[[105,-68,-67,-66]],[0,"d1sMCyw7NC+JQ7ykZzjfZO",1],[5,191.21,50.4],[-480,-270,0,0,0,0,1,1,1,1]],[106,1,7],[44,"BallCollider",4,2,[[107,20,-69]],[0,"83HXtVzcxACrI2lSB07jjI",1]],[109,16],[110,6,6],[26,"Prefabs",13,[14],[0,"061f2GIeRJHYOuemScB4bI",1]],[27,"Holder",13,[0,"17POobnBJE64O0SiyTVK1I",1]],[111,"Score",7,[16]],[26,"Prefabs",15,[-70],[0,"65nHBbjQRH/Z/iFubRbjFs",1]],[67,"TouchWallParticle",false,27,[[117,1,true,true,200,0.1,999.999985098839,0.20000000298023224,0.5,0,360,20,10,5,5,360,360,300,100,-92.11000061035156,65.79000091552734,-671.0499877929688,65.79000091552734,-71,[17],[4,2751463423],[4,3321888768],[4,3590324479],[4,3154116608],[0,6,6],[0,30,-1000],18,19]],[0,"36g6EBzhxNsYlpPTqgjwqw",1]],[27,"Holder",15,[0,"1fAGxH0HNAS4teh5zHkFaL",1]]],0,[0,4,1,0,14,4,0,0,1,0,-1,19,0,-2,3,0,-3,15,0,0,2,0,0,2,0,0,2,0,0,2,0,-1,21,0,14,4,0,19,7,0,20,12,0,21,5,0,0,3,0,-1,5,0,-2,4,0,-3,12,0,-4,7,0,-5,13,0,22,22,0,0,4,0,-2,16,0,-3,17,0,-1,8,0,-2,9,0,-3,10,0,-4,11,0,0,6,0,0,6,0,0,6,0,-4,23,0,-1,26,0,-2,20,0,0,8,0,0,8,0,0,8,0,0,9,0,0,9,0,0,9,0,0,10,0,0,10,0,0,10,0,0,11,0,0,11,0,0,11,0,-2,18,0,15,25,0,0,13,0,-1,24,0,-2,25,0,0,14,0,0,14,0,0,14,0,15,29,0,0,15,0,-1,27,0,-2,29,0,-1,22,0,0,16,0,0,17,0,0,17,0,0,18,0,0,18,0,23,23,0,24,20,0,0,19,0,0,21,0,-1,28,0,0,28,0,5,1,2,9,4,6,9,12,14,9,24,20,25,26,71],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,-1,11,1],[0,7,0,7,0,7,0,7,0,7,28,28,0,7,0,7,0,0,53,54]],[[{"name":"ef","rect":[2,1,1271,585],"offset":[0.5,-0.5],"originalSize":[1274,586],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[55]],[[{"name":"2nd","rect":[936,253,98,76],"offset":[0,0],"originalSize":[98,76],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[[39,"Char1_Animation","\r\nChar1_Animation.png\r\nsize: 1607,182\r\nformat: RGBA8888\r\nfilter: Linear,Linear\r\nrepeat: none\r\nbody\r\n rotate: true\r\n xy: 1305, 5\r\n size: 175, 157\r\n orig: 177, 159\r\n offset: 1, 1\r\n index: -1\r\nhand_L\r\n rotate: true\r\n xy: 1543, 8\r\n size: 100, 62\r\n orig: 102, 64\r\n offset: 1, 1\r\n index: -1\r\nhand_R\r\n rotate: true\r\n xy: 1464, 8\r\n size: 100, 77\r\n orig: 102, 79\r\n offset: 1, 1\r\n index: -1\r\nhead\r\n rotate: false\r\n xy: 1110, 11\r\n size: 193, 169\r\n orig: 195, 171\r\n offset: 1, 1\r\n index: -1\r\nsad\r\n rotate: false\r\n xy: 835, 2\r\n size: 126, 44\r\n orig: 128, 46\r\n offset: 1, 1\r\n index: -1\r\ntear1\r\n rotate: false\r\n xy: 835, 48\r\n size: 273, 132\r\n orig: 275, 134\r\n offset: 1, 1\r\n index: -1\r\ntear2\r\n rotate: false\r\n xy: 2, 4\r\n size: 298, 176\r\n orig: 300, 178\r\n offset: 1, 1\r\n index: -1\r\ntear3\r\n rotate: false\r\n xy: 302, 16\r\n size: 260, 164\r\n orig: 262, 166\r\n offset: 1, 1\r\n index: -1\r\ntear4\r\n rotate: false\r\n xy: 564, 25\r\n size: 269, 155\r\n orig: 271, 157\r\n offset: 1, 1\r\n index: -1\r\nwings\r\n rotate: false\r\n xy: 1464, 110\r\n size: 119, 70\r\n orig: 121, 72\r\n offset: 1, 1\r\n index: -1\r\n",["Char1_Animation.png"],{"skeleton":{"hash":"hmz7DZPgZWywQnjqJ1iKcOrPcB4","spine":"3.8.99","x":-146.59,"y":-3.11,"width":335,"height":305,"images":"./Char1_PNGs/","audio":"E:/NGHI/Elofun/Zig Zac/Animation/Character_Animation2/Char1"},"bones":[{"name":"root"},{"name":"All","parent":"root"},{"name":"body","parent":"All","length":115.7,"rotation":81.57,"x":-10.03,"y":20.19},{"name":"hand_L","parent":"body","length":74.53,"rotation":114.57,"x":94.97,"y":24.51},{"name":"hand_R","parent":"body","length":61.31,"rotation":-103.73,"x":107.1,"y":-36.36},{"name":"wings","parent":"body","length":72.74,"rotation":69.37,"x":95.91,"y":53.25},{"name":"head","parent":"body","length":120.12,"rotation":9.33,"x":124.87,"y":-7.21}],"slots":[{"name":"wings","bone":"wings","attachment":"wings"},{"name":"hand_R","bone":"hand_R","attachment":"hand_R"},{"name":"body","bone":"body","attachment":"body"},{"name":"hand_L","bone":"hand_L","attachment":"hand_L"},{"name":"head","bone":"head","attachment":"head"},{"name":"sad","bone":"head","attachment":"sad"},{"name":"tear1","bone":"head","attachment":"tear4"}],"skins":[{"name":"default","attachments":{"body":{"body":{"x":52.37,"y":30.06,"rotation":-81.57,"width":177,"height":159}},"hand_L":{"hand_L":{"x":43.4,"y":-3.29,"rotation":163.86,"width":102,"height":64}},"hand_R":{"hand_R":{"x":31.75,"y":-7.66,"rotation":-21.64,"width":102,"height":79}},"head":{"head":{"x":73.92,"y":10.34,"rotation":-90.9,"width":195,"height":171}},"sad":{"sad":{"x":79.14,"y":-7.25,"rotation":-90.9,"width":128,"height":46}},"tear1":{"tear1":{"x":2.59,"y":-41.55,"rotation":-90.9,"width":275,"height":134},"tear2":{"x":-1.44,"y":-43.99,"rotation":-90.9,"width":300,"height":178},"tear3":{"x":-2.19,"y":-27.98,"rotation":-90.9,"width":262,"height":166},"tear4":{"x":-5.84,"y":-37.42,"rotation":-90.9,"width":271,"height":157}},"wings":{"wings":{"x":40.51,"y":4.17,"rotation":-150.95,"width":121,"height":72}}}}],"animations":{"Cry_Animation":{"slots":{"tear1":{"attachment":[{"name":"tear1"},{"time":0.1,"name":"tear2"},{"time":0.2,"name":"tear3"},{"time":0.3,"name":"tear4"},{"time":0.4,"name":"tear1"},{"time":0.5,"name":"tear2"},{"time":0.6,"name":"tear3"},{"time":0.7,"name":"tear4"},{"time":0.8,"name":"tear1"}]}},"bones":{"wings":{"rotate":[{"angle":-1.6,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.5,"angle":-12.28,"curve":0.243,"c3":0.68,"c4":0.71},{"time":0.8,"angle":-1.6}]},"head":{"rotate":[{"angle":0.7,"curve":0.379,"c2":0.6,"c3":0.724},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.5333,"angle":3.8,"curve":0.242,"c3":0.667,"c4":0.67},{"time":0.8,"angle":0.7}]},"hand_R":{"rotate":[{"angle":-3.58,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.5333,"angle":-14.76,"curve":0.243,"c3":0.655,"c4":0.63},{"time":0.8,"angle":-3.58}]},"hand_L":{"rotate":[{"angle":0.8,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.5,"angle":6.15,"curve":0.243,"c3":0.68,"c4":0.71},{"time":0.8,"angle":0.8}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.4333,"angle":3.92,"curve":0.25,"c3":0.75},{"time":0.8}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.4333,"x":2.47,"y":16.66,"curve":0.25,"c3":0.75},{"time":0.8}]}}},"Idle_Animation":{"slots":{"sad":{"attachment":[{"name":null}]},"tear1":{"attachment":[{"name":null}]}},"bones":{"wings":{"rotate":[{"angle":-1.6,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-12.28,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-1.6}]},"head":{"rotate":[{"angle":0.7,"curve":0.379,"c2":0.6,"c3":0.724},{"time":0.1667,"curve":0.25,"c3":0.75},{"time":0.8333,"angle":3.8,"curve":0.242,"c3":0.667,"c4":0.67},{"time":1.3333,"angle":0.7}]},"hand_R":{"rotate":[{"angle":-3.58,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.2,"curve":0.25,"c3":0.75},{"time":0.8667,"angle":-14.76,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1.3333,"angle":-3.58}]},"hand_L":{"rotate":[{"angle":0.8,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":6.15,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":0.8}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.92,"curve":0.25,"c3":0.75},{"time":1.3333}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"x":2.47,"y":16.66,"curve":0.25,"c3":0.75},{"time":1.3333}]}}}}},[0]]],0,0,[0],[-1],[56]],[[{"name":"Người chơi 2","rect":[984,203,193,33],"offset":[0,0],"originalSize":[193,33],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"Global"],[16,"Global",[[120,-2]],[35,"77NgNIIDNHIbO/YR9D3rBp",-1,0]]],0,[0,4,1,0,0,1,0,5,1,2],[],[],[]],[[{"name":"Noidung_Guide","rect":[3,28,1148,683],"offset":[-0.5,-0.5],"originalSize":[1155,738],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[57]],[[{"name":"Score_bar","rect":[936,3,244,79],"offset":[0,0],"originalSize":[244,79],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"2nd","rect":[483,933,95,86],"offset":[0,0],"originalSize":[95,86],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"BG_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[58]],[[{"name":"LOGO_ELOFUN","rect":[374,975,140,34],"offset":[0,0],"originalSize":[140,34],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"singleColor","rect":[658,648,2,2],"offset":[0,0],"originalSize":[2,2],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"Stage Cover"],[68,"Stage Cover",[[11,45,-2],[59,-4,-3],[2,0,-5,[0],1]],[0,"61q55Tla1Coq/ByFSNWJP7",-1],[4,4278190080],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,0,1,0,16,1,0,0,1,0,0,1,0,5,1,5],[0,0],[-1,1],[0,7]],[[{"name":"default-particle","rect":[2,2,61,61],"offset":[0.5,-0.5],"originalSize":[64,64],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[59]],[[{"name":"QR_Box","rect":[3,3,649,650],"offset":[0,-1],"originalSize":[651,652],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Murshroom2","rect":[173,538,73,57],"offset":[0,0],"originalSize":[73,57],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"atom","rect":[0,0,31,31],"offset":[0,0],"originalSize":[31,31],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[60]],[[{"name":"QR_Txt","rect":[3,659,769,283],"offset":[0,-0.5],"originalSize":[769,284],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Tree5","rect":[382,810,99,117],"offset":[0,0],"originalSize":[101,117],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Item","rect":[239,524,146,158],"offset":[0,0],"originalSize":[146,158],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Start_BTN","rect":[3,329,580,328],"offset":[-0.5,0],"originalSize":[583,330],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[{"name":"Bush","rect":[155,870,129,107],"offset":[0,0],"originalSize":[129,107],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[60,"a",".plist"],-1],0,0,[],[],[]],[[{"name":"Road","rect":[3,3,236,236],"offset":[0,0],"originalSize":[236,236],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[14,"SFX_Crystal",".mp3",2.048],-1],0,0,[],[],[]],[[{"name":"Continue_To_Play","rect":[375,3,540,306],"offset":[-0.5,-2.5],"originalSize":[549,311],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[{"name":"ForeGround_Left","rect":[0,0,183,1080],"offset":[0,0],"originalSize":[183,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[61]],[[[5,"playGround"],[85,"playGround",[-3,-4,-5,-6,-7,-8,-9,-10,-11],[-2],[13,-1],[5,390,720]],[69,"cuboid",1,1,[-16,-17,-18,-19,-20,-21],[[104,5,-13,[0,50,50]],[123,-15,-14]],[0,"66JYtOUg5MAI769SJxURTw",-12],[5,100,100],[0,0,0],[1674.386,174.32,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[70,"cuboidBase",1,[-23,-24,-25,-26,-27,-28,-29,-30,-31],[[55,5,-22,[5,200,200]]],[0,"4bi4fFIHJK0IfUYg/ZP7Ym",1],[4,4292119636],[5,200,200],[0,-70.7,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[71,"diamond",2,1,[-39,-40,-41],[[108,3,7,-33],[124,-38,-37,-36,-35,-34]],[0,"36og7YXZFORYpiDoXLHcg/",-32],[1674.386,174.32,0,0,0,0,1,1,1,1]],[72,"player",[-45,-46],[[125,-43,-42],[54,-44,[5,5,5]]],[0,"829xQzBptIUp4ha9I8M35x",1],[0,0,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[28,"endGamePopup",false,1,[-47,-48,-49],[0,"38EouarGNFMKlMCpcuCyWE",1],[0,0,0,0,0,0,1,0,0,1]],[4,"banner",6,[-51,-52,-53],[[3,-50,[52],53]],[0,"28c0jWr7pIi4W8QJv60KJU",1],[5,360,107],[0,250,0,0,0,0,1,0.6666667,0.6666667,1]],[29,"banner",[-55,-56,-57],[[3,-54,[69],70]],[0,"a4jpvK1JlCXpCWUp/Vhnd1",1],[5,360,107],[0,250,0,0,0,0,1,0.6666667,0.6666667,1]],[73,"objectDynamic",[-58,-59,-60],[0,"baM/PQ2D5EeoL+D9q+8HAI",1]],[126,1,2,4,3,5,[40,41,42],6],[74,"endGamePopup copy",1,[-61,8,-62],[0,"18QJMoyE9MgJ305BG+S2gj",1],[1713.797,67.013,0,0,0,0,1,0,0,1]],[9,"fence-4",1,2,[-64],[[2,0,-63,[5],6]],[0,"8ahLYZLppLn64fLoz3Qn8i",2],[5,75,96.5],[60,110,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-3",1,2,[-66],[[2,0,-65,[7],8]],[0,"b4XtX6d1xNQ7caJSOcoIkn",2],[5,75,96.5],[110,60,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-2",1,2,[-68],[[2,0,-67,[9],10]],[0,"a5ybZ6nVVEhaFcB3mqucaV",2],[5,75,96.5],[10,62,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-1",1,2,[-70],[[2,0,-69,[11],12]],[0,"4bSDMX0axAZqMns+8+qYuQ",2],[5,75,96.5],[62,10,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[26,"diamondContainer",9,[5],[0,"4f261EFSRChK5kIkLY9vL4",1]],[30,"mask",1,[9],[[127,0,-71,[15]]],[0,"36Br96wXRK54e5W7gVSxQe",1],[5,390,720]],[20,"bg",9,[[36,2,0,-72,[16],17]],[0,"f7my9ukyBOx6Im4s+azuNL",1],[5,603,2700],[0,0.5,0],[0,-360,0,0,0,0,1,0.6666667,0.66667,1]],[75,"cuboidContainer",9,[3],[0,"ceem4EwMNFmY2gT+CijI8e",1],[5,128.98,50.4]],[9,"fence-8",1,3,[-74],[[2,0,-73,[20],21]],[0,"77N5zgG/BHTJoVJsMp5T4i",1],[5,75,96.5],[55,110,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-7",1,3,[-76],[[2,0,-75,[22],23]],[0,"27mpKpLelAiat/ly+7Cpzv",1],[5,75,96.5],[110,55,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-6",1,3,[-78],[[2,0,-77,[24],25]],[0,"86ht3tvfVHxZgA3LH7Znzr",1],[5,75,96.5],[-45,110,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-5",1,3,[-80],[[2,0,-79,[26],27]],[0,"d5837ZpYNKKLZiUO02TgBq",1],[5,75,96.5],[110,-45,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-4",1,3,[-82],[[2,0,-81,[28],29]],[0,"75oZNW8YhMUZiX+jvtZZkc",1],[5,75,96.5],[-95,55,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-3",1,3,[-84],[[2,0,-83,[30],31]],[0,"3314tj241PCK1R7wpC3jU6",1],[5,75,96.5],[-95,-45,0,0,0,-0.3826834323650898,0.9238795325112867,-1,1,1],[1,0,0,-45]],[9,"fence-2",1,3,[-86],[[2,0,-85,[32],33]],[0,"dd4zHkZ7FM/JmymX2Ed49h",1],[5,75,96.5],[55,-95,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[9,"fence-1",1,3,[-88],[[2,0,-87,[34],35]],[0,"65wPFnYM1CGL0dS9Q9gDaN",1],[5,75,96.5],[-45,-95,0,0,0,-0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,-45]],[12,"playerBallHitBox",5,[[129,-89,10],[8,1,-90,[0,0,-17.5],[5,30,45]]],[0,"84Ka2Iy/hDVJTj5KX2gYM+",1],[5,1,1]],[21,"bg",7,[-92],[[2,0,-91,[46],47]],[0,"9bf4S4I3dGRZUqIxkiqKje",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[45,"collisionReset",3,1,[[55,4,-93,[5,300,25]],[130,-94,10]],[0,"daPDkEH7FNwY14BUO4q1EC",1],[0,-372.5,0,0,0,0,1,1,1,1]],[21,"bg",8,[-96],[[2,0,-95,[63],64]],[0,"0bbZCzGSVFTKlHlhjKk/oT",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[45,"diamondParticle copy",2,1,[[118,1,1,true,50,3,1000,3,0,360,10,5,1,50,0,-97,[0],[4,4278215935],[4,0],[4,4278215935],[4,0],[0,25,25],1,2]],[0,"bb/iCxCJ5B+LdHaNU/h8Hh",1],[1505.385,193.634,0,0,0,0,1,1,1,1]],[46,"frontFace",1,2,[[2,0,-98,[3],4]],[0,"1flnSDfI5JsZoLIkAunH0O",2],[5,143,143],[50,50,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,12,[[8,2,-99,[0,10,-5],[5,105,20]]],[0,"6dSXF2E79CIYwry1kJN8HQ",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,13,[[8,2,-100,[0,-10,-5],[5,105,20]]],[0,"0aqyl6lm5DMrpX2zomzhoT",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,14,[[8,2,-101,[0,12.5,-5],[5,105,20]]],[0,"76cLYhreBF96nKf/AQCqZt",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,15,[[8,2,-102,[0,-12.5,-5],[5,105,20]]],[0,"604VbQpeJPYKtA65kw+c5w",2],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[76,"objectRandom",1,2,[-103],[0,"38rcRAXSNJx7QNi9iHU4Xx",2],[5,129,107],[0,0,0,0,0,-0.3826834323650898,0.9238795325112867,0.5,0.5,0.5],[1,0,0,-45]],[19,"objectSprite",1,38,[[3,-104,[13],14]],[0,"d0+vGz/JdCW4S1pYlKIaKH",2],[5,129,107],[400,150,0,0,0,0,1,1,1,1]],[46,"frontFace",1,3,[[2,0,-105,[18],19]],[0,"e8W85Sw8NF+rVU6QOPJWQL",1],[5,285,285],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,20,[[8,2,-106,[0,-2.5,-10],[5,105,5]]],[0,"36oFjc4eZI6an1h0QJ86TU",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,21,[[8,2,-107,[0,2.5,-10],[5,105,5]]],[0,"bdb+Dk2SJN9pzWi+B/Cebl",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,22,[[8,2,-108,[0,-5,-10],[5,105,5]]],[0,"0alePwxQNFUq9Q2LU5QSGw",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,23,[[8,2,-109,[0,-5,-10],[5,105,5]]],[0,"270YtxvQRHAbVd1EgDjoTg",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,24,[[8,2,-110,[0,-5,-5],[5,105,5]]],[0,"b0hGZAsY5LMKAWthd+MQL1",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,25,[[8,2,-111,[0,5,-5],[5,105,5]]],[0,"66NoiIcxBHtJJyM6ktcQFO",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,-1,1,-1],[1,0,0,45]],[10,"collider",1,26,[[8,2,-112,[0,-5,-5],[5,105,5]]],[0,"6d4rtRb+5Boo9mhKzS3ZO9",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[10,"collider",1,27,[[8,2,-113,[0,-5,-5],[5,105,5]]],[0,"f7tdW0mOVKgaaVwVuKzeNv",1],[0,0,0,0,0,0.3826834323650898,0.9238795325112867,1,1,1],[1,0,0,45]],[86,"diamondSprite",2,4,[-114],[0,"b8m5NEk4NOkp0PfC/3L/1M",4],[5,64.8888889,70.2222222]],[95,0,49,[36]],[87,"diamondParticle",2,4,[-115],[0,"fbG5s0of9NfqmYY/Er4Lz/",4]],[119,1,1,true,false,50,3,1000,3,0,360,10,5,1,50,0,51,[37],[4,4278215935],[4,0],[4,4278215935],[4,0],[0,25,25]],[88,"lblScorePlus",false,2,4,[-116],[0,"40rfI1q9hL9Lgo1ndynU07",4],[4,4278215935],[5,39.05,37.8],[0,35,0,0,0,0,1,1,1,1]],[37,"+2",30,30,false,1,1,1,53,[38]],[112,"0",false,1,1,1,[39]],[34,"lblScore",1,[55],[0,"23zG5WBTlKma3wqL6fo0dX",1],[5,39.1,50.4],[0,325,0,0,0,0,1,1,1,1]],[31,"bg",100,6,[[2,0,-117,[43],44]],[0,"23apc97GlJSpdJ34NCsQDx",1],[4,4278190080],[5,390,720]],[51,"lblBanner",29,[-118],[0,"298f+QO7JBi5k7or/SEYml",1],[4,4282143844],[5,275,50.4],[5,0,0,0,0,0,1,1,1,1]],[113,"MẤT KẾT NỐI",60,false,1,2,2,58,[45]],[1,"Char1_Animation",7,[[7,"default","Cry_Animation",0,false,"Cry_Animation",-119,[48],49]],[0,"91q+/Nu31HO6FRDMAU+elu",1],[5,335,305],[-200,-50,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",7,[[7,"default","Sad_Animation",0,false,"Sad_Animation",-120,[50],51]],[0,"c9miZ3KqVEhItSqVFn5QnL",1],[5,313.89,345.29],[200,-50,0,0,0,0,1,0.5,0.5,1]],[89,"endGameLabel",6,[-121],[0,"c1NHVmdMNICbFDGb4Du3K1",1],[5,375,90.4]],[56,"Người chơi 1 đã bị mất kết nối\nNgười chơi 2 sẽ trở thành chủ phòng",13,20,false,1,1,2,2,62,[54]],[1,"playerChar",5,[[131,"Char3","Fly_Animation",0,false,2,"Fly_Animation",-122,[55],56]],[0,"152nSvNsRJcZuKJleGk4qS",1],[5,691,453],[0,-55,0,0,0,0,1,0.35,0.35,1]],[77,"light",false,100,1,[[96,1,0,-123,[57],58]],[0,"f5h1MszApENbA7dwZcXgmC",1],[5,1200,800],[0,125,0,0,0,0,1,1,1,1]],[31,"bg",100,11,[[2,0,-124,[59],60]],[0,"d92n6vHbBFKY0bPipS0V5k",1],[4,4278190080],[5,390,720]],[78,"lblBanner",31,[[114,"MẤT KẾT NỐI",60,false,1,2,2,-125,[61],62]],[0,"bcs5oYD1dAwKIwm3mALr8X",1],[4,4282143844],[5,275,50.4],[5,0,0,0,0,0,1,1,1,1]],[1,"Char1_Animation",8,[[7,"default","Cry_Animation",0,false,"Cry_Animation",-126,[65],66]],[0,"25/4/WraNDAJmaM6q7FWfZ",1],[5,335,305],[-200,-50,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",8,[[7,"default","Sad_Animation",0,false,"Sad_Animation",-127,[67],68]],[0,"0cl5DTBHVKs53mShrQnqwm",1],[5,313.89,345.29],[200,-50,0,0,0,0,1,0.5,0.5,1]],[12,"endGameLabel",11,[[115,"Người chơi 1 đã bị mất kết nối\nNgười chơi 2 sẽ trở thành chủ phòng",13,20,false,1,1,2,2,-128,[71],72]],[0,"5bbk2LG3xDPrFpFUevc9DI",1],[5,375,90.4]]],0,[0,4,1,0,-1,10,0,-1,32,0,-2,2,0,-3,4,0,-4,17,0,-5,65,0,-6,56,0,-7,30,0,-8,6,0,-9,11,0,4,2,0,0,2,0,17,5,0,0,2,0,-1,33,0,-2,12,0,-3,13,0,-4,14,0,-5,15,0,-6,38,0,0,3,0,-1,40,0,-2,20,0,-3,21,0,-4,22,0,-5,23,0,-6,24,0,-7,25,0,-8,26,0,-9,27,0,4,4,0,0,4,0,26,54,0,27,52,0,28,50,0,17,5,0,0,4,0,-1,49,0,-2,51,0,-3,53,0,29,10,0,0,5,0,0,5,0,-1,28,0,-2,64,0,-1,57,0,-2,7,0,-3,62,0,0,7,0,-1,29,0,-2,60,0,-3,61,0,0,8,0,-1,31,0,-2,68,0,-3,69,0,-1,18,0,-2,19,0,-3,16,0,-1,66,0,-3,70,0,0,12,0,-1,34,0,0,13,0,-1,35,0,0,14,0,-1,36,0,0,15,0,-1,37,0,0,17,0,0,18,0,0,20,0,-1,41,0,0,21,0,-1,42,0,0,22,0,-1,43,0,0,23,0,-1,44,0,0,24,0,-1,45,0,0,25,0,-1,46,0,0,26,0,-1,47,0,0,27,0,-1,48,0,0,28,0,0,28,0,0,29,0,-1,58,0,0,30,0,0,30,0,0,31,0,-1,67,0,0,32,0,0,33,0,0,34,0,0,35,0,0,36,0,0,37,0,-1,39,0,0,39,0,0,40,0,0,41,0,0,42,0,0,43,0,0,44,0,0,45,0,0,46,0,0,47,0,0,48,0,-1,50,0,-1,52,0,-1,54,0,0,57,0,-1,59,0,0,60,0,0,61,0,-1,63,0,0,64,0,0,65,0,0,66,0,0,67,0,0,68,0,0,69,0,0,70,0,5,1,3,9,19,5,9,16,8,9,11,9,9,17,10,30,63,10,31,59,10,32,16,10,33,18,10,34,55,10,35,19,55,0,56,128],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,52,52,54,55,59,63],[-1,11,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-2,-3,-1,1,-1,-1,1,-1,6,-1,6,-1,1,-1,-1,6,-1,1,-1,1,-1,3,-1,1,-1,6,-1,6,-1,1,-1,3,1,11,1,3,3,3,3],[0,29,20,0,21,0,6,0,6,0,6,0,6,0,30,0,0,31,0,21,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,0,0,0,62,63,64,0,7,0,0,9,4,15,4,16,0,17,0,4,8,0,20,0,7,0,2,0,9,4,15,4,16,0,17,0,2,65,29,20,2,2,2,2]],[[[14,"SFX_Explode",".mp3",0.968],-1],0,0,[],[],[]],[[[132,"2d-spine-gray",[{"hash":3502088787,"record":null,"name":"2d-spine-gray|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\n#if USE_TINT\n in vec4 a_color0;\n#endif\nin vec2 a_uv0;\nout vec2 v_uv0;\nout vec4 v_light;\n#if USE_TINT\n out vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nin vec2 v_uv0;\nin vec4 v_light;\n#if USE_TINT\n in vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n float gray = 0.2126*texColor.r + 0.7152*texColor.g + 0.0722*texColor.b;\n gl_FragColor = vec4(gray, gray, gray, texColor.a);\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\n#if USE_TINT\n attribute vec4 a_color0;\n#endif\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}","frag":"\nprecision highp float;\nuniform sampler2D texture;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n float gray = 0.2126*texColor.r + 0.7152*texColor.g + 0.0722*texColor.b;\n gl_FragColor = vec4(gray, gray, gray, texColor.a);\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[{"name":"CCLocal","defines":[]}],"samplers":[]}},"defines":[{"name":"USE_TINT","type":"boolean","defines":[]},{"name":"CC_USE_MODEL","type":"boolean","defines":[]},{"name":"USE_ALPHA_TEST","type":"boolean","defines":[]},{"name":"CC_USE_ALPHA_ATLAS_texture","type":"boolean","defines":[]},{"name":"INPUT_IS_GAMMA","type":"boolean","defines":[]}],"blocks":[{"name":"ALPHA_TEST","binding":0,"members":[{"name":"alphaThreshold","type":13,"count":1}],"defines":["USE_ALPHA_TEST"]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":[]}]}],[{"passes":[{"program":"2d-spine-gray|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"texture":{"value":"white","type":29},"alphaThreshold":{"type":13,"value":[0.5]}}}]}]]],0,0,[],[],[]],[[[39,"Char2_Animation","\r\nChar2_Animation.png\r\nsize: 636,268\r\nformat: RGBA8888\r\nfilter: Linear,Linear\r\nrepeat: none\r\nbody\r\n rotate: true\r\n xy: 299, 21\r\n size: 245, 223\r\n orig: 295, 283\r\n offset: 50, 1\r\n index: -1\r\ndrop\r\n rotate: false\r\n xy: 595, 87\r\n size: 28, 55\r\n orig: 30, 57\r\n offset: 1, 1\r\n index: -1\r\nhand_L\r\n rotate: false\r\n xy: 524, 144\r\n size: 110, 122\r\n orig: 112, 124\r\n offset: 1, 1\r\n index: -1\r\nhead\r\n rotate: false\r\n xy: 2, 2\r\n size: 295, 264\r\n orig: 303, 264\r\n offset: 0, 0\r\n index: -1\r\nsad\r\n rotate: true\r\n xy: 524, 5\r\n size: 137, 69\r\n orig: 139, 71\r\n offset: 1, 1\r\n index: -1\r\n",["Char2_Animation.png"],{"skeleton":{"hash":"MtR1eYjJJ1SMeKUUHuJqDVNfggE","spine":"3.8.99","x":-117.7,"y":-16.78,"width":313.89,"height":345.29,"images":"./Char2_PNGs/","audio":"E:/NGHI/Elofun/Zig Zac/Animation/Character_Animation2/Char2"},"bones":[{"name":"root"},{"name":"All","parent":"root"},{"name":"body","parent":"All","length":30.54,"rotation":42.51,"x":-9.05,"y":24.95,"color":"ff4343ff"},{"name":"body2","parent":"body","length":25.42,"rotation":-5.01,"x":36.88,"y":-0.72,"color":"ff4343ff"},{"name":"body3","parent":"body2","length":27.9,"rotation":-10.51,"x":36.83,"y":-2.85,"color":"ff4343ff"},{"name":"body4","parent":"body3","length":23.6,"rotation":-6.04,"x":39.43,"y":-0.09,"color":"ff4343ff"},{"name":"body5","parent":"body4","length":30.27,"rotation":-8.43,"x":32.22,"y":0.21,"color":"ff4343ff"},{"name":"body6","parent":"body5","length":24.21,"rotation":-56.74,"x":37.59,"y":-1.63,"color":"ff4343ff"},{"name":"body7","parent":"body","length":31.31,"rotation":-51.13,"x":8.96,"y":-15.21},{"name":"body8","parent":"body7","length":28.62,"rotation":10.49,"x":44.43,"y":1.04},{"name":"body9","parent":"body8","length":24.03,"rotation":3.72,"x":33.31,"y":-0.15},{"name":"head","parent":"body2","length":30.93,"rotation":38.67,"x":-23.31,"y":54.12,"color":"ff4343ff"},{"name":"head2","parent":"head","length":32.45,"rotation":-6.15,"x":30.93,"color":"ff4343ff"},{"name":"head3","parent":"head2","length":41.53,"rotation":-5.73,"x":34.5,"y":-0.24,"color":"ff4343ff"},{"name":"head4","parent":"head3","length":40.97,"rotation":-34.55,"x":52.7,"y":-45.08,"color":"43ffbeff"},{"name":"head5","parent":"head4","length":34.68,"rotation":12.02,"x":48.25,"y":0.63,"color":"43ffbeff"},{"name":"head6","parent":"head5","length":31.82,"rotation":8.54,"x":38.98,"y":-0.74,"color":"43ffbeff"},{"name":"head7","parent":"head6","length":28.58,"rotation":5.24,"x":44.25,"y":-0.5,"color":"43ffbeff"},{"name":"head8","parent":"head7","length":29.73,"rotation":1.51,"x":33.86,"y":-1.98,"color":"43ffbeff"},{"name":"head9","parent":"head3","length":22.52,"rotation":51.22,"x":37.84,"y":39.03,"color":"43ff52ff"},{"name":"head10","parent":"head9","length":28.65,"rotation":-24.59,"x":28.54,"y":-1.34,"color":"43ff52ff"},{"name":"head11","parent":"head10","length":29.86,"rotation":-22.73,"x":28.65,"color":"43ff52ff"},{"name":"head12","parent":"head11","length":30.03,"rotation":-15.07,"x":29.86,"color":"43ff52ff"},{"name":"head13","parent":"head12","length":32.34,"rotation":-16.26,"x":34.56,"y":-0.65,"color":"43ff52ff"},{"name":"head14","parent":"head","x":51.72,"y":-104.55,"color":"ff4343ff"},{"name":"head15","parent":"head","x":50.08,"y":57.52,"color":"ff4343ff"},{"name":"hand_L","parent":"body","length":81.77,"rotation":168.98,"x":45.95,"y":65.11,"color":"ff4343ff"},{"name":"drop","parent":"head","length":33.71,"rotation":13.83,"x":47.73,"y":-79.8,"color":"ff4343ff"}],"slots":[{"name":"hand_L","bone":"hand_L","attachment":"hand_L"},{"name":"body","bone":"body","attachment":"body"},{"name":"head","bone":"head","attachment":"head"},{"name":"sad","bone":"head","attachment":"sad"},{"name":"drop","bone":"drop","attachment":"drop"}],"skins":[{"name":"default","attachments":{"body":{"body":{"type":"mesh","hull":74,"width":295,"height":283,"uvs":[0.29749,0.74853,0.24856,0.77084,0.17977,0.78518,0.17671,0.81865,0.17059,0.85849,0.20117,0.89833,0.25774,0.93339,0.33418,0.9557,0.3938,0.95889,0.44272,0.96048,0.53751,0.9812,0.61242,0.99395,0.69651,0.98439,0.76072,0.97164,0.81881,0.95889,0.89219,0.94295,0.93653,0.91905,0.92889,0.8824,0.89984,0.87124,0.81881,0.86487,0.75154,0.8569,0.80964,0.8314,0.81575,0.80112,0.78976,0.77881,0.74084,0.7804,0.68733,0.78359,0.63535,0.78359,0.61242,0.77084,0.6644,0.75809,0.71791,0.7549,0.78059,0.73419,0.80811,0.7071,0.84174,0.66247,0.87538,0.68957,0.90748,0.70869,0.94876,0.71188,0.98086,0.70391,1,0.68638,1,0.65291,0.98392,0.61307,0.95029,0.5796,0.92736,0.53179,0.90595,0.49673,0.87232,0.4792,0.84021,0.4792,0.87538,0.43618,0.90137,0.39315,0.91207,0.34375,0.90901,0.3055,0.90595,0.24813,0.89831,0.21625,0.87232,0.20988,0.85703,0.24813,0.82951,0.28637,0.78365,0.32622,0.75636,0.34664,0.72402,0.37084,0.67204,0.38837,0.60478,0.40112,0.55127,0.4043,0.49317,0.4043,0.44731,0.4043,0.40603,0.4043,0.35558,0.4043,0.30054,0.41546,0.25162,0.44096,0.22105,0.46486,0.19811,0.49195,0.19047,0.52861,0.18282,0.56207,0.18588,0.62263,0.20576,0.66566,0.23939,0.70072,0.27608,0.72303,0.27302,0.84415,0.3617,0.85052,0.46718,0.87761,0.59866,0.89196,0.71027,0.90471,0.34947,0.77403,0.48094,0.79315,0.56656,0.79475,0.41368,0.78996,0.24245,0.56367,0.32348,0.58917,0.38463,0.60032,0.47024,0.59076,0.56656,0.5812,0.6644,0.55729,0.73167,0.53339,0.80047,0.50311,0.43661,0.69116,0.55433,0.69275,0.6751,0.67044,0.74849,0.63697,0.3617,0.48399,0.4626,0.49514,0.55127,0.48558,0.643,0.47602,0.71485,0.45211,0.76989,0.41865,0.81728,0.38359,0.85703,0.33578,0.87691,0.29116,0.83257,0.58279,0.89372,0.60032,0.9136,0.64176,0.94417,0.67044,0.33418,0.68638,0.24856,0.65291,0.53445,0.88718,0.79588,0.90949,0.87232,0.90789],"triangles":[52,50,49,50,52,51,103,52,49,53,52,103,103,49,48,102,53,103,54,53,102,101,54,102,55,54,101,102,48,47,48,102,103,46,102,47,101,102,46,100,55,101,56,55,100,45,101,46,99,57,56,99,56,100,98,58,57,98,57,99,44,101,45,100,101,44,95,63,62,64,63,95,97,59,58,97,58,98,96,61,60,90,100,44,99,100,90,89,99,90,98,99,89,88,98,89,83,66,65,67,66,83,68,67,83,69,68,83,65,64,95,87,97,98,87,98,88,104,90,44,89,90,104,95,83,65,84,83,95,62,61,96,95,62,96,97,86,96,60,59,97,97,96,60,86,97,87,85,95,96,85,96,86,84,95,85,42,104,43,41,104,42,105,41,40,70,69,83,94,89,104,88,89,94,104,44,43,104,41,105,106,105,40,106,40,39,109,83,84,70,83,109,32,104,105,32,105,106,94,104,32,71,70,109,93,88,94,87,88,93,107,106,39,107,39,38,108,84,85,109,84,108,107,38,37,33,32,106,34,33,106,91,85,86,108,85,91,92,86,87,92,87,93,91,86,92,72,71,109,73,72,109,36,107,37,31,94,32,107,34,106,35,107,36,34,107,35,108,73,109,30,94,31,29,93,94,0,73,108,30,29,94,93,27,92,28,93,29,28,27,93,79,108,91,0,108,79,82,79,91,80,91,92,81,80,92,82,91,80,27,81,92,21,23,22,74,1,0,74,0,79,75,79,82,74,79,75,20,24,23,20,23,21,76,82,80,75,82,76,110,80,81,76,80,110,81,27,26,77,81,26,110,81,77,3,1,74,1,3,2,74,4,3,5,4,74,20,78,25,20,25,24,112,19,18,111,20,19,111,19,112,78,20,111,6,5,74,112,16,15,17,112,18,16,112,17,7,74,75,6,74,7,8,75,76,7,75,8,14,111,112,14,112,15,9,8,76,13,78,111,13,111,14,10,110,77,26,25,78,77,26,78,9,76,110,10,9,110,12,77,78,12,78,13,11,10,77,12,11,77],"vertices":[3,2,10.71,27.79,0.86194,3,-28.56,26.12,0.13734,4,-69.58,16.55,0.00072,2,2,-4.2,32.89,0.99196,3,-43.85,29.9,0.00804,1,2,-21.9,43.61,1,1,2,-28.97,37.24,1,1,2,-37.92,30.14,1,2,8,-54.12,-17.82,0.01418,2,-38.89,15.74,0.98582,2,8,-36.14,-25.13,0.13738,2,-33.29,-2.85,0.86262,2,8,-12.9,-28,0.60538,2,-20.93,-22.74,0.39462,3,9,-44.11,-19.59,0.00055,8,4.63,-26.26,0.94377,2,-8.58,-35.29,0.05568,2,9,-29.7,-20.51,0.06433,8,18.97,-24.54,0.93567,3,10,-36.94,-24.79,0.00593,9,-1.94,-27.29,0.73868,8,47.49,-26.15,0.25539,3,10,-15.3,-30.54,0.20795,9,20.02,-31.62,0.78127,8,69.88,-26.4,0.01078,2,10,9.65,-30.26,0.81164,9,44.9,-29.73,0.18836,2,10,28.85,-28.52,0.99281,9,63.95,-26.74,0.00719,1,10,46.26,-26.6,1,1,10,68.25,-24.23,1,1,10,81.92,-18.77,1,1,10,80.69,-8.23,1,1,10,72.47,-4.25,1,1,10,48.86,-0.12,1,3,10,29.33,4.06,0.99663,9,62.31,5.8,0.00303,4,35.85,-71.58,0.00034,1,10,47.09,9.57,1,1,10,49.72,17.92,1,3,10,42.71,24.95,0.99643,9,74.31,27.52,0.00331,4,55.93,-57,0.00026,3,10,28.3,25.91,0.9445,9,59.87,27.54,0.04788,4,42.87,-50.85,0.00762,5,10,12.5,26.55,0.71269,9,44.06,27.16,0.23477,3,56.63,-51.77,0.00064,4,28.39,-44.49,0.05148,5,-6.31,-45.32,0.00041,6,10,-2.76,28.05,0.25138,9,28.74,27.66,0.49775,8,67.65,33.47,0.00021,3,44.47,-42.44,0.01733,4,14.73,-37.53,0.22044,5,-20.63,-39.84,0.01288,7,10,-9.14,32.3,0.05725,9,22.09,31.49,0.37067,8,60.42,36.02,0.00337,3,41.3,-35.45,0.03465,4,10.34,-31.25,0.47823,5,-25.65,-34.05,0.05545,6,-52.23,-42.37,0.00038,6,10,6.47,34.4,0.00269,9,37.54,34.59,0.10042,3,55.66,-41.93,0.00061,4,25.64,-34.99,0.52225,5,-10.04,-36.16,0.35297,6,-36.48,-42.18,0.02107,4,9,53.34,34.97,0.03271,4,40.11,-41.35,0.27667,5,5.02,-40.97,0.58827,6,-20.88,-44.72,0.10235,5,9,72.02,40.23,0.00769,4,59.25,-44.52,0.0935,5,24.38,-42.1,0.58795,6,-1.55,-43.01,0.30045,7,13.14,-55.43,0.01041,5,9,80.38,47.62,0.00257,4,69.96,-41.38,0.04151,5,34.71,-37.85,0.47642,6,8.03,-37.29,0.43263,7,13.61,-44.27,0.04686,5,9,90.71,59.92,0.00004,4,84.54,-34.63,0.00333,5,48.49,-29.6,0.14559,6,20.46,-27.11,0.51623,7,11.91,-28.3,0.33481,3,5,55.01,-40.31,0.02575,6,28.48,-36.75,0.22252,7,24.37,-26.88,0.75174,3,5,61.92,-48.75,0.00571,6,36.55,-44.09,0.0968,7,34.93,-24.15,0.89749,3,5,72.97,-53.95,0.00021,6,48.24,-47.61,0.02503,7,44.29,-16.31,0.97476,2,6,57.98,-47.46,0.00427,7,49.51,-8.09,0.99573,1,7,50.09,-0.59,1,1,7,43.49,6.19,1,1,7,32.23,10.97,1,1,7,18.51,10.84,1,2,6,53.14,3.51,0.01738,7,4.23,15.82,0.98262,2,6,49.13,14.57,0.27497,7,-7.22,18.52,0.72503,3,5,75.46,15.61,0.00053,6,40.52,21.56,0.59741,7,-17.79,15.16,0.40206,3,5,66.62,18.99,0.01098,6,31.27,23.62,0.89219,7,-24.58,8.56,0.09684,3,5,80.66,26.65,0.00796,6,44.04,33.25,0.98681,7,-25.63,24.52,0.00523,2,5,92.17,35.28,0.00165,6,54.16,43.48,0.99835,1,6,60.28,56.44,1,1,6,61.75,67.2,1,1,6,64.39,83.25,1,1,6,64.14,92.54,1,1,6,57.05,95.97,1,2,5,94.64,78.29,0.00064,6,50.3,86.38,0.99936,2,5,83.19,71.08,0.00858,6,40.03,77.57,0.99142,4,3,157.98,33.61,0.00019,4,112.46,57.94,0.00184,5,66.52,65.39,0.05039,6,24.37,69.5,0.94758,4,3,148.07,33.93,0.00155,4,102.67,56.45,0.00766,5,56.93,62.87,0.09907,6,15.26,65.6,0.89172,4,3,136.34,34.3,0.00725,4,91.06,54.68,0.02643,5,45.58,59.89,0.19126,6,4.46,60.99,0.77507,5,2,161.03,28.26,0.00066,3,121.15,39.7,0.03055,4,75.14,57.22,0.08964,5,29.48,60.74,0.34435,6,-11.58,59.47,0.5348,5,2,143.97,39.01,0.00889,3,103.21,48.92,0.1021,4,55.82,63.01,0.22659,5,9.66,64.47,0.4103,6,-31.74,60.26,0.25212,5,2,131.72,49.01,0.0287,3,90.14,57.82,0.19851,4,41.35,69.37,0.32292,5,-5.4,69.27,0.33673,6,-47.34,62.8,0.11315,5,2,119.09,60.59,0.06775,3,76.55,68.25,0.32066,4,26.08,77.15,0.34841,5,-21.41,75.4,0.22334,6,-64.07,66.52,0.03984,5,2,109.11,69.73,0.11059,3,65.81,76.49,0.40855,4,14.02,83.29,0.31827,5,-34.04,80.24,0.14847,6,-77.28,69.45,0.01412,5,2,100.14,77.96,0.15534,3,56.15,83.9,0.46986,4,3.17,88.82,0.27183,5,-45.41,84.6,0.0988,6,-89.17,72.09,0.00417,5,2,89.17,88.02,0.20932,3,44.35,92.96,0.51595,4,-10.09,95.57,0.21473,5,-59.31,89.92,0.05964,6,-103.69,75.32,0.00037,4,2,75.06,96.66,0.26384,3,29.54,100.34,0.53991,4,-25.99,100.13,0.16234,5,-75.6,92.78,0.03391,4,2,59.55,101.1,0.31449,3,13.7,103.41,0.54647,4,-42.12,100.25,0.12065,5,-91.66,91.2,0.01838,4,2,48.33,102.2,0.34677,3,2.43,103.53,0.54429,4,-53.23,98.32,0.09753,5,-102.5,88.11,0.01142,4,2,38.16,101.12,0.37148,3,-7.61,101.57,0.53916,4,-62.74,94.56,0.08188,5,-111.56,83.37,0.00748,4,2,29.49,95,0.39928,3,-15.71,94.71,0.52961,4,-69.46,86.34,0.06665,5,-117.38,74.49,0.00446,4,2,21.43,89.54,0.42878,3,-23.27,88.57,0.51636,4,-75.77,78.92,0.0526,5,-122.87,66.45,0.00226,4,2,10.51,76.3,0.48138,3,-32.99,74.43,0.48575,4,-82.74,63.24,0.03261,5,-128.16,50.12,0.00026,3,2,6.61,63.36,0.52345,3,-35.75,61.2,0.45488,4,-83.04,49.73,0.02166,3,2,7.22,49.34,0.58255,3,-33.92,47.29,0.40466,4,-78.71,36.39,0.01279,3,2,10.93,37.38,0.68002,3,-29.17,35.69,0.3141,4,-71.93,25.85,0.00588,2,8,-35.46,0.51,0.00883,2,-12.9,12.72,0.99117,2,8,-9.33,2.65,0.33086,2,5.17,-6.29,0.66914,2,9,-21.72,2.69,0.00016,8,22.59,-0.27,0.99984,1,9,16.91,-2.64,1,1,10,15.89,-8.22,1,2,2,17.13,12.11,0.96265,3,-20.79,11.06,0.03735,5,9,-16.88,26.45,0.08692,8,23.02,23.97,0.29192,2,42.07,-18.09,0.03985,3,6.69,-16.85,0.5355,4,-27.09,-19.27,0.0458,6,10,-23.27,26.89,0.00918,9,8.35,25.17,0.49659,8,48.06,27.31,0.05101,3,26.45,-32.58,0.14639,4,-4.79,-31.13,0.2925,5,-40.71,-35.53,0.00433,4,9,-36.68,28,0.00027,8,3.26,21.89,0.08587,2,28.05,-4.02,0.90366,3,-8.51,-4.05,0.0102,4,2,34.09,77.33,0.4121,3,-9.59,77.51,0.52181,4,-60.3,70.54,0.06175,5,-106.61,59.74,0.00435,4,2,46.83,55.85,0.35931,3,4.98,57.23,0.54541,4,-42.28,53.26,0.08554,5,-86.87,44.45,0.00975,4,2,58,41.34,0.24475,3,17.37,43.74,0.5999,4,-27.63,42.26,0.13833,5,-71.15,35.05,0.01701,5,2,78.44,26.27,0.0701,3,39.05,30.51,0.48193,4,-3.9,33.2,0.39686,5,-46.6,28.54,0.05034,6,-82.12,16.47,0.00078,5,2,101.22,9.06,0.00706,3,63.24,15.36,0.10602,4,22.64,22.72,0.6616,5,-19.09,20.91,0.2138,6,-53.8,12.95,0.01151,5,2,127.07,-5.46,0.00005,3,90.26,3.15,0.01271,4,51.43,15.64,0.0756,5,10.28,16.9,0.80449,6,-24.15,13.29,0.10714,4,3,110.12,-3.56,0.00208,4,72.19,12.66,0.0057,5,31.23,16.13,0.3356,6,-3.31,15.59,0.65661,5,3,131.44,-9.12,0.00003,4,94.16,11.09,0.0002,5,53.25,16.87,0.0321,6,18.36,19.56,0.96097,7,-28.26,-4.47,0.00669,4,2,51.93,12.03,0.1028,3,13.88,14.01,0.87503,4,-25.64,12.39,0.02176,5,-66.02,5.56,0.0004,3,9,5.69,54.13,0.01963,8,40.17,55.31,0.00111,4,5.1,-3.78,0.97926,4,9,41.51,59.28,0.01665,4,39.71,-14.32,0.27207,5,1.78,-14.13,0.6955,6,-28.02,-18.65,0.01578,5,9,63.45,68.03,0.00129,4,63.3,-15.71,0.01672,5,25.38,-13.03,0.63466,6,-4.83,-14.1,0.34382,7,-12.84,-42.32,0.00352,5,2,75.26,70.18,0.22028,3,32.05,73.98,0.52776,4,-18.72,74.66,0.20216,5,-65.69,68.22,0.04964,6,-106.82,52.92,0.00017,5,2,95.07,47.74,0.09347,3,53.74,53.35,0.40192,4,6.37,58.34,0.35574,5,-39.02,54.62,0.13748,6,-78.45,43.38,0.01139,5,2,116.18,32.06,0.02519,3,76.14,39.57,0.19293,4,30.91,48.88,0.38395,5,-13.63,47.79,0.32409,6,-52.33,40.35,0.07384,5,2,137.95,15.77,0.00223,3,99.25,25.24,0.05135,4,56.25,39,0.16301,5,12.61,40.64,0.49367,6,-25.33,37.12,0.28974,4,3,120.19,17.71,0.01168,4,78.21,35.41,0.04023,5,34.82,39.38,0.29733,6,-3.17,39.12,0.65076,4,3,138.83,15.33,0.00198,4,96.97,36.48,0.00889,5,53.37,42.42,0.11927,6,14.74,44.85,0.86985,4,3,155.97,14.69,0.00005,4,113.93,38.97,0.00092,5,69.98,46.68,0.03955,6,30.54,51.5,0.95948,2,5,85.77,55.12,0.0079,6,44.92,62.16,0.9921,2,5,95.76,64.82,0.00126,6,53.38,73.22,0.99874,3,5,54.03,-7.58,0.00895,6,22.71,-4.51,0.93493,7,-5.75,-14.03,0.05611,3,5,69.1,-18.66,0.00363,6,39.24,-13.27,0.1181,7,10.64,-5,0.87827,3,5,70.38,-31.71,0.00501,6,42.42,-25.99,0.08352,7,23.02,-9.32,0.91147,3,5,75.9,-42.52,0.00035,6,49.47,-35.87,0.02381,7,35.14,-8.85,0.97585,4,2,30.57,33.44,0.56683,3,-9.26,33.48,0.41809,4,-51.95,27.31,0.01466,5,-93.76,17.63,0.00042,4,2,18.35,57.49,0.52707,3,-23.53,56.37,0.45,4,-70.16,47.21,0.02268,5,-113.96,35.51,0.00025,2,9,-1.97,-0.67,0.91619,8,42.61,0.03,0.08381,1,10,40.89,-12.03,1,1,10,63.38,-13.78,1],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,74,76,76,78,78,80,80,82,82,84,84,86,86,88,88,90,90,92,92,94,94,96,96,98,98,100,100,102,102,104,104,106,106,108,108,110,110,112,112,114,114,116,116,118,118,120,120,122,122,124,124,126,126,128,128,130,130,132,132,134,134,136,136,138,138,140,140,142,142,144,144,146,0,146]}},"drop":{"drop":{"x":17.66,"y":1.77,"rotation":-90,"width":30,"height":57}},"hand_L":{"hand_L":{"x":35.47,"y":-23.5,"rotation":148.51,"width":112,"height":124}},"head":{"head":{"type":"mesh","hull":80,"width":303,"height":264,"uvs":[0.38103,1,0.46776,0.9891,0.54004,0.96753,0.5863,0.94928,0.64845,0.9244,0.67014,0.89785,0.6658,0.87131,0.69327,0.82817,0.7135,0.78835,0.71061,0.75351,0.67736,0.74522,0.64556,0.74356,0.6181,0.67885,0.60509,0.64899,0.67401,0.63283,0.73762,0.59135,0.80122,0.55154,0.84892,0.50674,0.88506,0.45697,0.89374,0.3906,0.90241,0.34415,0.93132,0.27779,0.95878,0.21308,0.96746,0.15335,0.97179,0.09363,0.97324,0.04219,0.94722,0.04385,0.90241,0.07538,0.84748,0.10524,0.80267,0.14506,0.75063,0.19317,0.70726,0.24129,0.6451,0.30101,0.58873,0.35742,0.53524,0.40719,0.48609,0.45365,0.4514,0.48849,0.41381,0.46858,0.36178,0.4636,0.31118,0.4636,0.26637,0.47522,0.26348,0.39558,0.26203,0.3259,0.2736,0.25456,0.30395,0.18654,0.32997,0.1434,0.36611,0.0986,0.4037,0.06542,0.42538,0.0339,0.42972,0,0.40225,0,0.34877,0,0.31263,0.02726,0.26348,0.06874,0.23457,0.09694,0.19409,0.13842,0.17096,0.18654,0.14639,0.1716,0.12182,0.19317,0.09724,0.23631,0.08712,0.29438,0.07845,0.37069,0.08134,0.43706,0.0958,0.48517,0.10881,0.52167,0.13916,0.55319,0.11459,0.58306,0.0929,0.62785,0.04954,0.62288,0.03075,0.65606,0,0.66767,0,0.74067,0.03219,0.7921,0.05532,0.83026,0.08279,0.88003,0.11314,0.91819,0.1435,0.95303,0.18686,0.97294,0.2418,0.99119,0.30251,1,0.15651,0.89663,0.17675,0.81533,0.21578,0.74731,0.25914,0.64444,0.29094,0.56813,0.33286,0.51669,0.33142,0.96133,0.35744,0.87838,0.39213,0.81699,0.42249,0.7191,0.45863,0.64776,0.46585,0.5814,0.48754,0.9381,0.53524,0.86676,0.55114,0.79542,0.56415,0.72574,0.56849,0.67431,0.10591,0.85017,0.0958,0.77717,0.10013,0.71413,0.12037,0.64113,0.17819,0.65606,0.223,0.57144,0.3213,0.73569,0.38346,0.61624,0.48465,0.81201,0.51789,0.7191,0.26203,0.87672,0.24613,0.93478,0.45863,0.86842,0.42393,0.94308,0.56849,0.53992,0.65088,0.48517,0.73617,0.41549,0.79399,0.34249,0.85181,0.27115,0.90964,0.1716,0.19265,0.48185,0.1912,0.37899,0.1912,0.29769,0.23168,0.19981,0.26203,0.15004,0.29383,0.1069,0.35166,0.05547],"triangles":[74,73,97,73,98,97,97,98,81,73,72,98,98,99,81,82,81,99,82,99,101,101,99,100,98,72,99,99,72,71,99,71,69,99,69,67,69,68,67,71,70,69,99,67,100,67,66,100,101,100,66,0,110,1,110,87,109,87,88,109,1,92,2,1,110,92,3,2,93,2,92,93,4,3,93,6,4,93,110,109,92,94,6,93,94,95,11,92,109,93,4,6,5,6,94,11,7,11,10,7,6,11,109,105,93,109,88,105,93,105,94,8,10,9,8,7,10,88,89,105,105,106,94,94,106,95,121,122,45,122,54,53,45,122,46,122,123,46,122,52,123,122,53,52,46,123,47,48,47,50,52,51,123,47,123,50,123,51,50,48,50,49,43,120,44,56,55,120,120,121,44,120,55,121,44,121,45,55,54,121,122,121,54,118,119,42,119,60,59,119,59,56,59,58,56,58,57,56,42,119,43,119,120,43,119,56,120,118,117,62,119,118,61,62,61,118,117,118,41,118,42,41,60,119,61,101,66,65,101,102,83,101,65,102,65,117,102,102,40,84,102,117,40,65,64,117,117,64,63,117,41,40,63,62,117,22,21,116,116,29,28,22,116,23,28,27,116,116,27,23,23,27,24,27,26,24,24,26,25,114,115,20,20,115,21,114,30,115,30,29,115,115,29,116,21,115,116,16,15,113,16,113,17,17,113,18,113,33,32,113,114,18,18,114,19,113,32,114,114,32,31,19,114,20,31,30,114,111,34,112,111,112,14,14,112,15,15,112,113,34,33,112,112,33,113,13,111,14,96,13,12,96,111,13,95,96,12,105,89,106,95,106,96,89,90,106,106,90,96,90,91,96,91,111,96,90,104,91,104,36,91,111,36,35,111,91,36,35,34,111,95,12,11,82,83,103,88,87,103,88,103,89,103,83,104,103,104,89,104,83,84,83,102,84,84,85,104,104,85,37,104,37,36,37,85,38,85,40,39,85,84,40,85,39,38,89,104,90,107,82,103,82,101,83,79,86,0,0,86,110,86,79,108,79,78,108,78,77,108,108,77,80,108,107,86,86,87,110,86,107,87,77,76,80,76,75,80,108,80,107,74,97,75,75,97,80,80,81,107,80,97,81,81,82,107,87,107,103],"vertices":[5,11,-1.33,-51.38,0.56571,12,-26.56,-54.55,0.10519,13,-55.33,-60.13,0.01517,14,-80.45,-73.66,0.00363,24,-53.04,53.16,0.3103,5,11,7.75,-76.21,0.29343,12,-14.87,-78.26,0.08828,13,-41.34,-82.56,0.02282,14,-56.21,-84.2,0.0062,24,-43.97,28.33,0.58926,5,11,18.51,-96.12,0.11924,12,-2.04,-96.9,0.04061,13,-26.71,-99.82,0.01107,14,-34.37,-90.12,0.00078,24,-33.21,8.43,0.8283,4,11,26.54,-108.58,0.04165,12,7.28,-108.42,0.01346,13,-16.29,-110.36,0.00232,24,-25.18,-4.03,0.94258,3,11,37.42,-125.3,0.00188,12,19.89,-123.88,0.0002,24,-14.3,-20.75,0.99792,1,24,-5.92,-25.45,1,2,14,11.32,-86.97,0.00551,24,0.57,-22.5,0.99449,2,14,24.2,-81.21,0.03771,24,13.62,-27.86,0.96229,2,14,34.74,-75.12,0.06109,24,25.29,-31.3,0.93891,2,14,38.54,-66.7,0.0717,24,34.01,-28.25,0.9283,2,14,30.88,-59.8,0.10946,24,33.73,-17.95,0.89054,2,14,22.73,-54.64,0.22207,24,31.85,-8.49,0.77793,3,12,77.67,-93.08,0.00004,14,23.98,-35.68,0.99042,15,-31.3,-30.47,0.00955,2,14,24.47,-26.88,0.82798,15,-28.99,-21.96,0.17202,3,14,44.72,-33.54,0.48335,15,-10.57,-32.69,0.5084,16,-53.74,-24.24,0.00825,2,15,11.1,-37.35,0.85498,16,-33.01,-32.07,0.14502,4,14,88.83,-34.03,0.00094,15,32.48,-42.35,0.52312,16,-12.61,-40.18,0.471,17,-60.24,-34.33,0.00495,3,15,51.13,-43.15,0.22204,16,5.72,-43.75,0.7316,17,-42.31,-39.56,0.04635,4,15,68.05,-40.64,0.06934,16,22.83,-43.78,0.7893,17,-25.28,-41.15,0.14113,18,-60.15,-37.6,0.00023,4,15,81.68,-29.33,0.00807,16,37.98,-34.61,0.61141,17,-9.35,-33.4,0.36484,18,-44.02,-30.27,0.01567,3,16,49.1,-28.8,0.3009,17,2.25,-28.63,0.62004,18,-32.3,-25.81,0.07905,3,16,68.17,-24.35,0.017,17,21.65,-25.94,0.53883,18,-12.83,-23.63,0.44417,2,17,40.44,-23.13,0.0473,18,6.03,-21.32,0.9527,1,18,20.69,-14.95,1,1,18,34.63,-7.48,1,1,18,46.27,-0.46,1,1,18,41.61,5.92,1,2,17,60.75,11.52,0.02695,18,27.24,12.79,0.97305,2,17,44.84,20.78,0.39447,18,11.57,22.46,0.60553,3,16,70.24,28.03,0.0268,17,28.48,26.03,0.89375,18,-4.63,28.14,0.07945,3,15,84.05,38.43,0.01025,16,50.39,32.04,0.22575,17,9.09,31.84,0.764,3,15,65.79,37.71,0.09189,16,32.22,34.04,0.55686,17,-8.82,35.49,0.35125,4,14,80.57,46.86,0.01813,15,41.24,38.49,0.47591,16,8.06,38.46,0.47099,17,-32.48,42.1,0.03497,3,14,58.35,42.41,0.16796,15,18.58,38.76,0.72965,16,-14.31,42.09,0.10239,4,13,105.94,-34.34,0.01242,14,37.76,39.04,0.52632,15,-2.26,39.75,0.45738,16,-34.77,46.17,0.00388,3,13,88.43,-26.24,0.0993,14,18.75,35.78,0.76449,15,-21.54,40.52,0.13621,4,13,75.59,-20.76,0.3311,14,5.06,33.01,0.64441,15,-35.5,40.66,0.02334,19,-22.97,-66.88,0.00115,4,13,75.38,-8.22,0.60435,14,-2.22,43.22,0.37298,15,-40.5,52.17,0.00179,19,-13.33,-58.86,0.02088,3,13,69.73,6.56,0.74667,14,-15.26,52.19,0.137,19,-5.35,-45.2,0.11632,4,13,63.07,20.37,0.62366,14,-28.57,59.79,0.02305,19,1.25,-31.36,0.35032,20,-12.32,-38.66,0.00297,5,13,54.42,31.27,0.21634,14,-41.88,63.87,0.00013,19,4.34,-17.79,0.71467,20,-15.16,-25.03,0.06751,21,-30.74,-40.01,0.00135,4,13,72.98,41.18,0.00347,19,23.69,-26.05,0.31365,20,5.87,-24.5,0.58529,21,-11.55,-31.39,0.0976,4,19,40.48,-33.58,0.03426,20,24.27,-24.35,0.4061,21,5.37,-24.15,0.5463,22,-17.36,-29.69,0.01334,3,20,43.05,-28.16,0.03203,21,24.16,-20.41,0.619,22,-0.19,-21.19,0.34897,3,21,44.25,-22.28,0.0689,22,19.69,-17.78,0.81925,23,-9.47,-20.61,0.11186,3,21,57.75,-25.37,0.00008,22,33.53,-17.25,0.34198,23,3.67,-16.23,0.65794,2,22,49.56,-18.91,0.00007,23,19.52,-13.33,0.99993,1,23,33.89,-13.16,1,1,23,44.14,-10.44,1,1,23,50.56,-4.07,1,1,23,43.9,0.92,1,1,23,30.94,10.64,1,1,23,17.86,11.46,1,2,22,37.21,10.69,0.32339,23,-0.63,11.63,0.67661,2,22,26,13.23,0.96689,23,-12.1,10.93,0.03311,2,21,43.68,13.34,0.08622,22,9.88,16.48,0.91378,2,21,29.28,15.13,0.80587,22,-4.48,14.46,0.19413,3,20,65.57,10.02,0.00735,21,30.18,23.51,0.93965,22,-5.8,22.78,0.053,3,20,59.99,17.56,0.03787,21,22.13,28.31,0.95427,22,-14.82,25.32,0.00786,2,20,48.73,25.19,0.17905,21,8.79,30.99,0.82095,2,20,33.45,28.5,0.52894,21,-6.58,28.14,0.47106,3,19,53.76,21.71,0.05563,20,13.34,31.45,0.87929,21,-26.27,23.1,0.06508,3,19,37.58,28.47,0.32641,20,-4.19,30.86,0.67087,25,71.2,14.8,0.00271,4,12,71.64,73.12,0.00053,19,24.23,29.99,0.64326,20,-16.96,26.69,0.33843,25,59.91,7.51,0.01778,4,12,63.93,66.13,0.00441,19,13.83,30.58,0.80455,20,-26.66,22.9,0.14379,25,51.5,1.38,0.04724,5,12,59.25,54.64,0.02714,13,19.15,57.07,0.0172,19,2.36,25.86,0.77283,20,-35.13,13.84,0.01735,25,45.62,-9.54,0.16549,5,12,49.3,58.94,0.05301,13,8.82,60.36,0.03323,19,-1.55,35.98,0.52367,20,-42.89,21.41,0.00063,25,36.18,-4.2,0.38946,4,12,35.94,61.07,0.04273,13,-4.69,61.15,0.02139,19,-9.39,47,0.2169,25,23.13,-0.65,0.71898,4,12,32.68,73.87,0.00485,13,-9.2,73.56,0.00224,19,-2.55,58.3,0.06488,25,21.26,12.43,0.92803,3,12,22.5,76.23,0.00006,19,-8,67.21,0.02095,25,11.39,15.86,0.97899,2,19,-6.75,76.94,0.00162,25,6.19,24.18,0.99838,2,11,37.56,77.08,0.0149,25,-12.52,19.57,0.9851,3,11,26.7,64.37,0.12288,12,-11.1,63.54,0.00674,25,-23.38,6.85,0.87038,3,11,18.6,55.16,0.29616,12,-18.17,53.52,0.02543,25,-31.48,-2.36,0.67841,3,11,7.83,43.93,0.55599,12,-27.68,41.2,0.02417,25,-42.25,-13.58,0.41984,3,11,0.24,32.59,0.76528,12,-34,29.12,0.00599,25,-49.84,-24.92,0.22873,2,11,-6.49,21.46,0.8974,25,-56.57,-36.05,0.1026,2,11,-8.45,7.45,0.97848,25,-58.53,-50.07,0.02152,3,11,-9.15,-9.86,0.97604,12,-38.79,-14.1,0.00308,24,-60.87,94.68,0.02088,5,11,-7.01,-28.28,0.83659,12,-34.69,-32.19,0.04806,13,-65.65,-38.69,0.00148,14,-101.11,-61.85,0.00005,24,-58.73,76.26,0.11382,3,11,8.91,21.2,0.83551,12,-24.16,18.71,0.01229,25,-41.17,-36.32,0.1522,5,11,31.22,20.37,0.45342,12,-1.9,20.29,0.31111,13,-38.26,16.79,0.00228,19,-65,45.39,0.00459,25,-18.86,-37.14,0.2286,5,11,51.48,13.18,0.03152,12,19.02,15.31,0.70718,13,-16.95,13.92,0.07761,19,-53.89,26.99,0.03652,25,1.4,-44.33,0.14717,4,12,49.03,12.24,0.10843,13,13.22,13.87,0.67212,19,-35.04,3.43,0.16921,25,30.91,-50.6,0.05023,4,12,71.26,10.07,0.00409,13,35.55,13.92,0.70787,19,-21.01,-13.94,0.28443,25,52.78,-55.14,0.0036,3,13,53.3,8.37,0.79027,14,-29.82,44.36,0.03647,19,-14.22,-31.26,0.17327,5,11,4.99,-34.35,0.72262,12,-22.1,-36.93,0.09384,13,-52.66,-42.16,0.00851,14,-88.44,-57.34,0.00298,24,-46.72,70.2,0.17205,5,11,28.14,-36.77,0.43922,12,1.17,-36.86,0.2541,13,-29.5,-39.76,0.06801,14,-70.73,-42.23,0.03392,24,-23.57,67.78,0.20475,5,11,46.39,-43.1,0.18973,12,20,-41.2,0.24806,13,-10.34,-42.2,0.2076,14,-53.56,-33.38,0.11357,24,-5.33,61.44,0.24104,5,11,73.68,-45.86,0.03233,12,47.43,-41.01,0.06781,13,16.93,-39.28,0.39731,14,-32.75,-15.5,0.34836,24,21.97,58.69,0.15419,5,11,94.59,-51.99,0.00393,12,68.87,-44.86,0.00744,13,38.65,-40.97,0.22001,14,-13.9,-4.58,0.70772,24,42.87,52.56,0.06089,3,13,55.39,-35.35,0.17404,14,-3.31,9.54,0.82556,15,-48.57,19.45,0.0004,5,11,22.25,-78.82,0.21075,12,-0.17,-79.29,0.07519,13,-26.61,-82.12,0.02662,14,-44.32,-75.48,0.01514,24,-29.46,25.73,0.6723,5,11,44,-88.35,0.06503,12,22.47,-86.44,0.03395,13,-3.37,-86.97,0.02606,14,-22.43,-66.3,0.0548,24,-7.72,16.2,0.82016,5,11,63.44,-88.53,0.01951,12,41.81,-84.53,0.01778,13,15.69,-83.14,0.02955,14,-8.9,-52.34,0.22251,24,11.72,16.02,0.71065,5,11,82.24,-87.96,0.00421,12,60.45,-81.95,0.00625,13,33.97,-78.71,0.01527,14,3.65,-38.32,0.501,24,30.52,16.59,0.47327,5,11,95.74,-85.99,0.00102,12,73.66,-78.54,0.00231,13,46.78,-74.01,0.00436,14,11.52,-27.18,0.99082,15,-41.71,-19.56,0.00149,3,11,17.16,39.01,0.51196,12,-17.87,37.31,0.04736,25,-32.92,-18.5,0.44068,5,11,35.14,46.6,0.18639,12,-0.81,46.78,0.07802,13,-39.82,43.26,0.0019,19,-45.34,63.19,0.00358,25,-14.94,-10.92,0.73011,5,11,51.61,49.3,0.02141,12,15.28,51.23,0.06659,13,-24.26,49.3,0.01234,19,-30.89,54.84,0.03725,25,1.53,-8.22,0.86241,4,12,35.49,52.06,0.07964,13,-4.23,52.13,0.04354,19,-16.14,41,0.27649,25,21.71,-9.56,0.60033,5,11,72.15,30,0.00108,12,37.77,34.24,0.19564,13,-0.18,34.63,0.17059,19,-27.24,26.89,0.29942,25,22.07,-27.52,0.33328,4,12,63.4,29.12,0.03408,13,25.83,32.09,0.2114,19,-12.93,5.01,0.69498,25,47.01,-35.36,0.05954,5,11,62.1,-17.13,0.02108,12,32.83,-13.69,0.25996,13,-0.32,-13.55,0.64316,14,-61.55,-4.09,0.04278,24,10.38,87.41,0.03301,4,11,97.22,-27.88,0.00023,13,36.27,-16.84,0.75194,14,-29.55,13.94,0.2383,24,45.51,76.66,0.00953,5,11,54.37,-70.01,0.08619,12,30.81,-67.09,0.07594,13,3,-66.89,0.10606,14,-28.57,-46.14,0.20553,24,2.65,34.54,0.52629,5,11,80.59,-73.93,0.01283,12,57.3,-68.18,0.01817,13,29.47,-65.33,0.06494,14,-7.65,-29.85,0.56122,24,28.88,30.62,0.34284,5,11,21.66,-8.59,0.88352,12,-8.29,-9.54,0.09388,13,-41.65,-13.53,0.00094,14,-95.61,-27.51,0.00167,24,-30.06,95.95,0.01999,4,11,5.62,-7.58,0.97773,12,-24.35,-10.25,0.00716,14,-107.4,-38.43,0.00007,24,-46.1,96.97,0.01505,5,11,38.02,-65.91,0.19279,12,14.12,-64.77,0.11402,13,-13.84,-66.25,0.08158,14,-42.8,-55.16,0.08668,24,-13.69,38.63,0.52493,5,11,16.37,-60.42,0.38172,12,-7.99,-61.63,0.11952,13,-36.15,-65.33,0.03445,14,-61.71,-67.06,0.01743,24,-35.35,44.13,0.44688,3,13,78.74,-58.62,0.07521,14,29.13,3.62,0.26,15,-18.08,6.9,0.66479,2,14,57.97,3.78,0.00595,15,10.17,1.06,0.99405,2,16,2.43,-2.08,1,17,-41.78,2.24,0,3,16,28.45,-3.25,0.99096,17,-15.98,-1.3,0.00894,18,-49.8,2,0.00011,3,16,54.14,-4.7,0.00509,17,9.47,-5.08,0.96537,18,-24.47,-2.46,0.02954,1,18,7.12,-2.87,1,3,12,82.49,45.84,0.00035,19,12.38,3.13,0.99599,25,67.78,-20.78,0.00366,3,19,37.07,-8.18,0.01834,20,10.6,-2.67,0.9686,21,-15.61,-9.43,0.01305,3,19,56.44,-17.42,0.00036,20,32.06,-3.02,0.06964,21,4.31,-1.46,0.93,3,21,32.86,-3.25,0.12941,22,3.75,-2.36,0.87047,23,-29.1,-10.27,0.00012,3,21,48.48,-6.91,0.00341,22,19.78,-1.83,0.9878,23,-13.85,-5.28,0.00879,2,22,34.67,-2.71,0.03576,23,0.69,-1.95,0.96424,1,23,22.85,-1.6,1],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,74,76,76,78,78,80,80,82,82,84,84,86,86,88,88,90,90,92,92,94,94,96,96,98,98,100,100,102,102,104,104,106,106,108,108,110,110,112,112,114,114,116,116,118,118,120,120,122,122,124,124,126,126,128,128,130,130,132,132,134,134,136,136,138,138,140,140,142,142,144,144,146,146,148,148,150,150,152,152,154,154,156,156,158,0,158]}},"sad":{"sad":{"x":92.91,"y":-17.94,"rotation":-76.17,"width":139,"height":71}}}}],"animations":{"Idle_Animation":{"slots":{"drop":{"attachment":[{"name":null}]},"sad":{"attachment":[{"name":null}]}},"bones":{"head":{"rotate":[{"angle":-0.51,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-3.95,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-0.51}],"translate":[{"x":-0.49,"y":0.71,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"x":-3.76,"y":5.43,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"x":-0.49,"y":0.71}]},"hand_L":{"rotate":[{"angle":0.26,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":6.08,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.3333,"angle":0.26}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"x":-21.58,"y":5.11,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body9":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head13":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head12":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head11":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head10":{"rotate":[{"angle":-6.67,"curve":0.375,"c2":0.5,"c3":0.75},{"time":0.3333,"curve":0.25,"c3":0.75},{"time":1,"angle":-13.34,"curve":0.25,"c3":0.625,"c4":0.5},{"time":1.3333,"angle":-6.67}]},"head8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.3333}]},"head5":{"rotate":[{"angle":-1.25,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-9.61,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-1.25}]},"body6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body5":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}]},"body2":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.3333}]}}},"Sad_Animation":{"slots":{"drop":{"attachment":[{"name":null},{"time":0.2,"name":"drop"},{"time":1.1667,"name":null}]}},"bones":{"drop":{"translate":[{"curve":0.3,"c3":0.636,"c4":0.36},{"time":0.2,"x":52.39,"y":12.89,"curve":0.318,"c2":0.26,"c3":0.653,"c4":0.6},{"time":0.5,"x":-14.19,"y":-3.49}],"scale":[{"curve":0.3,"c3":0.636,"c4":0.36},{"time":0.2,"x":0.5,"y":0.5,"curve":0.296,"c2":0.19,"c3":0.756},{"time":0.5}]},"head":{"rotate":[{"angle":-0.51,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8333,"angle":-3.95,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.6667,"angle":-0.51}],"translate":[{"x":-0.49,"y":0.71,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8333,"x":-3.76,"y":5.43,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.6667,"x":-0.49,"y":0.71}]},"hand_L":{"rotate":[{"angle":0.26,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":6.08,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.6667,"angle":0.26}]},"body":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}],"translate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"x":-21.58,"y":5.11,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body9":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-5.3,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head13":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head12":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head11":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":0.24,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head10":{"rotate":[{"angle":-6.67,"curve":0.375,"c2":0.5,"c3":0.75},{"time":0.3333,"curve":0.25,"c3":0.75},{"time":1.1667,"angle":-13.34,"curve":0.25,"c3":0.625,"c4":0.5},{"time":1.6667,"angle":-6.67}]},"head8":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head7":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":-9.61,"curve":0.25,"c3":0.75},{"time":1.6667}]},"head5":{"rotate":[{"angle":-1.25,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8333,"angle":-9.61,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.6667,"angle":-1.25}]},"body6":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body5":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}]},"body2":{"rotate":[{"curve":0.25,"c3":0.75},{"time":0.6667,"angle":3.29,"curve":0.25,"c3":0.75},{"time":1.6667}]}}}}},[0]]],0,0,[0],[-1],[66]],[[{"name":"Khung_3rd","rect":[735,717,254,280],"offset":[0.5,0],"originalSize":[255,280],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Khung_1st","rect":[589,590,311,344],"offset":[0,0],"originalSize":[311,344],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[[133,"2d-spine-gray",{"0":{"defines":{}}}]],0,0,[0],[36],[67]],[[{"name":"1st","rect":[913,383,124,94],"offset":[0,0],"originalSize":[124,94],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Khung_2nd","rect":[474,717,255,280],"offset":[0,0],"originalSize":[255,280],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Start1_BTN","rect":[639,3,581,330],"offset":[0,0],"originalSize":[583,330],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[[5,"PeerManager"],[16,"PeerManager",[[134,-2]],[0,"83dvmovvBD97hMqS/70CKt",-1]]],0,[0,4,1,0,0,1,0,5,1,2],[],[],[]],[[{"name":"Start_BTN","rect":[3,663,549,311],"offset":[0,0],"originalSize":[549,311],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[{"name":"GameName","rect":[3,764,395,140],"offset":[0,0.5],"originalSize":[397,141],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Road","rect":[3,245,236,235],"offset":[0,-0.5],"originalSize":[236,236],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"fence","rect":[3,823,114,146],"offset":[0,0.5],"originalSize":[114,147],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Player3","rect":[163,948,121,21],"offset":[-19.5,2],"originalSize":[194,33],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Tree","rect":[440,358,104,156],"offset":[0,0],"originalSize":[104,156],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Khung_Character","rect":[474,292,274,419],"offset":[0,0],"originalSize":[274,419],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Char01","rect":[238,676,146,116],"offset":[0,0],"originalSize":[146,116],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Char1","rect":[487,244,108,108],"offset":[0,0],"originalSize":[108,108],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[39,"MC_Animation","\r\nMC_Animation.png\r\nsize: 1277,299\r\nformat: RGBA8888\r\nfilter: Linear,Linear\r\nrepeat: none\r\n1\r\n rotate: true\r\n xy: 893, 144\r\n size: 153, 145\r\n orig: 691, 453\r\n offset: 230, 232\r\n index: -1\r\n10\r\n rotate: true\r\n xy: 1040, 148\r\n size: 149, 147\r\n orig: 691, 453\r\n offset: 241, 228\r\n index: -1\r\n11\r\n rotate: true\r\n xy: 153, 3\r\n size: 122, 104\r\n orig: 691, 453\r\n offset: 238, 273\r\n index: -1\r\n12\r\n rotate: false\r\n xy: 540, 29\r\n size: 83, 96\r\n orig: 691, 453\r\n offset: 233, 279\r\n index: -1\r\n2\r\n rotate: true\r\n xy: 749, 132\r\n size: 165, 142\r\n orig: 691, 453\r\n offset: 227, 236\r\n index: -1\r\n3\r\n rotate: true\r\n xy: 455, 127\r\n size: 170, 146\r\n orig: 691, 453\r\n offset: 227, 236\r\n index: -1\r\n4\r\n rotate: true\r\n xy: 603, 129\r\n size: 168, 144\r\n orig: 691, 453\r\n offset: 225, 238\r\n index: -1\r\n5\r\n rotate: true\r\n xy: 2, 126\r\n size: 171, 149\r\n orig: 691, 453\r\n offset: 225, 234\r\n index: -1\r\n6\r\n rotate: true\r\n xy: 153, 127\r\n size: 170, 149\r\n orig: 691, 453\r\n offset: 226, 238\r\n index: -1\r\n7\r\n rotate: true\r\n xy: 304, 127\r\n size: 170, 149\r\n orig: 691, 453\r\n offset: 226, 238\r\n index: -1\r\n8\r\n rotate: false\r\n xy: 921, 6\r\n size: 150, 136\r\n orig: 691, 453\r\n offset: 243, 235\r\n index: -1\r\n9\r\n rotate: false\r\n xy: 1073, 2\r\n size: 149, 144\r\n orig: 691, 453\r\n offset: 242, 230\r\n index: -1\r\nChar2/body\r\n rotate: false\r\n xy: 625, 26\r\n size: 73, 101\r\n orig: 73, 101\r\n offset: 0, 0\r\n index: -1\r\nChar2/head\r\n rotate: false\r\n xy: 2, 25\r\n size: 149, 99\r\n orig: 149, 99\r\n offset: 0, 0\r\n index: -1\r\nChar2/wing_L\r\n rotate: true\r\n xy: 867, 44\r\n size: 86, 52\r\n orig: 86, 52\r\n offset: 0, 0\r\n index: -1\r\nChar2/wing_R\r\n rotate: false\r\n xy: 1189, 245\r\n size: 86, 52\r\n orig: 86, 52\r\n offset: 0, 0\r\n index: -1\r\nChar3/body\r\n rotate: false\r\n xy: 700, 30\r\n size: 59, 97\r\n orig: 59, 97\r\n offset: 0, 0\r\n index: -1\r\nChar3/head\r\n rotate: true\r\n xy: 358, 23\r\n size: 102, 98\r\n orig: 102, 98\r\n offset: 0, 0\r\n index: -1\r\nChar3/wing_L\r\n rotate: false\r\n xy: 1189, 192\r\n size: 82, 51\r\n orig: 82, 51\r\n offset: 0, 0\r\n index: -1\r\nChar3/wing_R\r\n rotate: true\r\n xy: 1224, 108\r\n size: 82, 51\r\n orig: 82, 51\r\n offset: 0, 0\r\n index: -1\r\nbody\r\n rotate: false\r\n xy: 458, 4\r\n size: 80, 121\r\n orig: 691, 453\r\n offset: 266, 61\r\n index: -1\r\nhead\r\n rotate: true\r\n xy: 259, 3\r\n size: 122, 97\r\n orig: 691, 453\r\n offset: 245, 136\r\n index: -1\r\nwing_L\r\n rotate: true\r\n xy: 815, 30\r\n size: 100, 50\r\n orig: 691, 453\r\n offset: 185, 133\r\n index: -1\r\nwing_R\r\n rotate: true\r\n xy: 761, 28\r\n size: 102, 52\r\n orig: 691, 453\r\n offset: 330, 135\r\n index: -1\r\n",["MC_Animation.png"],{"skeleton":{"hash":"6H+myYbMPVp/Y+f6kH8TlP86Am8","spine":"3.8.99","x":-306.4,"y":-58.28,"width":691,"height":453,"images":"./MC_Animation_PNGs/","audio":"E:/NGHI/Elofun/Zig Zac/Animation"},"bones":[{"name":"root"},{"name":"All","parent":"root"},{"name":"body","parent":"All","length":104.1,"rotation":-89.79,"x":-0.39,"y":118.33},{"name":"head","parent":"body","length":42.96,"rotation":179.79,"x":-5.42,"y":0.02,"transform":"noScale"},{"name":"wing_L","parent":"body","length":23.98,"rotation":-98.44,"x":19.35,"y":-31.85,"transform":"noScale"},{"name":"wing_L2","parent":"wing_L","length":24.31,"rotation":-0.57,"x":26.53,"y":0.37},{"name":"wing_L3","parent":"wing_L2","length":18.67,"rotation":14.07,"x":26.01,"y":0.26},{"name":"wing_L4","parent":"wing_L3","length":18.81,"rotation":22.85,"x":21,"y":0.36},{"name":"wing_R","parent":"body","length":26.33,"rotation":99.87,"x":17.5,"y":30.03,"transform":"noScale"},{"name":"wing_R2","parent":"wing_R","length":20.22,"rotation":0.59,"x":26.94,"y":0.18},{"name":"wing_R3","parent":"wing_R2","length":20.45,"rotation":-11.48,"x":22.72,"y":-0.76},{"name":"wing_R4","parent":"wing_R3","length":19.97,"rotation":-23.91,"x":22.49,"y":-1.41},{"name":"1","parent":"All","x":13.01,"y":172.1,"scaleX":1.414,"scaleY":1.414}],"slots":[{"name":"body","bone":"body","attachment":"body2"},{"name":"wing_R","bone":"wing_R","attachment":"wing_R"},{"name":"wing_L","bone":"wing_L","attachment":"wing_L2"},{"name":"head","bone":"head","attachment":"head2"},{"name":"1","bone":"1"}],"skins":[{"name":"default","attachments":{"1":{"1":{"x":20.27,"y":-22.87,"width":691,"height":453},"2":{"x":20.28,"y":-22.87,"width":691,"height":453},"3":{"x":20.28,"y":-22.87,"width":691,"height":453},"4":{"x":20.28,"y":-22.87,"width":691,"height":453},"5":{"x":20.28,"y":-22.87,"width":691,"height":453},"6":{"x":20.28,"y":-22.87,"width":691,"height":453},"7":{"x":20.28,"y":-22.87,"width":691,"height":453},"8":{"x":20.28,"y":-22.87,"width":691,"height":453},"9":{"x":20.28,"y":-22.87,"width":691,"height":453},"10":{"x":20.28,"y":-22.87,"width":691,"height":453},"11":{"x":20.28,"y":-22.87,"width":691,"height":453},"12":{"x":20.28,"y":-22.87,"width":691,"height":453}}}},{"name":"Char1","attachments":{"body":{"body2":{"name":"body","x":-49.74,"y":39.67,"rotation":89.79,"width":691,"height":453}},"head":{"head2":{"name":"head","x":44.47,"y":-39.49,"rotation":-90,"width":691,"height":453}},"wing_L":{"wing_L2":{"name":"wing_L","type":"mesh","hull":25,"width":691,"height":453,"uvs":[0.40971,0.64395,0.41056,0.65643,0.41132,0.66748,0.38947,0.66552,0.37244,0.66944,0.35734,0.67924,0.34449,0.69149,0.32939,0.70472,0.31847,0.70227,0.31333,0.68512,0.30883,0.66699,0.29373,0.66993,0.27863,0.66993,0.26803,0.66552,0.27124,0.6464,0.28345,0.62239,0.29534,0.61014,0.30883,0.60132,0.3265,0.59789,0.34256,0.59691,0.35606,0.60475,0.3657,0.62092,0.38015,0.62925,0.39525,0.6317,0.40939,0.63268,0.39423,0.6502,0.37971,0.6502,0.36368,0.64906,0.34591,0.64638,0.33464,0.63836,0.31612,0.63455,0.29784,0.64104,0.28307,0.65555],"triangles":[32,14,15,31,32,15,13,14,32,12,13,32,11,32,31,12,32,11,30,17,18,16,17,30,31,16,30,15,16,31,10,31,30,11,31,10,29,10,30,29,18,19,29,19,20,28,29,20,30,18,29,21,28,20,5,28,27,29,9,10,6,29,28,6,28,5,9,29,6,7,8,9,6,7,9,27,28,21,27,21,22,25,22,23,26,27,22,26,22,25,3,26,25,1,25,0,23,24,0,25,23,0,1,3,25,2,3,1,4,27,26,4,26,3,5,27,4],"vertices":[1,4,-8.19,-5.37,1,1,4,-9.58,0.14,1,1,4,-10.81,5.02,1,1,4,4.26,6.3,1,3,4,15.65,9.74,0.85855,5,-10.98,9.26,0.13995,6,-33.68,17.72,0.0015,3,4,25.34,15.63,0.21708,5,-1.34,15.24,0.7293,6,-22.89,21.18,0.05362,3,4,33.33,22.39,0.01458,5,6.58,22.09,0.77939,6,-13.53,25.89,0.20603,2,5,15.98,29.61,0.62616,6,-2.59,30.9,0.37384,2,5,23.61,29.66,0.56812,6,4.82,29.1,0.43188,3,5,28.3,22.53,0.46741,6,7.64,21.04,0.53254,7,-4.28,24.24,0.00005,3,5,32.63,14.89,0.17349,6,9.98,12.57,0.78022,7,-5.41,15.53,0.04629,3,5,42.74,17.8,0.00218,6,20.5,12.94,0.41141,7,4.42,11.79,0.58641,2,6,30.89,11.98,0.01831,7,13.62,6.87,0.98169,1,7,19.14,1.66,1,1,7,13.1,-4.93,1,2,6,25.59,-9.15,0.35084,7,0.54,-10.55,0.64916,3,5,45.79,-9.14,0.00274,6,16.9,-13.93,0.91646,7,-9.32,-11.57,0.0808,2,5,37.18,-14.51,0.11883,6,7.25,-17.05,0.88117,3,4,51.71,-17.8,0.0008,5,25.35,-17.91,0.62789,6,-5.05,-17.47,0.37131,3,4,40.78,-19.83,0.03739,5,14.45,-20.05,0.90549,6,-16.15,-16.89,0.05712,3,4,31.05,-17.64,0.17295,5,4.69,-17.97,0.82586,6,-25.1,-12.5,0.00119,2,4,23.41,-11.35,0.62578,5,-3.01,-11.75,0.37422,2,4,12.98,-9.04,0.99898,5,-13.46,-9.54,0.00102,1,4,2.49,-9.44,1,1,4,-7.24,-10.39,1,1,4,2,-1.04,1,2,4,11.93,0.4,0.99977,5,-14.6,-0.12,0.00023,3,4,22.96,1.47,0.88163,5,-3.58,1.06,0.11801,6,-28.51,7.97,0.00036,2,5,8.74,1.75,0.99455,6,-16.39,5.64,0.00545,2,4,43.51,-0.45,0.00004,5,16.99,-0.65,0.99996,1,6,3.62,-1.6,1,3,5,41.94,4.43,0.00001,6,16.47,0.17,0.99812,7,-4.25,1.59,0.00186,2,6,27.23,5.78,0.02359,7,7.85,2.57,0.97641],"edges":[4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,0,2,2,4,0,48]}},"wing_R":{"wing_R":{"type":"mesh","hull":23,"width":691,"height":453,"uvs":[0.48246,0.63492,0.50167,0.62917,0.51573,0.62498,0.52327,0.6187,0.52911,0.60562,0.53459,0.59307,0.54832,0.58888,0.57164,0.59778,0.59325,0.60824,0.61143,0.62341,0.61673,0.63718,0.62412,0.65637,0.60628,0.66788,0.58399,0.66474,0.57199,0.66893,0.56993,0.69247,0.56101,0.70084,0.54832,0.69666,0.52877,0.67782,0.51025,0.66841,0.49722,0.66631,0.4787,0.66108,0.47904,0.64172,0.49585,0.64853,0.51848,0.648,0.54146,0.65062,0.55141,0.63754,0.57164,0.63283,0.58811,0.6344,0.60629,0.64539],"triangles":[28,8,9,29,28,9,29,9,10,13,28,29,12,13,29,29,10,11,12,29,11,27,7,8,28,27,8,26,7,27,13,27,28,14,27,13,26,27,14,14,17,25,17,14,16,15,16,14,26,6,7,4,5,6,26,4,6,3,4,26,25,24,3,26,25,3,14,25,26,17,18,25,24,2,3,1,2,24,23,0,1,23,1,24,19,20,23,22,0,23,23,21,22,20,21,23,24,19,23,18,24,25,19,24,18],"vertices":[1,8,-1.61,4.76,1,1,8,11.91,5,1,2,8,21.81,5.17,0.79083,9,-5.08,5.04,0.20917,2,8,27.44,7.06,0.19454,9,0.57,6.87,0.80546,3,8,32.45,12.19,0.00412,9,5.63,11.95,0.99508,10,-19.28,9.06,0.0008,2,9,10.4,16.83,0.97498,10,-15.57,14.8,0.02502,2,9,20.08,16.94,0.80957,10,-6.11,16.83,0.19043,2,9,35.17,10,0.12374,10,10.06,13.02,0.87626,2,10,25.06,8.49,0.70725,11,-1.66,10.1,0.29275,2,10,37.72,1.8,0.02298,11,12.62,9.11,0.97702,1,11,18.56,4.97,1,1,11,26.83,-0.79,1,1,11,17.82,-10.68,1,4,8,65.1,-20.82,0.0099,9,37.94,-21.39,0.00525,10,19.02,-17.19,0.37407,11,3.23,-15.83,0.61078,4,8,56.6,-21.23,0.07022,9,29.43,-21.72,0.09535,10,10.75,-19.2,0.67739,11,-3.51,-21.02,0.15704,4,8,53.33,-31.49,0.15807,9,26.06,-31.94,0.18813,10,9.48,-29.89,0.62407,11,-0.35,-31.3,0.02973,4,8,46.6,-34.14,0.18896,9,19.31,-34.52,0.2134,10,3.38,-33.76,0.58235,11,-4.36,-37.32,0.0153,4,8,38.3,-30.74,0.25816,9,11.04,-31.04,0.26039,10,-5.42,-31.99,0.47683,11,-13.12,-39.27,0.00461,3,8,26.49,-19.97,0.64978,9,-0.66,-20.15,0.21693,10,-19.05,-23.65,0.13329,3,8,14.64,-13.53,0.99308,9,-12.44,-13.59,0.0012,10,-31.9,-19.57,0.00571,1,8,5.94,-11.02,1,1,8,-6.25,-6.45,1,1,8,-4.48,2.14,1,1,8,6.42,-2.92,1,2,8,21.86,-5.43,0.9964,10,-26.35,-10.24,0.0036,4,8,37.29,-9.38,0.18794,9,10.24,-9.66,0.68479,10,-10.45,-11.2,0.12709,11,-26.14,-22.3,0.00018,4,8,45.09,-4.74,0.01489,9,18.09,-5.11,0.78255,10,-3.66,-5.18,0.20201,11,-22.38,-14.05,0.00055,3,8,59.23,-5.09,0.00073,10,10.29,-2.85,0.99109,11,-10.57,-6.26,0.00817,3,8,70.31,-7.78,0.00005,10,21.67,-3.4,0.26347,11,0.06,-2.15,0.73647,1,11,13.56,-1.42,1],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,22,24,18,20,20,22,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,0,44]}}}},{"name":"Char2","attachments":{"body":{"body2":{"name":"Char2/body","x":39.39,"y":-0.73,"rotation":89.79,"width":73,"height":101}},"head":{"head2":{"name":"Char2/head","x":0.18,"y":0.59,"rotation":-90,"width":149,"height":99}},"wing_L":{"wing_L2":{"name":"Char2/wing_L","type":"mesh","hull":38,"width":86,"height":52,"uvs":[1,0.41263,0.89238,0.31248,0.7727,0.2004,0.69917,0.09071,0.62275,0.00963,0.55498,0,0.45694,0,0.37331,0.01202,0.29545,0.08594,0.23922,0.16225,0.17578,0.24809,0.10945,0.35063,0.06043,0.48179,0.02006,0.59625,0,0.77032,0,0.88717,0.01861,1,0.07629,1,0.12243,0.95394,0.16857,0.85855,0.22912,0.81563,0.3041,0.80609,0.3488,0.80848,0.37187,0.89671,0.4108,0.94917,0.46126,1,0.52038,0.99925,0.56364,0.9134,0.62852,0.85855,0.69196,0.81563,0.75684,0.80848,0.84191,0.83948,0.88949,0.90386,0.95294,0.93725,0.99187,0.87286,1,0.66779,1,0.58194,1,0.47463,0.91534,0.64758,0.80884,0.59023,0.6751,0.5206,0.55373,0.44687,0.40265,0.44277,0.27882,0.50421,0.15993,0.63529,0.08315,0.82781,0.38532,0.21339,0.57603,0.21339,0.46705,0.76637,0.64537,0.70492],"triangles":[45,13,44,19,45,44,14,13,45,15,14,45,18,45,19,17,16,15,45,17,15,18,17,45,46,43,9,10,9,43,11,10,43,44,11,43,12,11,44,13,12,44,22,21,43,20,44,43,21,20,43,20,19,44,47,5,4,46,7,6,8,7,46,46,41,42,6,5,47,47,46,6,47,41,46,46,9,8,43,46,42,48,42,41,48,41,49,42,22,43,48,22,42,28,48,49,23,22,48,27,48,28,24,23,48,48,25,24,48,27,25,27,26,25,47,4,3,1,0,37,2,40,47,2,47,3,39,40,2,41,47,40,38,39,1,1,39,2,1,37,38,36,38,37,38,36,35,49,41,40,49,40,39,30,49,39,29,49,30,31,39,38,30,39,31,28,49,29,34,38,35,32,31,38,34,32,38,33,32,34],"vertices":[1,4,-6.98,-12.78,1,2,4,2.93,-16.61,0.99636,5,-23.43,-17.21,0.00364,2,4,13.95,-20.9,0.86555,5,-12.37,-21.4,0.13445,2,4,21.02,-25.64,0.64595,5,-5.25,-26.07,0.35405,3,4,28.13,-28.88,0.4733,5,1.89,-29.23,0.52478,6,-30.56,-22.74,0.00192,3,4,33.97,-28.54,0.35612,5,7.72,-28.83,0.6309,6,-24.81,-23.78,0.01297,3,4,42.31,-27.33,0.18932,5,16.06,-27.54,0.7423,6,-16.41,-24.55,0.06839,3,4,49.34,-25.68,0.09877,5,23.07,-25.82,0.74003,6,-9.19,-24.59,0.1612,3,4,55.42,-20.92,0.04089,5,29.1,-21,0.62381,6,-2.17,-21.38,0.3353,3,4,59.64,-16.3,0.01276,5,33.27,-16.34,0.41965,6,3.01,-17.87,0.56759,3,4,64.4,-11.1,0.00092,5,37.98,-11.09,0.1471,6,8.85,-13.93,0.85198,2,5,42.8,-4.95,0.00868,6,15.02,-9.14,0.99132,2,6,19.85,-2.74,0.85773,7,-2.26,-2.41,0.14227,2,6,23.85,2.87,0.00066,7,3.6,1.2,0.99934,2,6,26.4,11.72,0.02872,7,9.39,8.38,0.97128,2,6,26.96,17.77,0.02234,7,12.26,13.73,0.97766,2,6,25.91,23.76,0.02431,7,13.61,19.66,0.97569,2,6,20.97,24.22,0.05866,7,9.24,22,0.94134,3,5,36.9,25.88,0.00168,6,16.8,22.2,0.14054,7,4.61,21.76,0.85778,3,5,33.74,20.37,0.0332,6,12.39,17.63,0.39818,7,-1.23,19.25,0.56863,3,5,28.93,17.37,0.17201,6,7,15.88,0.59212,7,-6.88,19.74,0.23587,3,5,22.64,15.89,0.52412,6,0.53,15.98,0.41879,7,-12.8,22.34,0.05709,3,5,18.82,15.43,0.78232,6,-3.28,16.46,0.20259,7,-16.13,24.26,0.01509,4,4,42.88,19.86,0.00002,5,16.16,19.66,0.92995,6,-4.84,21.21,0.06862,7,-15.72,29.25,0.00141,4,4,39.18,22.08,0.00378,5,12.43,21.84,0.96572,6,-7.92,24.23,0.03047,7,-17.38,33.23,0.00003,3,4,34.51,24.08,0.01754,5,7.74,23.79,0.97392,6,-12,27.26,0.00854,3,4,29.48,23.31,0.04266,5,2.72,22.97,0.95598,6,-17.07,27.69,0.00136,2,4,26.44,18.36,0.13985,5,-0.27,17.99,0.86015,2,4,21.32,14.74,0.43912,5,-5.35,14.32,0.56088,2,4,16.24,11.75,0.7963,5,-10.4,11.28,0.2037,2,4,10.77,10.59,0.96952,5,-15.86,10.06,0.03048,1,4,3.3,11.13,1,1,4,-1.23,13.86,1,1,4,-6.88,14.8,1,1,4,-9.71,11.01,1,1,4,-8.88,0.35,1,1,4,-8.24,-4.07,1,1,4,-7.44,-9.59,1,1,4,-1.52,0.35,1,1,4,7.97,-1.29,1,2,4,19.87,-3.22,0.99391,5,-6.62,-3.66,0.00609,2,4,30.75,-5.52,0.19554,5,4.28,-5.85,0.80446,3,4,43.64,-3.88,0.00918,5,17.15,-4.07,0.98476,6,-9.64,-2.05,0.00605,3,5,27.19,0.71,0.00411,6,1.25,0.15,0.99579,7,-18.28,7.47,0.0001,3,5,36.25,9.01,0.01216,6,12.06,6,0.82209,7,-6.05,8.67,0.16575,3,5,41.24,19.91,0.00164,6,19.56,15.36,0.16594,7,4.49,14.38,0.83241,3,4,46.82,-15.47,0.0673,5,20.45,-15.63,0.76992,6,-9.26,-14.07,0.16278,3,4,30.59,-17.82,0.41619,5,4.24,-18.14,0.58101,6,-25.59,-12.56,0.0028,3,4,35.75,11.98,0.01377,5,9.1,11.71,0.96773,6,-13.61,15.21,0.0185,2,4,21.03,6.63,0.71511,5,-5.56,6.2,0.28489],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,0,74]}},"wing_R":{"wing_R":{"name":"Char2/wing_R","type":"mesh","hull":36,"width":86,"height":52,"uvs":[0,0.51315,0.03237,0.35136,0.10314,0.32382,0.17599,0.26186,0.24259,0.16892,0.3092,0.09663,0.37164,0.01746,0.44865,0,0.54856,0,0.66863,0.04155,0.74356,0.1345,0.83514,0.24121,0.89967,0.37201,0.95587,0.4925,0.99541,0.63707,1,0.79542,1,0.87459,0.9517,1,0.87677,0.9813,0.83514,0.87803,0.7623,0.8264,0.6728,0.81263,0.62701,0.87115,0.5937,0.97786,0.53959,1,0.48547,1,0.4376,0.91246,0.36683,0.84361,0.30023,0.80575,0.20864,0.8264,0.15037,0.85394,0.1129,0.92278,0.06711,0.93311,0.01091,0.88148,0,0.71969,0,0.60609,0.07649,0.63005,0.19408,0.56624,0.32452,0.48421,0.47149,0.45686,0.57254,0.45079,0.66991,0.50852,0.78749,0.61183,0.86623,0.69387,0.90848,0.80629,0.39774,0.71817,0.53553,0.70601,0.38121,0.25632,0.5686,0.22594],"triangles":[43,42,13,43,13,14,44,43,14,15,44,14,19,20,43,44,15,16,44,19,43,18,19,44,17,18,44,16,17,44,10,41,48,41,10,11,42,41,11,12,42,11,42,12,13,21,41,42,46,41,21,20,21,42,20,42,43,48,8,9,47,6,7,5,6,47,48,41,40,10,48,9,7,48,47,48,7,8,39,48,40,39,47,48,47,4,5,38,47,39,38,4,47,46,39,40,46,40,41,45,38,39,45,39,46,22,46,21,26,24,25,46,22,24,26,46,24,22,23,24,3,4,38,37,3,38,2,3,37,36,35,0,2,0,1,36,2,37,2,36,0,34,35,36,28,37,38,28,38,45,29,37,28,36,37,29,27,28,45,30,36,29,34,36,30,33,34,30,26,45,46,27,45,26,30,32,33,31,32,30],"vertices":[2,8,-5.52,7.19,0.99963,9,-32.39,7.34,0.00037,2,8,-1.3,14.98,0.98398,9,-28.09,15.09,0.01602,2,8,4.94,15.33,0.93265,9,-21.85,15.37,0.06735,2,8,11.67,17.4,0.74041,9,-15.09,17.38,0.25959,2,8,18.16,21.16,0.43787,9,-8.57,21.06,0.56213,2,8,24.46,23.86,0.20355,9,-2.24,23.7,0.79645,3,8,30.46,26.97,0.07663,9,3.79,26.75,0.91876,10,-24.02,23.2,0.0046,3,8,37.14,26.7,0.02175,9,10.47,26.42,0.94709,10,-17.41,24.2,0.03116,3,8,45.6,25.2,0.00024,9,18.91,24.82,0.86388,10,-8.82,24.32,0.13588,2,9,28.66,20.79,0.60066,10,1.54,22.3,0.39934,2,9,34.1,14.85,0.31871,10,8.05,17.56,0.68129,2,9,40.81,7.94,0.05286,10,16,12.13,0.94714,3,9,45.01,0.22,0.00045,10,21.65,5.4,0.95334,11,-3.53,5.89,0.04621,2,10,26.57,-0.79,0.01249,11,3.48,2.22,0.98751,1,11,9.72,-3.19,1,1,11,13.52,-10.5,1,2,10,30.65,-20.61,0.0009,11,15.24,-14.24,0.9991,2,10,26.58,-27.19,0.01848,11,14.19,-21.9,0.98152,2,10,20.13,-26.3,0.06475,11,7.93,-23.71,0.93525,4,8,61.88,-24.07,0.00091,9,34.68,-24.61,0.00223,10,16.47,-20.99,0.22659,11,2.44,-20.33,0.77027,4,8,56.18,-20.33,0.01208,9,29.02,-20.81,0.04272,10,10.17,-18.39,0.54075,11,-4.38,-20.51,0.40445,4,8,48.73,-18.27,0.07941,9,21.59,-18.68,0.25297,10,2.46,-17.78,0.56305,11,-11.67,-23.08,0.10457,4,8,44.32,-20.58,0.18639,9,17.16,-20.94,0.40653,10,-1.43,-20.88,0.37903,11,-13.97,-27.49,0.02805,4,8,40.53,-25.54,0.27933,9,13.32,-25.86,0.4435,10,-4.22,-26.47,0.27175,11,-14.26,-33.73,0.00542,4,8,35.74,-25.86,0.32797,9,8.53,-26.13,0.44152,10,-8.85,-27.69,0.22904,11,-18,-36.72,0.00146,4,8,31.16,-25.05,0.37658,9,3.96,-25.27,0.43031,10,-13.51,-27.75,0.19307,11,-22.23,-38.67,0.00004,3,8,27.9,-19.84,0.48982,9,0.75,-20.04,0.37941,10,-17.69,-23.26,0.13078,3,8,22.54,-15.25,0.77184,9,-4.57,-15.39,0.18395,10,-23.82,-19.76,0.04421,3,8,17.24,-12.31,0.96654,9,-9.83,-12.4,0.02529,10,-29.58,-17.88,0.00818,2,8,9.3,-11.99,0.99996,10,-37.44,-19.06,0.00004,1,8,4.11,-12.52,1,1,8,0.32,-15.49,1,1,8,-3.66,-15.33,1,1,8,-7.94,-11.84,1,1,8,-7.4,-3.39,1,1,8,-6.36,2.43,1,2,8,-0.1,0.05,1,9,-27.05,0.15,0,2,8,10.43,1.55,0.99461,9,-16.5,1.53,0.00539,2,8,22.23,3.78,0.75475,9,-4.68,3.65,0.24525,1,9,8,2.71,1,1,9,16.6,1.41,1,4,8,51.25,-2.66,0.00184,9,24.28,-3.09,0.01078,10,1.99,-1.97,0.9829,11,-18.51,-8.82,0.00448,4,8,60.27,-9.72,0.00189,9,33.22,-10.24,0.0037,10,12.18,-7.2,0.76807,11,-7.08,-9.47,0.22634,4,8,66.19,-15.1,0.00024,9,39.08,-15.69,0.00019,10,19.01,-11.37,0.28577,11,0.86,-10.52,0.71381,3,8,68.74,-21.5,0.00001,10,22.73,-17.17,0.09677,11,6.6,-14.31,0.90322,3,8,26.3,-9.3,0.71404,9,-0.75,-9.47,0.25336,10,-21.26,-13.2,0.0326,4,8,38.07,-10.75,0.18452,9,11.02,-11.05,0.61792,10,-9.42,-12.4,0.19322,11,-24.71,-22.98,0.00434,3,8,29.1,14.6,0.13303,9,2.3,14.39,0.86673,10,-23.02,10.79,0.00024,2,9,18.43,12.96,0.84054,10,-6.93,12.6,0.15946],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,0,70]}}}},{"name":"Char3","attachments":{"body":{"body2":{"name":"Char3/body","x":39.39,"y":-0.73,"rotation":89.79,"width":59,"height":97}},"head":{"head2":{"name":"Char3/head","x":0.18,"y":0.59,"rotation":-90,"width":102,"height":98}},"wing_L":{"wing_L2":{"name":"Char3/wing_L","type":"mesh","hull":38,"width":82,"height":51,"uvs":[1,0.41263,0.89238,0.31248,0.7727,0.2004,0.69917,0.09071,0.62275,0.00963,0.55498,0,0.45694,0,0.37331,0.01202,0.29545,0.08594,0.23922,0.16225,0.17578,0.24809,0.10945,0.35063,0.06043,0.48179,0.02006,0.59625,0,0.77032,0,0.88717,0.01861,1,0.07629,1,0.12243,0.95394,0.16857,0.85855,0.22912,0.81563,0.3041,0.80609,0.3488,0.80848,0.37187,0.89671,0.4108,0.94917,0.46126,1,0.52038,0.99925,0.56364,0.9134,0.62852,0.85855,0.69196,0.81563,0.75684,0.80848,0.84191,0.83948,0.88949,0.90386,0.95294,0.93725,0.99187,0.87286,1,0.66779,1,0.58194,1,0.47463,0.91534,0.64758,0.80884,0.59023,0.6751,0.5206,0.55373,0.44687,0.40265,0.44277,0.27882,0.50421,0.15993,0.63529,0.08315,0.82781,0.38532,0.21339,0.57603,0.21339,0.46705,0.76637,0.64537,0.70492],"triangles":[45,13,44,19,45,44,14,13,45,15,14,45,18,45,19,17,16,15,45,17,15,18,17,45,46,43,9,10,9,43,11,10,43,44,11,43,12,11,44,13,12,44,22,21,43,20,44,43,21,20,43,20,19,44,47,5,4,46,7,6,8,7,46,46,41,42,6,5,47,47,46,6,47,41,46,46,9,8,43,46,42,48,42,41,48,41,49,42,22,43,48,22,42,28,48,49,23,22,48,27,48,28,24,23,48,48,25,24,48,27,25,27,26,25,47,4,3,1,0,37,2,40,47,2,47,3,39,40,2,41,47,40,38,39,1,1,39,2,1,37,38,36,38,37,38,36,35,49,41,40,49,40,39,30,49,39,29,49,30,31,39,38,30,39,31,28,49,29,34,38,35,32,31,38,34,32,38,33,32,34],"vertices":[1,4,-7.41,-9.78,1,2,4,2.49,-13.61,0.99636,5,-23.9,-14.22,0.00364,2,4,13.51,-17.9,0.86555,5,-12.84,-18.4,0.13445,2,4,20.59,-22.64,0.64595,5,-5.71,-23.07,0.35405,3,4,27.7,-25.88,0.4733,5,1.43,-26.23,0.52478,6,-30.28,-19.72,0.00192,3,4,33.54,-25.54,0.35612,5,7.26,-25.84,0.6309,6,-24.53,-20.76,0.01297,3,4,41.88,-24.33,0.18932,5,15.59,-24.55,0.7423,6,-16.13,-21.53,0.06839,3,4,48.91,-22.68,0.09877,5,22.61,-22.83,0.74003,6,-8.91,-21.57,0.1612,3,4,54.99,-17.92,0.04089,5,28.64,-18.01,0.62381,6,-1.89,-18.36,0.3353,3,4,59.21,-13.3,0.01276,5,32.81,-13.34,0.41965,6,3.29,-14.85,0.56759,3,4,63.97,-8.1,0.00092,5,37.52,-8.1,0.1471,6,9.13,-10.91,0.85198,2,5,42.34,-1.96,0.00868,6,15.3,-6.12,0.99132,2,6,20.13,0.28,0.85773,7,-0.84,0.27,0.14227,2,6,24.13,5.89,0.00066,7,5.03,3.88,0.99934,2,6,26.68,14.74,0.02872,7,10.82,11.05,0.97128,2,6,27.24,20.79,0.02234,7,13.68,16.41,0.97766,2,6,26.18,26.78,0.02431,7,15.04,22.34,0.97569,2,6,21.25,27.24,0.05866,7,10.66,24.67,0.94134,3,5,36.44,28.87,0.00168,6,17.07,25.22,0.14054,7,6.04,24.43,0.85778,3,5,33.27,23.37,0.0332,6,12.67,20.64,0.39818,7,0.2,21.93,0.56863,3,5,28.47,20.36,0.17201,6,7.28,18.9,0.59212,7,-5.45,22.41,0.23587,3,5,22.17,18.89,0.52412,6,0.81,19,0.41879,7,-11.37,25.02,0.05709,3,5,18.35,18.42,0.78232,6,-3.01,19.48,0.20259,7,-14.7,26.94,0.01509,4,4,42.45,22.86,0.00002,5,15.69,22.65,0.92995,6,-4.56,24.23,0.06862,7,-14.29,31.92,0.00141,4,4,38.75,25.08,0.00378,5,11.97,24.84,0.96572,6,-7.64,27.25,0.03047,7,-15.95,35.9,0.00003,3,4,34.07,27.08,0.01754,5,7.27,26.79,0.97392,6,-11.72,30.28,0.00854,3,4,29.05,26.31,0.04266,5,2.26,25.97,0.95598,6,-16.79,30.71,0.00136,2,4,26,21.36,0.13985,5,-0.74,20.99,0.86015,2,4,20.89,17.74,0.43912,5,-5.82,17.32,0.56088,2,4,15.81,14.75,0.7963,5,-10.87,14.28,0.2037,2,4,10.34,13.59,0.96952,5,-16.32,13.06,0.03048,1,4,2.87,14.13,1,1,4,-1.66,16.86,1,1,4,-7.31,17.8,1,1,4,-10.14,14.01,1,1,4,-9.31,3.35,1,1,4,-8.67,-1.07,1,1,4,-7.87,-6.59,1,1,4,-1.95,3.35,1,1,4,7.54,1.71,1,2,4,19.44,-0.22,0.99391,5,-7.09,-0.66,0.00609,2,4,30.32,-2.53,0.19554,5,3.81,-2.86,0.80446,3,4,43.21,-0.88,0.00918,5,16.69,-1.08,0.98476,6,-9.37,0.96,0.00605,3,5,26.72,3.71,0.00411,6,1.53,3.17,0.99579,7,-16.85,10.15,0.0001,3,5,35.78,12.01,0.01216,6,12.34,9.01,0.82209,7,-4.62,11.34,0.16575,3,5,40.78,22.91,0.00164,6,19.83,18.38,0.16594,7,5.92,17.06,0.83241,3,4,46.39,-12.47,0.0673,5,19.98,-12.64,0.76992,6,-8.98,-11.05,0.16278,3,4,30.16,-14.82,0.41619,5,3.78,-15.15,0.58101,6,-25.31,-9.54,0.0028,3,4,35.32,14.98,0.01377,5,8.64,14.7,0.96773,6,-13.33,18.23,0.0185,2,4,20.6,9.63,0.71511,5,-6.03,9.2,0.28489],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,70,72,72,74,0,74]}},"wing_R":{"wing_R":{"name":"Char3/wing_R","type":"mesh","hull":36,"width":82,"height":51,"uvs":[0,0.51315,0.03237,0.35136,0.10314,0.32382,0.17599,0.26186,0.24259,0.16892,0.3092,0.09663,0.37164,0.01746,0.44865,0,0.54856,0,0.66863,0.04155,0.74356,0.1345,0.83514,0.24121,0.89967,0.37201,0.95587,0.4925,0.99541,0.63707,1,0.79542,1,0.87459,0.9517,1,0.87677,0.9813,0.83514,0.87803,0.7623,0.8264,0.6728,0.81263,0.62701,0.87115,0.5937,0.97786,0.53959,1,0.48547,1,0.4376,0.91246,0.36683,0.84361,0.30023,0.80575,0.20864,0.8264,0.15037,0.85394,0.1129,0.92278,0.06711,0.93311,0.01091,0.88148,0,0.71969,0,0.60609,0.07649,0.63005,0.19408,0.56624,0.32452,0.48421,0.47149,0.45686,0.57254,0.45079,0.66991,0.50852,0.78749,0.61183,0.86623,0.69387,0.90848,0.80629,0.39774,0.71817,0.53553,0.70601,0.38121,0.25632,0.5686,0.22594],"triangles":[43,42,13,43,13,14,44,43,14,15,44,14,19,20,43,44,15,16,44,19,43,18,19,44,17,18,44,16,17,44,10,41,48,41,10,11,42,41,11,12,42,11,42,12,13,21,41,42,46,41,21,20,21,42,20,42,43,48,8,9,47,6,7,5,6,47,48,41,40,10,48,9,7,48,47,48,7,8,39,48,40,39,47,48,47,4,5,38,47,39,38,4,47,46,39,40,46,40,41,45,38,39,45,39,46,22,46,21,26,24,25,46,22,24,26,46,24,22,23,24,3,4,38,37,3,38,2,3,37,36,35,0,2,0,1,36,2,37,2,36,0,34,35,36,28,37,38,28,38,45,29,37,28,36,37,29,27,28,45,30,36,29,34,36,30,33,34,30,26,45,46,27,45,26,30,32,33,31,32,30],"vertices":[2,8,-6.27,2.92,0.99963,9,-33.19,3.08,0.00037,2,8,-2.06,10.72,0.98398,9,-28.89,10.83,0.01602,2,8,4.18,11.06,0.93265,9,-22.65,11.11,0.06735,2,8,10.91,13.14,0.74041,9,-15.89,13.12,0.25959,2,8,17.4,16.89,0.43787,9,-9.37,16.81,0.56213,2,8,23.7,19.59,0.20355,9,-3.05,19.44,0.79645,3,8,29.71,22.71,0.07663,9,2.99,22.49,0.91876,10,-23.96,18.87,0.0046,3,8,36.39,22.44,0.02175,9,9.67,22.16,0.94709,10,-17.35,19.87,0.03116,3,8,44.84,20.94,0.00024,9,18.11,20.57,0.86388,10,-8.75,19.99,0.13588,2,9,27.86,16.53,0.60066,10,1.6,17.98,0.39934,2,9,33.3,10.59,0.31871,10,8.11,13.23,0.68129,2,9,40.01,3.68,0.05286,10,16.07,7.8,0.94714,3,9,44.21,-4.03,0.00045,10,21.71,1.07,0.95334,11,-1.72,1.96,0.04621,2,10,26.63,-5.12,0.01249,11,5.29,-1.71,0.98751,1,11,11.53,-7.12,1,1,11,15.33,-14.43,1,2,10,30.71,-24.94,0.0009,11,17.05,-18.17,0.9991,2,10,26.64,-31.52,0.01848,11,16,-25.84,0.98152,2,10,20.19,-30.63,0.06475,11,9.74,-27.65,0.93525,4,8,61.12,-28.33,0.00091,9,33.88,-28.86,0.00223,10,16.53,-25.32,0.22659,11,4.25,-24.27,0.77027,4,8,55.42,-24.59,0.01208,9,28.22,-25.06,0.04272,10,10.23,-22.72,0.54075,11,-2.57,-24.45,0.40445,4,8,47.97,-22.54,0.07941,9,20.79,-22.93,0.25297,10,2.52,-22.11,0.56305,11,-9.86,-27.01,0.10457,4,8,43.56,-24.84,0.18639,9,16.36,-25.2,0.40653,10,-1.37,-25.21,0.37903,11,-12.16,-31.43,0.02805,4,8,39.77,-29.81,0.27933,9,12.51,-30.12,0.4435,10,-4.16,-30.8,0.27175,11,-12.44,-37.66,0.00542,4,8,34.98,-30.12,0.32797,9,7.73,-30.39,0.44152,10,-8.79,-32.02,0.22904,11,-16.19,-40.66,0.00146,4,8,30.4,-29.31,0.37658,9,3.15,-29.53,0.43031,10,-13.45,-32.08,0.19307,11,-20.42,-42.6,0.00004,3,8,27.14,-24.11,0.48982,9,-0.05,-24.29,0.37941,10,-17.63,-27.59,0.13078,3,8,21.78,-19.52,0.77184,9,-5.37,-19.65,0.18395,10,-23.76,-24.09,0.04421,3,8,16.48,-16.58,0.96654,9,-10.63,-16.65,0.02529,10,-29.52,-22.21,0.00818,2,8,8.54,-16.26,0.99996,10,-37.38,-23.39,0.00004,1,8,3.36,-16.79,1,1,8,-0.44,-19.75,1,1,8,-4.41,-19.59,1,1,8,-8.7,-16.1,1,1,8,-8.15,-7.65,1,1,8,-7.12,-1.84,1,2,8,-0.86,-4.21,1,9,-27.85,-4.11,0,2,8,9.68,-2.72,0.99461,9,-17.3,-2.72,0.00539,2,8,21.47,-0.48,0.75475,9,-5.48,-0.61,0.24525,1,9,7.2,-1.55,1,1,9,15.8,-2.85,1,4,8,50.49,-6.92,0.00184,9,23.47,-7.35,0.01078,10,2.05,-6.3,0.9829,11,-16.7,-12.75,0.00448,4,8,59.51,-13.98,0.00189,9,32.42,-14.5,0.0037,10,12.24,-11.53,0.76807,11,-5.27,-13.4,0.22634,4,8,65.43,-19.37,0.00024,9,38.28,-19.95,0.00019,10,19.07,-15.7,0.28577,11,2.67,-14.45,0.71381,3,8,67.98,-25.76,0.00001,10,22.79,-21.5,0.09677,11,8.41,-18.24,0.90322,3,8,25.54,-13.56,0.71404,9,-1.55,-13.73,0.25336,10,-21.2,-17.53,0.0326,4,8,37.32,-15.01,0.18452,9,10.21,-15.3,0.61792,10,-9.36,-16.73,0.19322,11,-22.9,-26.91,0.00434,3,8,28.34,10.33,0.13303,9,1.5,10.14,0.86673,10,-22.96,6.46,0.00024,2,9,17.63,8.7,0.84054,10,-6.87,8.27,0.15946],"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,44,46,46,48,48,50,50,52,52,54,54,56,56,58,58,60,60,62,62,64,64,66,66,68,68,70,0,70]}}}}],"animations":{"Appear":{"slots":{"body":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff"}]},"head":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff"}]},"wing_L":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff"}]},"wing_R":{"color":[{"color":"ffffffff"},{"time":0.1667,"color":"ffffff00"},{"time":0.3333,"color":"ffffffff"},{"time":0.6667,"color":"ffffff00"},{"time":1,"color":"ffffffff","curve":"stepped"},{"time":1.3333,"color":"ffffffff"}]}},"bones":{"body":{"translate":[{"y":0.96}]},"wing_R4":{"rotate":[{"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.34}]},"wing_L4":{"rotate":[{"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.43}]}}},"Crash_Animation":{"slots":{"1":{"attachment":[{"time":0.1,"name":"1"},{"time":0.1333,"name":"2"},{"time":0.2333,"name":"3"},{"time":0.2667,"name":"4"},{"time":0.3,"name":"5"},{"time":0.3667,"name":"6"},{"time":0.4333,"name":"7"},{"time":0.4667,"name":"8"},{"time":0.5,"name":"9"},{"time":0.5333,"name":"10"},{"time":0.6,"name":"11"},{"time":0.6667,"name":"12"},{"time":0.7333,"name":null}]},"body":{"attachment":[{"time":0.2333,"name":null}]},"head":{"attachment":[{"time":0.2333,"name":null}]},"wing_L":{"attachment":[{"time":0.2333,"name":null}]},"wing_R":{"attachment":[{"time":0.2333,"name":null}]}},"bones":{"1":{"translate":[{},{"time":0.1,"x":-12.13,"y":16.78},{"time":0.1333,"x":-0.03,"y":-75.92}]},"body":{"translate":[{"y":0.96,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1,"y":0.21},{"time":0.7333,"y":0.96}],"scale":[{"curve":0.297,"c3":0.634,"c4":0.37},{"time":0.1,"x":0.768,"curve":0.3,"c2":0.21,"c3":0.756},{"time":0.7333}]},"head":{"translate":[{},{"time":0.1,"x":3.69,"y":-0.01},{"time":0.2333,"x":5.82,"y":-0.02},{"time":0.7333}]},"wing_L":{"rotate":[{},{"time":0.1,"angle":12.13},{"time":0.7333}]},"wing_R":{"rotate":[{},{"time":0.1,"angle":-8.3},{"time":0.7333}]},"wing_R4":{"rotate":[{"angle":-1.93,"curve":0.337,"c2":0.35,"c3":0.671,"c4":0.68},{"time":0.1,"angle":-10.23,"curve":0.38,"c2":0.6,"c3":0.726},{"time":0.7333,"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04,"curve":0.338,"c2":0.35,"c3":0.671,"c4":0.69},{"time":0.1,"angle":-9.34,"curve":0.372,"c2":0.62,"c3":0.711},{"time":0.7333,"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.34,"curve":0.336,"c2":0.35,"c3":0.67,"c4":0.69},{"time":0.1,"angle":-8.64,"curve":0.357,"c2":0.65,"c3":0.692},{"time":0.7333,"angle":-0.34}]},"wing_L4":{"rotate":[{"angle":2.46,"curve":0.337,"c2":0.35,"c3":0.671,"c4":0.68},{"time":0.1,"angle":14.58,"curve":0.38,"c2":0.6,"c3":0.726},{"time":0.7333,"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03},{"time":0.1,"angle":-6.88},{"time":0.7333,"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.43,"curve":0.336,"c2":0.35,"c3":0.67,"c4":0.69},{"time":0.1,"angle":12.56,"curve":0.357,"c2":0.65,"c3":0.692},{"time":0.7333,"angle":0.43}]}}},"Fly_Animation":{"bones":{"body":{"translate":[{"y":0.96,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"x":-0.03,"y":7.37,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"y":0.96}]},"wing_L":{"rotate":[{},{"time":0.6667,"angle":10.14},{"time":1.3333}]},"wing_R":{"rotate":[{},{"time":0.6667,"angle":-7.96},{"time":1.3333}]},"wing_R4":{"rotate":[{"angle":-1.93,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.2,"curve":0.25,"c3":0.75},{"time":0.8667,"angle":-7.96,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1.3333,"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.1333,"curve":0.25,"c3":0.75},{"time":0.8,"angle":-7.96,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1.3333,"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.34,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":-7.96,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.3333,"angle":-0.34}]},"wing_L4":{"rotate":[{"angle":2.46,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.2,"curve":0.25,"c3":0.75},{"time":0.8667,"angle":10.14,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1.3333,"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03},{"time":0.1333},{"time":0.8,"angle":10.14},{"time":1.3333,"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.43,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.7333,"angle":10.14,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1.3333,"angle":0.43}]}}},"Fly_Animation2":{"bones":{"body":{"translate":[{"y":0.96,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.5667,"x":-0.04,"y":10.44,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1,"y":0.96}]},"head":{"translate":[{"x":0.17,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0333,"curve":0.25,"c3":0.75},{"time":0.5333,"x":3.95,"y":-0.01,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1,"x":0.17}]},"wing_L":{"rotate":[{},{"time":0.5,"angle":20.41},{"time":1}]},"wing_R":{"rotate":[{},{"time":0.5,"angle":-15.82},{"time":1}]},"wing_R4":{"rotate":[{"angle":-1.93,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.6,"angle":-7.96,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1,"angle":-1.93}]},"wing_R3":{"rotate":[{"angle":-1.04,"curve":0.375,"c2":0.62,"c3":0.716},{"time":0.0667,"curve":0.25,"c3":0.75},{"time":0.5667,"angle":-24.75,"curve":0.243,"c3":0.68,"c4":0.71},{"time":1,"angle":-1.04}]},"wing_R2":{"rotate":[{"angle":-0.85,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0333,"angle":-0.34,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.5333,"angle":-12.28,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1,"angle":-0.85}]},"wing_L4":{"rotate":[{"angle":2.46,"curve":0.382,"c2":0.58,"c3":0.731},{"time":0.1,"curve":0.25,"c3":0.75},{"time":0.6,"angle":10.14,"curve":0.243,"c3":0.655,"c4":0.63},{"time":1,"angle":2.46}]},"wing_L3":{"rotate":[{"angle":2.03},{"time":0.0667},{"time":0.5667,"angle":19.99},{"time":1,"angle":2.03}]},"wing_L2":{"rotate":[{"angle":0.93,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.0333,"angle":0.43,"curve":0.36,"c2":0.64,"c3":0.695},{"time":0.5333,"angle":12.18,"curve":0.245,"c3":0.711,"c4":0.83},{"time":1,"angle":0.93}]}}}}},[0]]],0,0,[0],[-1],[68]],[[{"name":"Tree2","rect":[430,468,126,166],"offset":[-0.5,0],"originalSize":[127,166],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"SoundMgr"],[16,"SoundMgr",[[135,-2,0,1,2,3,4,5]],[0,"d5+DYQ6bhB5oeIiG3yRP82",-1]]],0,[0,4,1,0,0,1,0,5,1,2],[0,0,0,0,0,0],[37,38,39,40,41,42],[69,70,71,72,73,74]],[[[5,"StageQRscan"],[15,"StageQRscan",[-6,-7,-8],[[136,-3,-2],[41,2,-5,[[23,6,[[24,"824b3x307FID6iZwnCxazfr","nextStage",-4]]]]]],[13,-1],[5,960,540]],[52,"qrCode",1,[-10,-11,-12],[-9],[0,"c42gRiMHdAL7JPDcf0TczP",1],[-217.5,-43.125,0,0,0,0,1,0.75,0.75,0.75]],[12,"loading_icon",2,[[2,0,-13,[6],7],[42,-14]],[0,"71PdmVfyhFVaVIjoGb1Qfd",1],[5,266,266]],[1,"bg",1,[[2,0,-15,[0],1],[6,-16,2,3]],[0,"59J4R7fPZIUKTh57MBqXMg",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[1,"Version",1,[[116,"Version: 0.0.3",15,false,1,1,-17,[8],9],[121,36,7.734999999999999,10,-18]],[0,"9fdKdr6oVBkq/wBALDXGOQ",1],[5,150.03,50.4],[397.25,-234.8,0,0,0,0,1,1,1,1]],[12,"bg",2,[[2,0,-19,[4],5]],[0,"2ex8UwP4tOLpI83Dk2/1dL",1],[5,310,310]],[27,"qr",2,[0,"faUDjTroFC75JHPS9M/JOw",1]],[61,300,2,7,3]],0,[0,4,1,0,18,8,0,0,1,0,10,1,0,0,1,0,-1,4,0,-2,2,0,-3,5,0,-1,8,0,-1,6,0,-2,7,0,-3,3,0,0,3,0,0,3,0,0,4,0,0,4,0,0,5,0,0,5,0,0,6,0,5,1,19],[0,0,0,0,0,0,0,0,0,0],[-1,1,7,8,-1,1,-1,1,-1,3],[0,32,75,32,0,9,0,22,0,2]],[[{"name":"Murshroom","rect":[3,943,73,57],"offset":[0,0],"originalSize":[73,57],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"MATKETNOI","rect":[3,910,360,107],"offset":[0,0],"originalSize":[360,107],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"QR_Txt","rect":[3,3,768,283],"offset":[0.5,-0.5],"originalSize":[769,284],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"default_sprite_splash","rect":[0,0,2,2],"offset":[0,0],"originalSize":[2,2],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[76]],[[{"name":"Người chơi 1","rect":[984,402,186,32],"offset":[0,0],"originalSize":[186,32],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Item","rect":[630,948,49,59],"offset":[0,0],"originalSize":[49,59],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"StageLobby"],[15,"StageLobby",[-13,-14,-15,-16,-17,-18,-19],[[138,-9,-8,-7,-6,[-3,-4,-5],-2,70,71],[41,2,-12,[[23,6,[[24,"cd1c1/ESEpLhb7U8uTj4hYv","nextStage",-10]]],[23,7,[[24,"cd1c1/ESEpLhb7U8uTj4hYv","previousStage",-11]]]]]],[13,-1],[5,960,540]],[4,"playerLobby",1,[-21,-22,-23],[[2,2,-20,[40],41]],[0,"94iouubU5EfYucnd509Nml",1],[5,234,333],[15,-18.75,0,0,0,0,1,0.5,0.5,0.5]],[4,"playerLobby copy",1,[-25,-26,-27],[[2,2,-24,[54],55]],[0,"e7k2OXWMdM/IIR7R2etp9u",1],[5,234,333],[187.5,-18.75,0,0,0,0,1,0.5,0.5,0.5]],[4,"playerLobby copy",1,[-29,-30,-31],[[2,2,-28,[68],69]],[0,"0aLm+Qhx5HoL2HCHSYBUCa",1],[5,234,333],[360,-18.75,0,0,0,0,1,0.5,0.5,0.5]],[52,"qrCode",1,[-33,-34,-35],[-32],[0,"16HL1NCmdEQagqtonDNlLm",1],[-225,-56.25,0,0,0,0,1,0.75,0.75,0.75]],[4,"Rectangle 4",1,[-38,-39],[[2,2,-36,[24],25],[6,-37,26,27]],[0,"18hnLNyghMWpJM6vw6rjJe",1],[5,639,320],[194.208,162.07875,0,0,0,0,1,0.5,0.5,0.5]],[4,"bg",1,[-41,-42],[[2,0,-40,[6],7]],[0,"e7CsyQIhJE3b0USNoFCfC2",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[33,"btnNext",1,[[[2,2,-43,[8],9],-44,[6,-45,10,11]],4,1,4],[0,"4fx6Agw9VBG7i7NMwjibq1",1],[5,549,311],[187.5,-187.5,0,0,0,0,1,0.5,0.5,0.5]],[12,"loading_icon",5,[[2,0,-46,[18],19],[42,-47]],[0,"a4gu3PkyxOoYoSwgeXRvsV",1],[5,266,266]],[1,"GameName",7,[[3,-48,[2],3],[6,-49,4,5]],[0,"8cNuWj5oBFfbQEs3hKZHPl",1],[5,395,140],[550,300,0,0,0,0,1,0.45,0.55,1]],[30,"bg",5,[-51],[[2,0,-50,[16],17]],[0,"86Kc9uBERHXaFam4ye3UAO",1],[5,434,434.6666667]],[1,"QR_Txt",11,[[2,0,-52,[12],13],[6,-53,14,15]],[0,"37Dr0YwNtOSLHZjXQbEm9i",1],[5,512.6666667,189.3333333],[-80.19,285,0,0,0,0,1,1,1,1]],[21,"bgDomain",6,[-55],[[2,0,-54,[22],23]],[0,"c91fqJFAJNHLBs4Jida/jS",1],[4,4282129436],[5,500,75],[-10,55,0,0,0,0,1,1,1,1]],[1,"playerNotReady",2,[[3,-56,[28],29],[6,-57,30,31]],[0,"368bf81/1Ibq1a2+Ee1J3e",1],[5,178,33],[0,-130,0,0,0,0,1,1,1,1]],[4,"playerReady",2,[-59],[[2,0,-58,[36],37]],[0,"09D92Wjb9I+rvwty5ILYHl",1],[5,366,322.6666667],[-15,30,0,0,0,0,1,1,1,1]],[1,"sẵn sàng",15,[[3,-60,[32],33],[6,-61,34,35]],[0,"33h9N9vtdGFruKN+RgdcDn",1],[5,186,32],[20,-160,0,0,0,0,1,1,1,1]],[1,"playerNotReady",3,[[3,-62,[42],43],[6,-63,44,45]],[0,"70HuC2/sVIJ6Gvr4Z2JTYY",1],[5,178,33],[0,-130,0,0,0,0,1,1,1,1]],[4,"playerReady",3,[-65],[[2,0,-64,[50],51]],[0,"4dIIaxZyVDiJv2RxEV3pvG",1],[5,366,322.6666667],[-15,30,0,0,0,0,1,1,1,1]],[1,"sẵn sàng",18,[[3,-66,[46],47],[6,-67,48,49]],[0,"39YIQ4GbJGMI6zVrAFDaOj",1],[5,193,33],[25,-160,0,0,0,0,1,1,1,1]],[1,"playerNotReady",4,[[3,-68,[56],57],[6,-69,58,59]],[0,"82WV93R25ObYncPJQBgRQD",1],[5,178,33],[0,-130,0,0,0,0,1,1,1,1]],[4,"playerReady",4,[-71],[[2,0,-70,[64],65]],[0,"2bU2riQjdFxbixEdjZJh4l",1],[5,366,322.6666667],[-15,30,0,0,0,0,1,1,1,1]],[1,"sẵn sàng",21,[[3,-72,[60],61],[6,-73,62,63]],[0,"94T2FYymtOupssSfe2XwZZ",1],[5,194,33],[25,-160,0,0,0,0,1,1,1,1]],[1,"LOGO_ELOFUN",7,[[2,0,-74,[0],1]],[0,"54KQPZW+lK86ENdCxbE/aa",1],[5,93.3333333,22.6666667],[-565,335,0,0,0,0,1,1.5,1.5,1]],[40,true,8],[27,"qr",5,[0,"69iQ66/r9G1Z6o7iqf7pUS",1]],[61,325,5,25,9],[51,"lblRoomCode",6,[-75],[0,"5d4o9rhYtJALTvGW1lBLMt",1],[4,4293298560],[5,318.49,50],[-5,-115,0,0,0,0,1,1,1,1]],[37,"01234567",50,50,false,1,1,2,27,[20]],[90,"lblDomain",13,[-76],[0,"ceD67Hj0ZKwIMZxHMYPn2+",1],[4,4293298560],[5,500,44.1]],[56,"https://dk.eloplay.vn",50,50,false,1,1,2,2,29,[21]],[1,"playerSprite",2,[[7,"Char3","Fly_Animation",0,false,"Fly_Animation",-77,[38],39]],[0,"47xGikDOtMW5Juwp3rzEuO",1],[5,691,453],[0,-75,0,0,0,0,1,1,1,1]],[1,"playerSprite",3,[[7,"Char2","Fly_Animation",0,false,"Fly_Animation",-78,[52],53]],[0,"93A2y9klpIc7swtcAOxaho",1],[5,691,453],[0,-75,0,0,0,0,1,1,1,1]],[1,"playerSprite",4,[[7,"Char1","Fly_Animation",0,false,"Fly_Animation",-79,[66],67]],[0,"f9ofVGVkZA4bZmOOILEPlr",1],[5,691,453],[0,-75,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,43,30,0,-1,2,0,-2,3,0,-3,4,0,44,28,0,45,24,0,18,26,0,0,1,0,10,1,0,10,1,0,0,1,0,-1,7,0,-2,8,0,-3,5,0,-4,6,0,-5,2,0,-6,3,0,-7,4,0,0,2,0,-1,14,0,-2,15,0,-3,31,0,0,3,0,-1,17,0,-2,18,0,-3,32,0,0,4,0,-1,20,0,-2,21,0,-3,33,0,-1,26,0,-1,11,0,-2,25,0,-3,9,0,0,6,0,0,6,0,-1,27,0,-2,13,0,0,7,0,-1,23,0,-2,10,0,0,8,0,-2,24,0,0,8,0,0,9,0,0,9,0,0,10,0,0,10,0,0,11,0,-1,12,0,0,12,0,0,12,0,0,13,0,-1,29,0,0,14,0,0,14,0,0,15,0,-1,16,0,0,16,0,0,16,0,0,17,0,0,17,0,0,18,0,-1,19,0,0,19,0,0,19,0,0,20,0,0,20,0,0,21,0,-1,22,0,0,22,0,0,22,0,0,23,0,-1,28,0,-1,30,0,0,31,0,0,32,0,0,33,0,5,1,79],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,28,30],[-1,1,-1,1,7,8,-1,1,-1,1,7,8,-1,1,7,8,-1,1,-1,1,-1,-1,-1,1,-1,1,7,8,-1,1,7,8,-1,1,7,8,-1,1,-1,6,-1,1,-1,1,7,8,-1,1,7,8,-1,1,-1,6,-1,1,-1,1,7,8,-1,1,7,8,-1,1,-1,6,-1,1,46,47,12,13,3,3],[0,33,0,23,23,24,0,34,0,35,77,35,0,36,78,36,0,79,0,22,0,0,0,9,0,37,80,37,0,10,25,10,0,38,81,38,0,26,4,8,0,27,0,10,25,10,0,39,82,39,0,26,4,8,0,27,0,10,25,10,0,40,83,40,0,26,4,8,0,27,4,84,0,18,2,2]],[[{"name":"Play again","rect":[777,3,374,153],"offset":[0,0],"originalSize":[374,153],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Player1","rect":[416,948,114,21],"offset":[-16,2.5],"originalSize":[186,32],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Map3","rect":[0,0,570,1080],"offset":[0,0],"originalSize":[570,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[85]],[[{"name":"Player2","rect":[290,948,120,21],"offset":[-19.5,2],"originalSize":[193,33],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"StageInGame"],[15,"StageInGame",[-9,-10,-11,-12],[[139,-8,-7,[-4,-5,-6],[37,38,39],-3,-2,[42,43,44],[45,46,47],[48,49,50,51],[52,53,54,55,56],[57,58,59,60,61,62],36,40,41]],[13,-1],[5,960,540]],[47,"Tutorial",1,[-13,-14,-15,-16],[0,"4ekk3dee5C0arFvGcMUEpW",1],[5,1920,1080],[0,0,0,0,0,0,1,0.5,0.5,0.5]],[4,"banner",2,[-18,-19,-20],[[3,-17,[34],35]],[0,"c70Q/Zg1tDcqP2ZritDbr0",1],[5,360,107],[0,375,0,0,0,0,1,1.5,1.5,1.5]],[4,"bg",1,[-22,-23],[[2,0,-21,[4],5]],[0,"5dHuanmAJBHbFdeGK2RnbR",1],[5,1920,1080],[0,0,0,0,0,0,1,0.5,0.5,0.5]],[47,"rank",1,[-24,-25,-26],[0,"3fNBnuBzNFiIA+GlZJlyvw",1],[5,300,200],[-450,61.27575,0,0,0,0,1,0.5,0.5,0.5]],[4,"Player01",5,[-28],[[3,-27,[8],9]],[0,"1fS6aI75pDtoRa0bUHmkEF",1],[5,108,108],[0,50,0,0,0,0,1,1,1,1]],[4,"Player02",5,[-30],[[3,-29,[12],13]],[0,"1dxIzAAOJJ+aD6txyevqpT",1],[5,108,108],[0,-125,0,0,0,0,1,1,1,1]],[4,"Player03",5,[-32],[[3,-31,[16],17]],[0,"941/qep0BLCIFROPSjMKrQ",1],[5,108,108],[0,-300,0,0,0,0,1,1,1,1]],[1,"container",1,[[140,1,1,100,-33,[5,100,0]]],[0,"8043U9WV5MTpU8ukZNfoKa",1],[5,100,0],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[48,"mask",2,[-35],[[128,true,-34,[24]]],[0,"10JQ1jMK1F74FhUl8U+E2J",1],[5,200,200],[0,0.5,0],[0,100,0,0,0,0,1,1,1,1]],[1,"Shape 1 copy",10,[[3,-36,[20],21],[6,-37,22,23]],[0,"87EOqpCpFE3LwQqqSfgny3",1],[5,1148,683],[0,-213.902,0,0,0,0,1,1,1,1]],[21,"bg",3,[-39],[[2,0,-38,[28],29]],[0,"d35sbDP3tDuJam5FEOL8ce",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[49,"lblBanner",12,[[57,"SẴN SÀNG",70,false,1,1,-40,[26],27],[25,"READY","SẴN SÀNG",-41]],[0,"26Wr5+Zq5DVaIEN6nTQYs1",1],[4,4282143844],[5,284.38,88.2]],[20,"ForeGround_Left",4,[[3,-42,[0],1]],[0,"fbvj4mrJ1EwrinTfcILo6r",1],[5,183,1080],[0,0,0.5],[-960,0,0,0,0,0,1,1,1,1]],[1,"Logo",4,[[3,-43,[2],3]],[0,"fbSvHRWdhKK7q6S7GKJwIK",1],[5,181,43],[-880,510,0,0,0,0,1,0.6666667,0.6666667,1]],[20,"rank",6,[[3,-44,[6],7]],[0,"1ahYJInbVJ7Z9F6GDzSExJ",1],[5,95,86],[0,0,0.5],[0,50,0,0,0,0,1,1,1,1]],[20,"rank",7,[[3,-45,[10],11]],[0,"2711A+melPx4KQ76fE8JHD",1],[5,95,86],[0,0,0.5],[0,50,0,0,0,0,1,1,1,1]],[20,"rank",8,[[3,-46,[14],15]],[0,"ce0GtvVXZCEZ6ZwFP4GDKR",1],[5,95,86],[0,0,0.5],[0,50,0,0,0,0,1,1,1,1]],[31,"bg",150,2,[[2,0,-47,[18],19]],[0,"73adhzL+BPzJ2aIPDsRXUC",1],[4,4278190080],[5,1920,1080]],[34,"lblTimer",2,[-48],[0,"b79U3RKD9JcK/EGrhQ/rgN",1],[5,118.14,150],[0,175,0,0,0,0,1,1,1,1]],[37,"5",150,150,false,1,1,2,20,[25]],[1,"Char1_Animation",3,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-49,[30],31]],[0,"9fp1pBr/pGGry/Ez176zEM",1],[5,335,305],[-195.698,-75,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",3,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-50,[32],33]],[0,"79Sy4jaDZNHaIUSGyvgEHp",1],[5,313.89,345.29],[200,-75,0,0,0,0,1,0.5,0.5,1]]],0,[0,4,1,0,48,21,0,49,2,0,-1,6,0,-2,7,0,-3,8,0,50,9,0,0,1,0,-1,4,0,-2,9,0,-3,5,0,-4,2,0,-1,19,0,-2,10,0,-3,20,0,-4,3,0,0,3,0,-1,12,0,-2,22,0,-3,23,0,0,4,0,-1,14,0,-2,15,0,-1,6,0,-2,7,0,-3,8,0,0,6,0,-1,16,0,0,7,0,-1,17,0,0,8,0,-1,18,0,0,9,0,0,10,0,-1,11,0,0,11,0,0,11,0,0,12,0,-1,13,0,0,13,0,0,13,0,0,14,0,0,15,0,0,16,0,0,17,0,0,18,0,0,19,0,-1,21,0,0,22,0,0,23,0,5,1,50],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21],[-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,7,8,-1,-1,-1,3,-1,1,-1,6,-1,6,-1,1,51,-1,-2,-3,52,53,-1,-2,-3,-1,-2,-3,-1,-2,-3,-4,-1,-2,-3,-4,-5,-1,-2,-3,-4,-5,-6,3],[0,86,0,41,0,87,0,42,0,88,0,43,0,89,0,44,0,90,0,9,0,45,45,91,0,0,0,2,0,9,4,15,4,16,0,17,92,42,43,44,0,18,31,93,94,21,95,96,30,97,98,99,100,101,102,103,104,105,106,107,108,109,110,2]],[[[60,"atom",".plist"],-1],0,0,[0],[54],[111]],[[{"name":"3rd","rect":[487,810,95,86],"offset":[0,-0.5],"originalSize":[95,87],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"UIs"],[50,"UIs",[[141,-2],[11,45,-3]],[0,"08FG1uPSBHM47a4lQxL1jy",-1],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,0,1,0,0,1,0,5,1,3],[],[],[]],[[{"name":"loading_icon","rect":[3,3,133,133],"offset":[0,0],"originalSize":[137,137],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[[5,"StageGameEnd"],[15,"StageGameEnd",[-13,-14,-15,-16,-17],[[142,-9,-8,-7,[-4,-5,-6],-3,-2],[41,2,-12,[[23,6,[[24,"d0df7MrCDxIOqiQAqLISxA9","nextStage",-10]]],[23,7,[[24,"d0df7MrCDxIOqiQAqLISxA9","previousStage",-11]]]]]],[13,-1],[5,960,540]],[48,"endGameSingle",1,[-19,-20,-21,-22,-23,-24,-25],[[2,2,-18,[94],95]],[0,"eal5PfYl9DpZbR9e+qMG4x",1],[5,274,419],[0,0.5,0],[0,-138.75,0,0,0,0,1,0.5,0.5,0.5]],[32,"1",[-27,-28,-29,-30,-31,-32],[[2,2,-26,[38],39]],[0,"40bAKJTeJFYZmyen704fEF",1],[5,274,419],[0,0.5,0],[0,-185,0,0,0,0,1,0.66667,0.66667,0.66667]],[32,"2",[-34,-35,-36,-37,-38,-39],[[2,2,-33,[54],55]],[0,"17kEs41c1GpY9Zu5zRfbcr",1],[5,274,419],[0,0.5,0],[-250,-185,0,0,0,0,1,0.66667,0.66667,0.66667]],[32,"3",[-41,-42,-43,-44,-45,-46],[[2,2,-40,[70],71]],[0,"b49SMYzyRIP6cZjC6ATtUq",1],[5,274,419],[0,0.5,0],[250,-185,0,0,0,0,1,0.66667,0.66667,0.66667]],[4,"bg",1,[-48,-49,-50],[[2,0,-47,[14],15]],[0,"1eXFkg9x5APJd3K+Xfy8h2",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[4,"banner",6,[-52,-53,-54],[[3,-51,[12],13]],[0,"e8Tf0k0jhLDJiwK5jYyWCS",1],[5,360,107],[0,250,0,0,0,0,1,1,1,1]],[33,"btnPlay",1,[[[36,1,2,-55,[16],17],[6,-56,18,19],-57,[137,2,6,-58]],4,4,1,4],[0,"bbH9Zj5XNBr7XxGIUsfhzA",1],[5,327,153],[112.5,-206.25,0,0,0,0,1,0.5,0.5,0.5]],[28,"endGameMulti",false,1,[3,4,5],[0,"31FRQPDf5IZ5UZ5qGR8Yy9",1],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[33,"btnBack",1,[[[36,1,2,-59,[20],21],-60,[6,-61,22,23]],4,1,4],[0,"a9Q82HRuZAYIlS7yS79uUJ",1],[5,327,153],[-112.5,-206.25,0,0,0,0,1,0.5,0.5,0.5]],[4,"Score_bar",2,[-63,-64],[[3,-62,[76],77]],[0,"947x1eudBEib4T1rX/nLzG",1],[5,244,79],[0,50,0,0,0,0,1,0.6666667,0.6666667,1]],[4,"Score_bar copy",2,[-66,-67],[[3,-65,[82],83]],[0,"88+XsZyvJAzrMyTG3nXrt1",1],[5,244,79],[0,145,0,0,0,0,1,0.6666667,0.6666667,1]],[21,"bg",7,[-69],[[2,0,-68,[6],7]],[0,"54d/w7Jf9JaILmmekQqCrG",1],[4,4286889172],[5,280,80],[-3,0,0,0,0,0,1,1,1,1]],[49,"lblBanner",13,[[57,"KẾT QUẢ",70,false,1,1,-70,[4],5],[25,"RESULT","KẾT QUẢ",-71]],[0,"2bJpnHRNtO24oIGRmp+WKF",1],[4,4282143844],[5,243.67,88.2]],[4,"Score_bar",3,[-73],[[3,-72,[26],27]],[0,"f2SD52xipBzpAfpFZOqeWb",1],[5,244,79],[0,50,0,0,0,0,1,1,1,1]],[4,"Score_bar",4,[-75],[[3,-74,[42],43]],[0,"e24+DBFgpM3bzsnthqxohq",1],[5,244,79],[0,50,0,0,0,0,1,1,1,1]],[4,"Score_bar",5,[-77],[[3,-76,[58],59]],[0,"f9e+qi0ipOL4CUhDY+hr/4",1],[5,244,79],[0,50,0,0,0,0,1,1,1,1]],[1,"scoreLabel",11,[[58,"Kỷ lục",30,false,1,1,1,-78,[74],75],[25,"Record","Kỷ lục",-79]],[0,"37GBEfcXFG3JN5g0kjw/Yi",1],[5,127.57,50.4],[0,60,0,0,0,0,1,1,1,1]],[1,"scoreLabel",12,[[58,"Điểm",30,false,1,1,1,-80,[80],81],[25,"Point","Điểm",-81]],[0,"e8qWVQrb9EOaO1AtZW24LM",1],[5,102.74,50.4],[0,60,0,0,0,0,1,1,1,1]],[1,"player",2,[[38,"Người chơi 1",25,25,false,1,1,2,-82,[92],93],[25,"Player 1","Người chơi 1",-83]],[0,"8ai1nIJY9E2pv1/5EA45py",1],[5,205.22,25],[0,280,0,0,0,0,1,1,1,1]],[1,"LOGO_ELOFUN",6,[[3,-84,[0],1]],[0,"9cvQzqWl5JwYViO7vz5GZ1",1],[5,140,34],[-550,325,0,0,0,0,1,1,1,1]],[1,"ef",6,[[2,2,-85,[2],3]],[0,"10qorLKZBDmYwQgYvcT9YG",1],[5,1274,586],[50,50,0,0,0,0,1,0.8,0.8,0.8]],[1,"Char1_Animation",7,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-86,[8],9]],[0,"8eSew4KzVFxpIdAs3Z498i",1],[5,335,305],[-195.698,-75,0,0,0,0,1,0.5,0.5,1]],[1,"Char2_Animation",7,[[7,"default","Idle_Animation",0,false,"Idle_Animation",-87,[10],11]],[0,"b5odWJOyRAmLf76qUt6aha",1],[5,313.89,345.29],[200,-75,0,0,0,0,1,0.5,0.5,1]],[40,true,8],[40,true,10],[1,"Item",15,[[3,-88,[24],25]],[0,"3eV5FzYq5MNYeBsHurZ/oO",1],[5,49,59],[-75,0,0,0,0,0,1,1,1,1]],[1,"Khung_1st",3,[[3,-89,[28],29]],[0,"52zd6a8q5G7amzFsW9SRuX",1],[5,311,344],[0,385,0,0,0,0,1,1,1,1]],[1,"1st",3,[[3,-90,[30],31]],[0,"5dS04h33FAt7CHKH5kesC8",1],[5,124,94],[0,150,0,0,0,0,1,1,1,1]],[1,"lblScore",3,[[18,"2000",35,35,false,1,1,-91,[32],33]],[0,"14H/YaS1NJV4RypL9Io1Jf",1],[5,129.235,44.1],[35,45,0,0,0,0,1,1,1,1]],[1,"playerSprite",3,[[7,"Char1","Fly_Animation",0,false,"Fly_Animation",-92,[34],35]],[0,"015ARaoZlPRqAa79iQRUjD",1],[5,691,453],[0,300,0,0,0,0,1,1,1,1]],[1,"player",3,[[18,"Người chơi 1",25,25,false,1,1,-93,[36],37]],[0,"c40ygxiPlEQKVLruIN2dtA",1],[5,205.21,31.5],[0,280,0,0,0,0,1,1,1,1]],[1,"Item",16,[[3,-94,[40],41]],[0,"7cD6/K2hFKTb3kjhk1ptf5",1],[5,49,59],[-75,0,0,0,0,0,1,1,1,1]],[1,"Khung_2nd",4,[[3,-95,[44],45]],[0,"97Hz/1Vx9JZ4+PlSvW4FCE",1],[5,255,280],[0,350,0,0,0,0,1,1,1,1]],[1,"2nd",4,[[3,-96,[46],47]],[0,"9du1MYcDtMBJnLJj1FtdPw",1],[5,98,76],[0,150,0,0,0,0,1,1,1,1]],[1,"lblScore",4,[[18,"2000",35,35,false,1,1,-97,[48],49]],[0,"9aGXxKjEJM1rtK6ywviy8I",1],[5,129.235,44.1],[35,45,0,0,0,0,1,1,1,1]],[1,"player",4,[[18,"Người chơi 1",20,20,false,1,1,-98,[50],51]],[0,"cbcOfgMANOWrdygFxyaprQ",1],[5,164.17,25.2],[0,270,0,0,0,0,1,1,1,1]],[1,"playerSprite",4,[[7,"Char2","Fly_Animation",0,false,"Fly_Animation",-99,[52],53]],[0,"27eCJQLZBMTLE1Y+YiesU8",1],[5,691,453],[0,285,0,0,0,0,1,0.75,0.75,1]],[1,"Item",17,[[3,-100,[56],57]],[0,"08SADnlyFPeb4+8o2InF7f",1],[5,49,59],[-75,0,0,0,0,0,1,1,1,1]],[1,"Khung_3rd",5,[[3,-101,[60],61]],[0,"bcu/ABKEhNBrPPpMEJIXVo",1],[5,254,280],[0,350,0,0,0,0,1,1,1,1]],[1,"3rd",5,[[3,-102,[62],63]],[0,"56QklGyKtE1aRzR5rh8hMq",1],[5,88,67],[0,150,0,0,0,0,1,1,1,1]],[1,"lblScore",5,[[18,"2000",35,35,false,1,1,-103,[64],65]],[0,"01udCm33tCQb1r/r/+4mrw",1],[5,129.235,44.1],[35,45,0,0,0,0,1,1,1,1]],[1,"player",5,[[18,"Người chơi 1",25,25,false,1,1,-104,[66],67]],[0,"9fm6PblfNPxrVIzKpUCS7/",1],[5,205.21,31.5],[0,270,0,0,0,0,1,1,1,1]],[1,"playerSprite",5,[[7,"Char3","Fly_Animation",0,false,"Fly_Animation",-105,[68],69]],[0,"c4QKBLFrBLDJqHUEuQSoT/",1],[5,691,453],[0,285,0,0,0,0,1,0.75,0.75,1]],[1,"Item",11,[[3,-106,[72],73]],[0,"2ev+fJMGVHW6ySUmlI8fdE",1],[5,49,59],[-85,0,0,0,0,0,1,1,1,1]],[1,"Item",12,[[3,-107,[78],79]],[0,"429lwjfmxLjpCkgmMIc3Ge",1],[5,49,59],[-85,0,0,0,0,0,1,1,1,1]],[1,"Khung_1st",2,[[3,-108,[84],85]],[0,"70tqwBmthGe4QL+NrWha+Z",1],[5,311,344],[0,385,0,0,0,0,1,1,1,1]],[1,"lblScore",2,[[38,"2000",28,35,false,1,1,2,-109,[86],87]],[0,"76LOoIbfxA47FDtkXXr0uY",1],[5,103.38,35],[20,142.5,0,0,0,0,1,1,1,1]],[1,"lblHighScore",2,[[38,"2000",28,35,false,1,1,2,-110,[88],89]],[0,"e8arnK1N5IDYyBs3iwCUM2",1],[5,103.38,35],[20,47.5,0,0,0,0,1,1,1,1]],[1,"playerSprite",2,[[7,"Char3","Fly_Animation",0,false,"Fly_Animation",-111,[90],91]],[0,"1c+N2+aPpJfLk2X+s0y8RK",1],[5,691,453],[0,285,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,55,2,0,56,9,0,-1,3,0,-2,4,0,-3,5,0,57,26,0,58,25,0,0,1,0,10,1,0,10,1,0,0,1,0,-1,6,0,-2,8,0,-3,10,0,-4,9,0,-5,2,0,0,2,0,-1,11,0,-2,12,0,-3,47,0,-4,48,0,-5,49,0,-6,50,0,-7,20,0,0,3,0,-1,15,0,-2,28,0,-3,29,0,-4,30,0,-5,31,0,-6,32,0,0,4,0,-1,16,0,-2,34,0,-3,35,0,-4,36,0,-5,37,0,-6,38,0,0,5,0,-1,17,0,-2,40,0,-3,41,0,-4,42,0,-5,43,0,-6,44,0,0,6,0,-1,21,0,-2,22,0,-3,7,0,0,7,0,-1,13,0,-2,23,0,-3,24,0,0,8,0,0,8,0,-3,25,0,0,8,0,0,10,0,-2,26,0,0,10,0,0,11,0,-1,45,0,-2,18,0,0,12,0,-1,46,0,-2,19,0,0,13,0,-1,14,0,0,14,0,0,14,0,0,15,0,-1,27,0,0,16,0,-1,33,0,0,17,0,-1,39,0,0,18,0,0,18,0,0,19,0,0,19,0,0,20,0,0,20,0,0,21,0,0,22,0,0,23,0,0,24,0,0,27,0,0,28,0,0,29,0,0,30,0,0,31,0,0,32,0,0,33,0,0,34,0,0,35,0,0,36,0,0,37,0,0,38,0,0,39,0,0,40,0,0,41,0,0,42,0,0,43,0,0,44,0,0,45,0,0,46,0,0,47,0,0,48,0,0,49,0,0,50,0,5,1,3,9,9,4,9,9,5,9,9,111],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,26,26],[-1,1,-1,1,-1,3,-1,1,-1,6,-1,6,-1,1,-1,1,-1,1,7,8,-1,1,7,8,-1,1,-1,1,-1,1,-1,1,-1,3,-1,6,-1,3,-1,1,-1,1,-1,1,-1,1,-1,1,-1,3,-1,3,-1,6,-1,1,-1,1,-1,1,-1,1,-1,1,-1,3,-1,3,-1,6,-1,1,-1,1,-1,3,-1,1,-1,1,-1,3,-1,1,-1,1,-1,3,-1,3,-1,6,-1,3,-1,1,12,13,12,13],[0,33,0,112,0,2,0,9,4,15,4,16,0,17,0,34,0,46,113,46,0,47,114,47,0,13,0,14,0,48,0,115,0,2,4,8,0,2,0,19,0,13,0,14,0,116,0,117,0,2,0,2,4,8,0,19,0,13,0,14,0,118,0,119,0,2,0,2,4,8,0,19,0,13,0,2,0,14,0,13,0,2,0,14,0,48,0,2,0,2,4,8,0,2,0,19,0,18,0,18]],[[{"name":"Logo","rect":[187,975,181,43],"offset":[0,0],"originalSize":[181,43],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Char3","rect":[268,798,108,108],"offset":[0,0],"originalSize":[108,108],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Waiting","rect":[3,948,154,32],"offset":[0,0],"originalSize":[154,32],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Txt_RoomCode","rect":[3,3,630,320],"offset":[0,0],"originalSize":[630,320],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[11]],[[[5,"Loading Cover"],[29,"Loading Cover",[-5],[[11,45,-2],[143,-4,-3]],[0,"425RuVPuxFxa/9Mfr5Anzl",-1],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]],[30,"Container",1,[-7,-8],[[11,45,-6]],[0,"e3chFbfklMNo9XIuGirfSv",1],[5,1280,720]],[12,"BG",2,[[11,45,-9],[59,-11,-10]],[0,"1bSRbLWIVFkYlMhX8u9/gj",1],[5,1280,720]],[12,"loading_icon",2,[[3,-12,[0],1],[42,-13]],[0,"5be+Z0kCpDO4RcS/0KM7Cq",1],[5,133,133]]],0,[0,4,1,0,0,1,0,59,2,0,0,1,0,-1,2,0,0,2,0,-1,3,0,-2,4,0,0,3,0,16,3,0,0,3,0,0,4,0,0,4,0,5,1,13],[0,0],[-1,1],[0,22]],[[[14,"Buttons",".mp3",0.10449],-1],0,0,[],[],[]],[[{"name":"Char02","rect":[3,616,154,96],"offset":[0,0],"originalSize":[154,96],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[5,"StageStartGame"],[15,"StageStartGame",[-4,-5,-6,-7],[[144,-3,-2]],[13,-1],[5,960,540]],[1,"Start_BTN",1,[[3,-8,[2],3],[6,-9,4,5]],[0,"d7cktjsiZC3pUICsHO/NL2",1],[5,581,330],[0,-56.25,0,0,0,0,1,0.5,0.5,0.5]],[1,"GameName",1,[[3,-10,[6],7],[6,-11,8,9]],[0,"aaXk13LjFOxZlY/NedeN/b",1],[5,207,141],[-375,187.5,0,0,0,0,1,0.5,0.5,0.75]],[1,"bg",1,[[2,0,-12,[0],1]],[0,"dcc4JAiqpB9bI/b4OqRF+/",1],[5,1280,720],[0,0,0,0,0,0,1,0.75,0.75,0.75]],[1,"Logo",1,[[3,-13,[10],11]],[0,"84tSHCADdB2Ks/89p6mvRZ",1],[5,181,43],[0,251.25,0,0,0,0,1,0.5,0.5,0.5]]],0,[0,4,1,0,60,2,0,0,1,0,-1,4,0,-2,2,0,-3,3,0,-4,5,0,0,2,0,0,2,0,0,3,0,0,3,0,0,4,0,0,5,0,5,1,13],[0,0,0,0,0,0,0,0,0,0,0,0],[-1,1,-1,1,7,8,-1,1,7,8,-1,1],[0,120,0,49,121,49,0,24,23,24,0,41]],[[[5,"Localization"],[16,"Localization",[[145,-2]],[35,"222jEG7UlOFL6oRdKJB1xV",-1,0]]],0,[0,4,1,0,0,1,0,5,1,2],[],[],[]],[[[146,"game",null],[79,"Canvas","1ejC82zbNJkaSuMcrSgbBo",[-4],[[147,-1,[5,960,540]],[11,45,-2],[148,-3,[0,1,2,3,4,5],[6,7,8,9,10]]],[5,960,540],[480,270,0,0,0,0,1,1,1,1]],[149,"New Node",false,true,[1],[0,0,0],[0,0,0,0,0,0,1,1,1,1]],[80,"Main Camera",1,[[150,7,-1,-5]],[0,0,231.22878281044513,0,0,0,1,1,1,1]]],0,[0,0,1,0,0,1,0,0,1,0,-1,3,0,0,3,0,61,2,1,9,2,5],[0,0,0,0,0,0,0,0,0,0,0],[-1,-2,-3,-4,-5,-6,-1,-2,-3,-4,-5],[122,123,124,125,126,127,128,129,130,131,132]],[[{"name":"BG_WaitingRoom_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[133]],[[{"name":"Khung_Character","rect":[778,648,234,333],"offset":[0,0],"originalSize":[234,333],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Txt_RoomCode","rect":[658,3,639,320],"offset":[0,0],"originalSize":[639,320],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Đang chờ..","rect":[3,987,178,33],"offset":[0.5,0],"originalSize":[179,33],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Tree3","rect":[3,718,99,150],"offset":[0,0],"originalSize":[99,150],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[[151,"SVN-Supercell-Magic","SVN-Supercell-Magic.ttf"],-1],0,0,[],[],[]],[[{"name":"Bone","rect":[163,617,119,69],"offset":[0,0],"originalSize":[119,69],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Char2","rect":[268,912,108,108],"offset":[0,0],"originalSize":[108,108],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"3rd","rect":[536,948,88,67],"offset":[0.5,0],"originalSize":[89,67],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[[5,"FrameMgr"],[16,"FrameMgr",[[152,-2]],[0,"27y5kv10JGtp43T01mWJ02",-1]]],0,[0,4,1,0,0,1,0,5,1,2],[],[],[]],[[{"name":"Người chơi 3","rect":[984,3,194,33],"offset":[0,0],"originalSize":[194,33],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[3]],[[{"name":"Home","rect":[216,3,327,153],"offset":[0,0],"originalSize":[327,153],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[{"name":"Tree2","rect":[403,600,99,150],"offset":[0,0],"originalSize":[99,150],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Map1","rect":[0,0,603,1080],"offset":[0,0],"originalSize":[603,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[134]],[[[5,"Events"],[16,"Events",[[153,-2]],[35,"e8+0wKfOVO6pSF3cLWwNah",-1,0]]],0,[0,4,1,0,0,1,0,5,1,2],[],[],[]],[[{"name":"ZigZac_Scan_TV","rect":[0,0,1920,1080],"offset":[0,0],"originalSize":[1920,1080],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[135]],[[[5,"PopupManager"],[29,"PopupManager",[-7,-8,-9],[[11,45,-2],[154,-6,-5,-4,-3]],[0,"e6NYRDQ8tMDI2YBs4wI67s",-1],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]],[81,"Popup Bg",false,180,1,[[2,0,-10,[0],1],[122,45,2,2,-11]],[0,"22r0HsLvROCrF3tNiNzX5g",1],[4,4278190080],[5,1280,720.0000000000001],[0,0,0,0,0,0,1,1,0.9999999999999999,1]],[12,"Shown Popups",1,[[11,45,-12]],[0,"c3CnAi//VPh47kwQ+eb9pd",1],[5,1280,720]],[82,"Popup Container",false,1,[0,"11j0ZlJulMTKrsoJG/QIXx",1]]],0,[0,4,1,0,0,1,0,62,3,0,63,4,0,64,2,0,0,1,0,-1,4,0,-2,2,0,-3,3,0,0,2,0,0,2,0,0,3,0,5,1,12],[0,0],[-1,1],[0,7]],[[[5,"Stages"],[50,"Stages",[[155,-2,[0,1,2,3,4,5]],[11,45,-3]],[13,-1],[5,960,540],[480,270,0,0,0,0,1,1,1,1]]],0,[0,4,1,0,0,1,0,0,1,0,5,1,3],[0,0,0,0,0,0],[-1,-2,-3,-4,-5,-6],[136,137,138,139,140,141]],[[{"name":"GameName","rect":[3,142,207,141],"offset":[0,0],"originalSize":[209,141],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]],[[[14,"Select",".mp3",0.2165],-1],0,0,[],[],[]],[[{"name":"Thorn","rect":[159,742,122,73],"offset":[-1.5,-4.5],"originalSize":[125,82],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Glow","rect":[3,292,466,465],"offset":[36.5,-3.5],"originalSize":[549,484],"rotated":1,"capInsets":[0,0,0,0]}],[0],0,[0],[2],[5]],[[{"name":"Flare","rect":[1,1,29,29],"offset":[-0.5,0.5],"originalSize":[32,32],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[142]],[[[14,"SFX_Endscreen",".mp3",3.604898],-1],0,0,[],[],[]],[[{"name":"road","rect":[245,3,236,236],"offset":[0,0],"originalSize":[236,236],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[1]],[[{"name":"Noidung_Guide","rect":[0,0,1155,738],"offset":[0,0],"originalSize":[1155,738],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[143]],[[{"name":"Home","rect":[3,336,327,153],"offset":[0,0],"originalSize":[327,153],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[12]]]] \ No newline at end of file diff --git a/assets/main/import/0a/0acdfccb6.c6724.json b/assets/main/import/0a/0ac8b346f.57d7f.json similarity index 55% rename from assets/main/import/0a/0acdfccb6.c6724.json rename to assets/main/import/0a/0ac8b346f.57d7f.json index be4efd4..ac65615 100644 --- a/assets/main/import/0a/0acdfccb6.c6724.json +++ b/assets/main/import/0a/0ac8b346f.57d7f.json @@ -1 +1 @@ -{"type":"cc.Texture2D","data":"0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|1,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,1,0,0|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|1,9729,9729,33071,33071,0,0,1|1,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"} \ No newline at end of file +{"type":"cc.Texture2D","data":"0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|1,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|1,9729,9729,33071,33071,0,0,1|1,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"} \ No newline at end of file diff --git a/assets/main/index.038e3.js b/assets/main/index.038e3.js new file mode 100644 index 0000000..cc0e05d --- /dev/null +++ b/assets/main/index.038e3.js @@ -0,0 +1 @@ +window.__require=function e(t,o,n){function r(a,c){if(!o[a]){if(!t[a]){var s=a.split("/");if(s=s[s.length-1],!t[s]){var l="function"==typeof __require&&__require;if(!c&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+a+"'")}a=s}var p=o[a]={exports:{}};t[a][0].call(p.exports,function(e){return r(t[a][1][e]||e)},p,p.exports,e,t,o,n)}return o[a].exports}for(var i="function"==typeof __require&&__require,a=0;a=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0}),o.Audios=void 0;var a,c=e("./utils/SingletonNode"),s=cc._decorator,l=s.ccclass,p=s.property;(function(e){e[e.Booster=0]="Booster",e[e.BtnClick=1]="BtnClick",e[e.MCDie=2]="MCDie",e[e.EnemiesComing=3]="EnemiesComing",e[e.EnemyDie=4]="EnemyDie",e[e.FreezeSkill=5]="FreezeSkill",e[e.GameOver=6]="GameOver",e[e.GamePlayLoop=7]="GamePlayLoop",e[e.HomeLoop=8]="HomeLoop",e[e.InvisibleSkill=9]="InvisibleSkill",e[e.Jump=10]="Jump",e[e.MCHit=11]="MCHit",e[e.RageSkill=12]="RageSkill",e[e.Roarr=13]="Roarr",e[e.SlowSkill=14]="SlowSkill",e[e.SwipeOnEnemy=15]="SwipeOnEnemy",e[e.WaterComming=16]="WaterComming"})(a=o.Audios||(o.Audios={}));var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.AudioList=[],t.volume=1,t}return r(t,e),t.prototype.onLoad=function(){e.prototype.onLoad.call(this)},t.prototype.start=function(){},t.prototype.playAudioEffect=function(e,t){void 0===t&&(t=!1);var o=this.AudioList[e];return cc.audioEngine.playEffect(o,t)},t.prototype.stopAudioEffect=function(e){cc.audioEngine.stopEffect(e)},t.prototype.stopAllAudioEffect=function(){cc.audioEngine.stopAllEffects()},t.prototype.playButtonSound=function(){this.playAudioEffect(a.BtnClick)},t.prototype.setMute=function(){1==this.volume?(this.volume=0,cc.audioEngine.setEffectsVolume(0)):(this.volume=1,cc.audioEngine.setEffectsVolume(1))},i([p(cc.AudioClip)],t.prototype,"AudioList",void 0),i([l],t)}(c.default());o.default=u,cc._RF.pop()},{"./utils/SingletonNode":"SingletonNode"}],BallPhysics:[function(e,t,o){"use strict";cc._RF.push(t,"7c355CUI69PM6g7uROFEL0+","BallPhysics");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../GamePlayManager"),c=e("../Particle/ParticleManager"),s=cc._decorator,l=s.ccclass,p=(s.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.onBeginContact=function(e){a.default.Instance.timeNeedToTouch.Touching(),c.default.Instance.SpawnThing(e.getWorldManifold().points[0],c.default.Instance._particleName.TouchWallParticle)},i([l],t)}(cc.Component));o.default=p,cc._RF.pop()},{"../GamePlayManager":"GamePlayManager","../Particle/ParticleManager":"ParticleManager"}],Ball:[function(e,t,o){"use strict";cc._RF.push(t,"ad4efPsBOtAZqP0kazbwXDn","Ball");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./TrajectoryLine/TrajectoryLine"),c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rigidBody=null,t.trajectoryLineDir=new cc.Vec2(0,1),t.SFX=null,t.ball=null,t.trajectoryLine=null,t.moveSpeed=0,t.isBallMoving=!1,t.mouseHold=!1,t}var o;return r(t,e),o=t,t.prototype.onEnable=function(){o.Instance=this,this.rigidBody=this.ball.getComponent(cc.RigidBody),this.rigidBody.gravityScale=0,cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyPress,this),cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyPressEnter,this)},t.prototype.start=function(){this.trajectoryLine.drawCircle(this.ball.getPosition(),this.trajectoryLineDir,100)},t.prototype.SetDirOfBall=function(e){var t=e.sub(this.ball.getPosition()).normalize().mul(this.moveSpeed);this.rigidBody.linearVelocity=t},t.prototype.onKeyPress=function(e){if(0!=this.node.active)switch(e.keyCode){case cc.macro.KEY.d:if(1==this.isBallMoving)return;this.RotateTrajectoryLine(1);break;case 39:if(1==this.isBallMoving)return;this.RotateTrajectoryLine(-1)}},t.prototype.onKeyPressEnter=function(e){if(0!=this.node.active)switch(e.keyCode){case 13:if(1==this.isBallMoving)return;this.SetDirOfBall(this.trajectoryLineDir),this.trajectoryLine.graphics.clear(),this.isBallMoving=!0}},t.prototype.RotateTrajectoryLine=function(e){this.trajectoryLineDir=this.trajectoryLineDir.rotate(.034906*e),this.trajectoryLine.graphics.clear(),this.trajectoryLine.drawCircle(this.ball.getPosition(),this.trajectoryLineDir,100)},t.prototype.Reset=function(){this.rigidBody.linearVelocity=cc.Vec2.ZERO,this.isBallMoving=!1,this.trajectoryLineDir=new cc.Vec2(0,1),this.ball.setPosition(0,0)},t.prototype.update=function(){},t.Instance=null,i([l(cc.Node)],t.prototype,"SFX",void 0),i([l(cc.Node)],t.prototype,"ball",void 0),i([l(a.default)],t.prototype,"trajectoryLine",void 0),i([l(Number)],t.prototype,"moveSpeed",void 0),o=i([s],t)}(cc.Component);o.default=p,cc._RF.pop()},{"./TrajectoryLine/TrajectoryLine":"TrajectoryLine"}],Events:[function(e,t,o){"use strict";cc._RF.push(t,"ea18dqOuq1Cx7O+U51FB9JD","Events");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},a=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.winWall=null,t}return r(t,e),t.prototype.FadeWall=function(){cc.tween(this.node).to(.3,{scale:0},{easing:"fade"}).start()},t.prototype.Reset=function(){console.log("RESET FADE WALL"),this.node.scale=1},i([s(cc.Node)],t.prototype,"winWall",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],FrameMgr:[function(e,t,o){"use strict";cc._RF.push(t,"2af42k1WypJMIZ/nsc3uFll","FrameMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../utils/SingletonNode"),c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameHouse=[],t.frameBuilding=[],t}return r(t,e),i([l(cc.SpriteFrame)],t.prototype,"frameHouse",void 0),i([l(cc.SpriteFrame)],t.prototype,"frameBuilding",void 0),i([s],t)}(a.default());o.default=p,cc._RF.pop()},{"../utils/SingletonNode":"SingletonNode"}],GameDefine:[function(e,t,o){"use strict";cc._RF.push(t,"0722aPCpZtLXYBO1CTGdGFr","GameDefine"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=new function(){this.DiamondScore=2,this.PlayTime=300,this.player="VI"==window.language.toUpperCase()?"Ng\u01b0\u1eddi ch\u01a1i":"Player",this.died="VI"==window.language.toUpperCase()?"\u0111\xe3 ch\u1ebft.":"has died.",this.gameover="VI"==window.language.toUpperCase()?"K\u1ebeT TH\xdaC":"GAMEOVER",this.disconnect="VI"==window.language.toUpperCase()?"M\u1ea4T K\u1ebeT N\u1ed0I":"LOST CONNECTION",this.hasdisconnect="VI"==window.language.toUpperCase()?"\u0111\xe3 m\u1ea5t k\u1ebft n\u1ed1i.":"has been disconnected.",this.hosting="VI"==window.language.toUpperCase()?"s\u1ebd tr\u1edf th\xe0nh ch\u1ee7 ph\xf2ng.":"is now hosting."},cc._RF.pop()},{}],GameManager:[function(e,t,o){"use strict";cc._RF.push(t,"4e4edq/h0FGmYOarVkTPs/6","GameManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../AudioController"),c=e("../utils/SingletonNode"),s=cc._decorator,l=s.ccclass,p=(s.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.STATE={TUTORIAL:0,INGAME:1,GAMEOVER:2},t.state=0,t.isPause=!1,t}return r(t,e),t.prototype.start=function(){},t.prototype.startGame=function(){},t.prototype.endGame=function(){},t.prototype.setMute=function(){a.default.Instance.setMute()},t.prototype.onGamePause=function(){this.isPause=!0},t.prototype.onGameResume=function(){this.isPause=!1},t.prototype.IsPause=function(){return this.isPause},i([l],t)}(c.default()));o.default=p,cc._RF.pop()},{"../AudioController":"AudioController","../utils/SingletonNode":"SingletonNode"}],GameObject:[function(e,t,o){"use strict";cc._RF.push(t,"ac648lWW65FVL6lqaVqOgIb","GameObject");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.load=function(){},t.prototype.kill=function(){this.node.active=!1},i([c],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],GamePlayManager:[function(e,t,o){"use strict";cc._RF.push(t,"1589dfnk4VMIp1dekOxl3G2","GamePlayManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../utils/SingletonNode"),c=e("./FadeWall"),s=e("./LevelManager"),l=e("./TimeNeedTouch"),p=cc._decorator,u=p.ccclass,d=p.property,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeNeedToTouch=null,t.fadeWall=null,t.currentLevel=null,t.isLost=!1,t}return r(t,e),t.prototype.onEnable=function(){cc.director.getPhysicsManager().enabled=!0,cc.director.getCollisionManager().enabled=!0},t.prototype.start=function(){null==this.currentLevel&&(this.currentLevel=0,s.default.Instance.SetUpLevel(this.currentLevel))},t.prototype.Win=function(){1!=this.isLost&&(s.default.Instance.DisableHolder(),s.default.Instance.NextLevel())},t.prototype.Lose=function(){s.default.Instance.DisableHolder(),s.default.Instance.SetUpLevel(this.currentLevel),this.isLost=!1},i([d(l.default)],t.prototype,"timeNeedToTouch",void 0),i([d(c.default)],t.prototype,"fadeWall",void 0),i([u],t)}(a.default());o.default=f,cc._RF.pop()},{"../utils/SingletonNode":"SingletonNode","./FadeWall":"FadeWall","./LevelManager":"LevelManager","./TimeNeedTouch":"TimeNeedTouch"}],GameplayLevelDesgin:[function(e,t,o){"use strict";cc._RF.push(t,"5a58e+A1E5M6oKQXOQxOCtb","GameplayLevelDesgin"),o.__esModule=!0,o.default=void 0,o.default=[{level:1,timeToBounce:1,ballStartPos:{x:300,y:-50},wall:{left:{pos:{x:-480,y:0},size:{w:100,h:1334}},right:{pos:{x:480,y:680},size:{w:100,h:1334}},top:{pos:{x:0,y:270},size:{w:960,h:100}},down:{pos:{x:0,y:-270},size:{w:960,h:100}}},fadeWall:{pos:{x:480,y:-105},size:{w:100,h:230}},obstaclesWall:[{pos:{x:0,y:-120},size:{w:40,h:200},rotation:0}]},{level:2,timeToBounce:1,ballStartPos:{x:300,y:-90},wall:{left:{pos:{x:-480,y:0},size:{w:100,h:1334}},right:{pos:{x:480,y:680},size:{w:100,h:1334}},top:{pos:{x:0,y:270},size:{w:960,h:100}},down:{pos:{x:0,y:-270},size:{w:960,h:100}}},fadeWall:{pos:{x:480,y:-105},size:{w:100,h:230}},obstaclesWall:[{pos:{x:0,y:0},size:{w:40,h:200},rotation:0}]},{level:3,timeToBounce:2,ballStartPos:{x:300,y:-90},wall:{left:{pos:{x:-480,y:0},size:{w:100,h:1334}},right:{pos:{x:480,y:680},size:{w:100,h:1334}},top:{pos:{x:0,y:270},size:{w:960,h:100}},down:{pos:{x:0,y:-270},size:{w:960,h:100}}},fadeWall:{pos:{x:480,y:-105},size:{w:100,h:230}},obstaclesWall:[{pos:{x:0,y:0},size:{w:40,h:100},rotation:90}]}],t.exports=o.default,cc._RF.pop()},{}],Global:[function(e,t,o){"use strict";cc._RF.push(t,"d20a0HD4J5Lx6vX5OXcGy4+","Global");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=(a.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.backAppTime=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.Instance=null,o=i([c],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],Helper:[function(e,t,o){"use strict";cc._RF.push(t,"90a75udUmlJUqYerDKv5BZf","Helper"),Object.defineProperty(o,"__esModule",{value:!0});var n=e("../PeerComponent/PeerManager");o.default=new(function(){function e(){}return e.prototype.Rand=function(e,t){return Math.random()*(t-e)+e},e.prototype.RandInt=function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},e.prototype.RandArgument=function(){for(var e=[],t=0;to.x+o.width||t>o.y+o.height)},e.prototype.Distance=function(e,t,o,n){return Math.sqrt((e-o)*(e-o)+(t-n)*(t-n))},e.prototype.Constrain=function(e,t,o){return e=Math.max(t,e),Math.min(o,e)},e.prototype.ToRadian=function(e){return e/180*Math.PI},e.prototype.ToAngle=function(e){return e/Math.PI*180},e.prototype.TimeoutPromise=function(e,t){var o=new Promise(function(t,o){setTimeout(function(){o("Timed out.")},e)});return Promise.race([t,o])},e.prototype.HttpRequest=function(e,t,o,n,r,i){void 0===r&&(r=null),void 0===i&&(i={});var a=window.logEvent||console.log,c=Date.now(),s=t.split("/").pop().split("?").shift();return new Promise(function(l,p){var u=new XMLHttpRequest;u.open(e,t,!0),"POST"==e&&u.setRequestHeader("Content-Type","application/json");for(var d=0,f=r;du?r%u:r,i=(i=u-(i+=d+a))>u?i%u:i,e.lineWidth=l,e.strokeColor=s,e.arc(t,o,n,r,i,c),p&&(e.lineTo(t,o),e.close()),e.stroke()},e.prototype.DrawCircle=function(e,t,o,n,r,i){void 0===r&&(r=cc.Color.RED),void 0===i&&(i=2),this.DrawEllipse(e,t,o,n,n,r,i)},e.prototype.DrawEllipse=function(e,t,o,n,r,i,a){void 0===i&&(i=cc.Color.RED),void 0===a&&(a=2),e.lineWidth=a,e.strokeColor=i,e.ellipse(t,o,n,r),e.stroke()},e.prototype.FillSquare=function(e,t,o,n,r){void 0===r&&(r=cc.Color.RED),this.FillRect(e,t,o,n,n,r)},e.prototype.FillRect=function(e,t,o,n,r,i){void 0===i&&(i=cc.Color.RED),e.fillColor=i,this.DrawRect(e,t,o,n,r,i,0),e.fill()},e.prototype.FillArc=function(e,t,o,n,r,i,a,c,s){void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),void 0===a&&(a=0),void 0===c&&(c=!0),void 0===s&&(s=cc.Color.RED),e.fillColor=s,this.DrawArc(e,t,o,n,r,i,a,c,void 0,0,!0),e.fill()},e.prototype.FillCircle=function(e,t,o,n,r){void 0===r&&(r=cc.Color.RED),this.FillEllipse(e,t,o,n,n,r)},e.prototype.FillEllipse=function(e,t,o,n,r,i){void 0===i&&(i=cc.Color.RED),e.fillColor=i,this.DrawEllipse(e,t,o,n,r,i,0),e.fill()},e.prototype.getControllerURL=function(){var e=window.controllerURL;if(e&&""!=e)return""+e+n.default.Instance.sip},e}()),cc._RF.pop()},{"../PeerComponent/PeerManager":"PeerManager"}],LevelManager:[function(e,t,o){"use strict";cc._RF.push(t,"250d1eyNKNE8YBb3TY+ZhBo","LevelManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../utils/SingletonNode"),c=e("../gameplay/Level/GameplayLevelDesgin.js"),s=e("./Wall/ObstaclesWallSpawner"),l=e("./TimeNeedTouch"),p=e("./GamePlayManager"),u=e("./Ball"),d=e("./FadeWall"),f=cc._decorator,h=f.ccclass,y=f.property,g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wall=null,t.fadeWallHolder=null,t.timeToBounceHolder=null,t.ballHolder=null,t._levelDesignKey={wall:"wall",ballStartPos:"ballStartPos",fadeWallHolder:"fadeWall",obstaclesWall:"obstaclesWall",timeToBounce:"timeToBounce"},t}return r(t,e),t.prototype.SetUpLevel=function(e){var t=this,o=c[e];if(console.log("levelIndex",e),console.log("currentLevel.level",o.level),this.wall.children.forEach(function(e){var n=t.GetValueByKey(o.wall,e.name);e.setPosition(n.pos.x,n.pos.y),e.width=n.size.w,e.height=n.size.h,e.getComponent(cc.PhysicsBoxCollider).size.height=n.size.h,e.getComponent(cc.PhysicsBoxCollider).size.width=n.size.w}),this.ballHolder.setPosition(o[this._levelDesignKey.ballStartPos].x,o[this._levelDesignKey.ballStartPos].y),this.fadeWallHolder.setPosition(o[this._levelDesignKey.fadeWallHolder].pos.x,o[this._levelDesignKey.fadeWallHolder].pos.y),o[this._levelDesignKey.obstaclesWall].length>0)for(var n=0;n=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=new URLSearchParams(window.location.search);window.language=a.get("language")||"vi",cc.assetManager.force=!0,cc.assetManager.loadBundle(window.language,null,function(e,t){console.log(t)});var c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.SystemPrefabs=[],t.PlaceHolderPrefabs=[],t}return r(t,e),t.prototype.onLoad=function(){for(var e=0;e=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../utils/SingletonNode"),c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.Container=null,t}return r(t,e),t.prototype.onLoad=function(){e.prototype.onLoad.call(this),this.hide()},t.prototype.show=function(){this.Container.active=!0},t.prototype.hide=function(){this.Container.active=!1},i([l(cc.Node)],t.prototype,"Container",void 0),i([s],t)}(a.default());o.default=p,cc._RF.pop()},{"../utils/SingletonNode":"SingletonNode"}],LoadingIcon:[function(e,t,o){"use strict";cc._RF.push(t,"be9ed13DexHaZjgDih502/F","LoadingIcon");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./Spinner"),c=cc._decorator,s=c.ccclass,l=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.show=function(){this.node.active=!0},t.prototype.hide=function(){this.node.active=!1},i([s],t)}(a.default));o.default=l,cc._RF.pop()},{"./Spinner":"Spinner"}],Localization:[function(e,t,o){"use strict";cc._RF.push(t,"bd45doTXaVJGazSbf1+Ekni","Localization");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0}),o.TextTransforms=o.LOCALIZATION_ENUM=o.LOCALIZATION_KEYS=void 0;var a=cc._decorator,c=a.ccclass,s=(a.property,e("../../strings")),l=e("./Events"),p={};o.LOCALIZATION_KEYS=Object.keys(s);for(var u=0;u=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.EN=null,t.VI=null,t}return r(t,e),t.prototype.start=function(){var e=this.node.getComponent(cc.Sprite),t=e.spriteFrame;e.spriteFrame=this[window.language.toUpperCase()]||t},i([s(cc.SpriteFrame)],t.prototype,"EN",void 0),i([s(cc.SpriteFrame)],t.prototype,"VI",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],LocalizedText:[function(e,t,o){"use strict";cc._RF.push(t,"d9adbSs7VdIeaPiYGmWgXvR","LocalizedText");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.EN="",t.VI="",t}return r(t,e),t.prototype.start=function(){var e=this.node.getComponent(cc.Label),t=e.string;e.string=this[window.language.toUpperCase()]||t},i([s({type:String,multiline:!0})],t.prototype,"EN",void 0),i([s({type:String,multiline:!0})],t.prototype,"VI",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],ObjectMgr:[function(e,t,o){"use strict";cc._RF.push(t,"dbc77ws+sxPlY9zPANdJYTf","ObjectMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.load=function(){},t.prototype.init=function(){this.hide()},t.prototype.hide=function(){for(var e=0,t=this.node.children;e=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../Spawn"),c=cc._decorator,s=c.ccclass,l=(c.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._wallPrefabName="wall",t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.ClearHolder=function(){this.holder.children.length<=0||this.holder.removeAllChildren()},t.Instance=null,o=i([s],t)}(a.default));o.default=l,cc._RF.pop()},{"../Spawn":"Spawn"}],ParticleManager:[function(e,t,o){"use strict";cc._RF.push(t,"ab89e3YJghAfZuNvXoYnmFX","ParticleManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../Spawn"),c=cc._decorator,s=c.ccclass,l=(c.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._particleName={TouchWallParticle:"TouchWallParticle"},t}var o;return r(t,e),o=t,t.prototype.start=function(){o.Instance=this},t.Instance=null,o=i([s],t)}(a.default));o.default=l,cc._RF.pop()},{"../Spawn":"Spawn"}],PeerAction:[function(e,t,o){"use strict";cc._RF.push(t,"1c65drFRtpG/LO3xlybZ0cn","PeerAction");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0}),o.PeerType=void 0;var a,c=e("./PeerClientManager"),s=e("./PeerDefine"),l=e("./PeerManager");(function(e){e[e.NONE=0]="NONE",e[e.SEND=1]="SEND",e[e.RECEIVE=2]="RECEIVE"})(a=o.PeerType||(o.PeerType={}));var p=cc._decorator,u=p.ccclass,d=p.property,f=function(){function e(){this.actionName=s.PeerActionType.NONE,this.eventHandler=[],this.customMessage=""}return i([d({type:cc.Enum(s.PeerActionType)})],e.prototype,"actionName",void 0),i([d(cc.Component.EventHandler)],e.prototype,"eventHandler",void 0),i([d()],e.prototype,"customMessage",void 0),i([u("PeerHandler")],e)}(),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.NONE,t.actionPhase=s.PeerPhase.NONE,t.actionHandler=[],t.actionName=s.PeerActionType.NONE,t.eventHandler=[],t.customMessage="",t.playerSIP=null,t}return r(t,e),t.prototype.onLoad=function(){switch(this.type){case a.NONE:break;case a.SEND:this.node.on(cc.Node.EventType.TOUCH_END,this.hanleSubmit.bind(this));break;case a.RECEIVE:return}},t.prototype.hanleSubmit=function(){if(this.node.active){for(var e=0,t=this.eventHandler;e=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./PeerDefine"),c=e("./PeerManager"),s=cc._decorator,l=s.ccclass,p=(s.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.masterSIP=0,t.currentID=0,t.currentMainPlayerID=0,t.isMainPlayer=!1,t.isConnected=!1,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){e.prototype.onLoad.call(this),o.Instance=this;var t=new URLSearchParams(window.location.search);this.masterSIP=parseInt(t.get("sip"))||0,console.log("masterSIP: "+this.masterSIP),delete this.setConnectedCB,delete this.setDisConnectCB,delete this.getClients},t.prototype.setClientConnectedCB=function(e){this.connectedCB=e},t.prototype.setClientDisconnectCB=function(e){this.disconnectCB=e},t.prototype.IsConnected=function(){return this.isConnected},t.prototype.IsMainPlayer=function(){return this.isMainPlayer},t.prototype.update=function(t){e.prototype.update.call(this,t)},t.prototype.init=function(){e.prototype.init.call(this)},t.prototype.connect=function(){var e=this,t=setInterval(function(){if(e.isInitalized){clearInterval(t);var o=cc.sys.localStorage.getItem("masterSIP");if(o&&o==e.masterSIP&&!e.isConnected)return e.reconnect(function(t){switch(cc.sys.localStorage.setItem("localSIP",e.sip),t.currentStage){case a.PeerStage.PLAYING:case a.PeerStage.WAITING:}}),void setTimeout(function(){e.isConnected||(e.disconnectCB&&e.disconnectCB(),e.clientTimeoutPingPong&&clearTimeout(e.clientTimeoutPingPong),e.clientIntervalPing&&clearInterval(e.clientIntervalPing),e.isConnected=!1)},a.default.TIMEOUT_RETRY);cc.sys.localStorage.setItem("localSIP",e.sip),cc.sys.localStorage.setItem("masterSIP",e.masterSIP);var n={phase:a.PeerPhase.CONNECT,action:a.PeerActionConnect.CONNECTING,customParam:""};e.sendMessage(n),setTimeout(function(){e.isConnected||(e.disconnectCB&&e.disconnectCB(),e.clientTimeoutPingPong&&clearTimeout(e.clientTimeoutPingPong),e.clientIntervalPing&&clearInterval(e.clientIntervalPing),e.isConnected=!1)},a.default.TIMEOUT_RETRY)}},1e3)},t.prototype.reconnect=function(e){void 0===e&&(e=null),cc.log("reconnect"),this.reconnectCB=e;var t=0|cc.sys.localStorage.getItem("localSIP"),o={phase:a.PeerPhase.CONNECT,action:a.PeerActionConnect.CONNECT_RETRY,customParam:""+t};this.sendMessage(o)},t.prototype.sendMessage=function(e){this.masterSIP&&this.peer.sendTo(this.masterSIP,JSON.stringify(e))},t.prototype.onRecievedMessage=function(e){var t=JSON.parse(e);if(t.phase!=a.PeerPhase.CONNECT&&console.log(e),t.phase!=a.PeerPhase.CONNECT)c.default.emit(c.default.EventReceivedMessage,t),this.onmessage&&this.onmessage(e);else switch(t.action){case a.PeerActionConnect.CONNECTED:this.isMainPlayer="mainPlayer"==t.customParam,this.isConnected=!0,this.currentID=t.currentID,this.currentMainPlayerID=t.currentMainPlayerID,this.connectedCB&&this.connectedCB(),this.setClientPing(),c.default.emit(c.default.EventSwitchMainPlayer,this.isMainPlayer);break;case a.PeerActionConnect.CONNECT_FAILED:this.isConnected=!1,this.disconnectCB&&this.disconnectCB();break;case a.PeerActionConnect.SWITCH_MAINPLAYER:this.isMainPlayer=this.currentID==t.currentMainPlayerID,this.currentMainPlayerID=t.currentMainPlayerID,c.default.emit(c.default.EventSwitchMainPlayer,this.isMainPlayer);break;case a.PeerActionConnect.PING_PONG:this.clientUpdatePingPong();break;case a.PeerActionConnect.CONNECT_RETRY_SUCCESS:this.isMainPlayer="mainPlayer"==t.customParam,this.isConnected=!0,this.currentID=t.currentID,this.currentMainPlayerID=t.currentMainPlayerID,this.reconnectCB&&this.reconnectCB(t),this.reconnectCB=null,this.setClientPing(),c.default.emit(c.default.EventSwitchMainPlayer,this.isMainPlayer),cc.log("reconnect success")}},t.prototype.setClientPing=function(){var e=this;this.clientIntervalPing=setInterval(function(){var t={action:a.PeerActionConnect.PING_PONG,phase:a.PeerPhase.CONNECT,customParam:"Ping"};e.sendMessage(t)},a.default.PING_TIMER)},t.prototype.clientUpdatePingPong=function(){var e=this;this.clientTimeoutPingPong&&clearTimeout(this.clientTimeoutPingPong),this.clientTimeoutPingPong=setTimeout(function(){e.disconnectCB&&e.disconnectCB(),clearTimeout(e.clientTimeoutPingPong),clearInterval(e.clientIntervalPing),e.isConnected=!1,console.log("disconnect")},a.default.TIMEOUT_DISCONNECT)},t.Instance=null,o=i([l],t)}(c.default));o.default=p,cc._RF.pop()},{"./PeerDefine":"PeerDefine","./PeerManager":"PeerManager"}],PeerDefine:[function(e,t,o){"use strict";cc._RF.push(t,"6d3cf1QRs9NY4n4TNnuAi/J","PeerDefine"),Object.defineProperty(o,"__esModule",{value:!0}),o.PeerActionType=o.PeerActionConnect=o.PeerStage=o.PeerPhase=void 0,o.default=new function(){this.MAX_CLIENT=3,this.TIMEOUT_DISCONNECT=3e3,this.PING_TIMER=1e3,this.TIMEOUT_RETRY=5e3},function(e){e[e.NONE=0]="NONE",e[e.CONNECT=1]="CONNECT",e[e.START_SCREEN=2]="START_SCREEN",e[e.WAITING=3]="WAITING",e[e.SCAN_QR=4]="SCAN_QR",e[e.INGAME=5]="INGAME",e[e.GAMEOVER=6]="GAMEOVER"}(o.PeerPhase||(o.PeerPhase={})),function(e){e[e.PLAYING=0]="PLAYING",e[e.WAITING=1]="WAITING"}(o.PeerStage||(o.PeerStage={})),function(e){e[e.CONNECTING=0]="CONNECTING",e[e.CONNECTED=1]="CONNECTED",e[e.CONNECT_FAILED=2]="CONNECT_FAILED",e[e.CONNECT_RETRY=3]="CONNECT_RETRY",e[e.CONNECT_RETRY_SUCCESS=4]="CONNECT_RETRY_SUCCESS",e[e.SWITCH_MAINPLAYER=5]="SWITCH_MAINPLAYER",e[e.PING_PONG=6]="PING_PONG"}(o.PeerActionConnect||(o.PeerActionConnect={})),function(e){e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e[e.ENTER=5]="ENTER",e[e.NEXT=6]="NEXT",e[e.BACK=7]="BACK",e[e.CUSTOM=8]="CUSTOM",e[e.JUMP=9]="JUMP",e[e.ENDGAME=10]="ENDGAME",e[e.REPLAY=11]="REPLAY",e[e.HOME=12]="HOME",e[e.HOLD=13]="HOLD",e[e.RELEASE=14]="RELEASE",e[e.ROTATE=15]="ROTATE",e[e.SHOW=16]="SHOW"}(o.PeerActionType||(o.PeerActionType={})),cc._RF.pop()},{}],PeerManager:[function(e,t,o){"use strict";cc._RF.push(t,"f9ace5O2YJCy7edETP5LCWv","PeerManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},a=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t0?o.switchMainPlayer(n):(p.default.show(p.Stages.StageQRscan),o.isPlayWithRemote=!0,o.isPlayingGame=!1))},u.default.TIMEOUT_DISCONNECT))},t.prototype.switchMainPlayer=function(e){for(var t=0,o=this.clientConnected;t=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0}),o.Popups=void 0;var a,c=e("../utils/Helper"),s=e("../utils/SingletonNode"),l=cc._decorator,p=l.ccclass,u=l.property;a=o.Popups||(o.Popups={});var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PopupBackground=null,t.PopupContainer=null,t.ShownPopups=null,t.PopupPrefabs=[],t}return r(t,e),t.push=function(e,t){void 0===t&&(t=!0);var o=this.Instance,n=o.PopupContainer.getChildByName(a[e]);n&&(o.usePopup(n),o.animate(!0,n),o.PopupBackground.active=t)},t.pop=function(){var e=this.Instance;if(e.ShownPopups.children.length>0){var t=e.ShownPopups.children[e.ShownPopups.children.length-1];e.PopupBackground.active=e.ShownPopups.children.length-1>0,e.animate(!1,t)}},t.hide=function(e){var t=this.Instance,o=t.ShownPopups.getChildByName(a[e]);o&&t.animate(!1,o)},t.getPopup=function(e){var t=this.Instance;return t.PopupContainer.getChildByName(a[e])||t.ShownPopups.getChildByName(a[e])},t.prototype.animate=function(e,t){var o=this;if(e)r=(n=["bounceOut","quadOut","backOut"])[c.default.RandInt(0,n.length-1)],t.setScale(0),cc.tween(t).by(.3,{scale:1},{easing:r}).start();else{var n,r=(n=["bounceOut","quadOut","backOut"])[c.default.RandInt(0,n.length-1)];cc.tween(t).to(.3,{scale:0},{easing:"quadIn"}).call(function(){o.returnPopup(t)}).start()}},t.prototype.usePopup=function(e){this.PopupContainer.removeChild(e,!1),this.ShownPopups.addChild(e)},t.prototype.returnPopup=function(e){this.ShownPopups.removeChild(e,!1),this.PopupContainer.addChild(e)},t.prototype.onLoad=function(){e.prototype.onLoad.call(this);for(var t=0;t=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.init=function(){},t.prototype.start=function(){},i([c],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],QRCodeGen:[function(e,t,o){"use strict";cc._RF.push(t,"8d77cuBjJ1BGq6/i3kFeUx7","QRCodeGen");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../common/Global"),c=e("../stage/StageMgr"),s=e("../utils/Helper"),l=cc._decorator,p=l.ccclass,u=l.property,d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.qrCode=null,t.size=100,t.loadingCover=null,t}return r(t,e),t.prototype.createQR=function(){var e=this;try{var t=s.default.getControllerURL();if(!t)throw console.error("Can't generate QR Code because controller url is "+t);t+="&language="+window.language;var o=document.createElement("div"),n=(new QRCode(o,{text:t,width:this.size,height:this.size,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.L}),o.children[0]);setTimeout(function(){e.loadingCover.active=!1;var t=new cc.Texture2D;t.initWithElement(n),t.handleLoadedTexture();var o=new cc.SpriteFrame(t),r=new cc.Node,i=r.addComponent(cc.Sprite);i.spriteFrame=o,i.sizeMode=cc.Sprite.SizeMode.CUSTOM,e.qrCode.removeAllChildren(),e.qrCode.addChild(r),r.width=e.size,r.height=e.size},300)}catch(r){if(a.default.Instance.backAppTime-Date.now()<0)return void c.default.Instance.sendMessage("backToApp");setTimeout(function(){e.createQR()},2e3)}},t.prototype.start=function(){},i([u(cc.Node)],t.prototype,"qrCode",void 0),i([u],t.prototype,"size",void 0),i([u(cc.Node)],t.prototype,"loadingCover",void 0),i([p],t)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/Global":"Global","../stage/StageMgr":"StageMgr","../utils/Helper":"Helper"}],SingletonNode:[function(e,t,o){"use strict";cc._RF.push(t,"005153jN7pCg4dYKrYXehlc","SingletonNode");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t,"Instance",{get:function(){return this.instance},enumerable:!1,configurable:!0}),t.prototype.onLoad=function(){if(t.instance)throw t.instance.constructor.name+" instance already exist";t.instance=this},t}(cc.Component)},cc._RF.pop()},{}],Singleton:[function(e,t,o){"use strict";cc._RF.push(t,"d05d9m5rI9IA7eX1WXQ8VpM","Singleton"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(){return function(){function e(){if(e.instance)throw e.instance.constructor.name+" instance already exist";e.instance=this}return Object.defineProperty(e,"Instance",{get:function(){return this.instance},enumerable:!1,configurable:!0}),e}()},cc._RF.pop()},{}],SoundMgr:[function(e,t,o){"use strict";cc._RF.push(t,"2fbc04KsHtO9rOLJqTjEbZu","SoundMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../utils/SingletonNode"),c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.BGM=null,t.SFX_BUTTON=null,t.SFX_SELECT=null,t.SFX_ENDSCREEN=null,t.SFX_EXPLODE=null,t.SFX_CRYSTAL=null,t}return r(t,e),Object.defineProperty(t,"IsMute",{get:function(){return 0==cc.audioEngine.getMusicVolume()},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsMusicPlaying",{get:function(){return cc.audioEngine.isMusicPlaying()},enumerable:!1,configurable:!0}),t.playMusic=function(e,t){void 0===t&&(t=!0),cc.audioEngine.playMusic(e,t)},t.playSfx=function(e,t){void 0===t&&(t=!1),cc.audioEngine.playEffect(e,t)},t.pauseMusic=function(){cc.audioEngine.pauseMusic()},t.pauseAll=function(){cc.audioEngine.pauseAll()},t.stopMusic=function(){cc.audioEngine.stopMusic()},t.stopAll=function(){cc.audioEngine.stopAll()},t.setMute=function(e){void 0===e&&(e=!0);var t=Number(!e);this.setMusicVolume(t),this.setSfxVolume(t)},t.setMusicVolume=function(e){cc.audioEngine.setMusicVolume(e)},t.setSfxVolume=function(e){cc.audioEngine.setEffectsVolume(e)},t.toggleSound=function(){this.setMute(!this.IsMute)},i([l({type:cc.AudioClip})],t.prototype,"BGM",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_BUTTON",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_SELECT",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_ENDSCREEN",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_EXPLODE",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_CRYSTAL",void 0),i([s],t)}(a.default());o.default=p,cc._RF.pop()},{"../utils/SingletonNode":"SingletonNode"}],Sound:[function(e,t,o){"use strict";cc._RF.push(t,"345daSN7ONNz7rZBaxuOiua","Sound");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),i([c],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],Spawn:[function(e,t,o){"use strict";cc._RF.push(t,"fd8f6IjeKpAsZNtY7UtFi2B","Spawn");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.prefabs=[],t.holder=null,t}return r(t,e),t.prototype.LoadHolder=function(){null==this.holder&&(this.holder=this.node.getChildByName("Holder"),console.log("Success load Holder ",this.holder))},t.prototype.LoadPrefabs=function(){var e=this;this.node.getChildByName("Prefabs").children.forEach(function(t){e.prefabs.push(t)})},t.prototype.GetPrefabByName=function(e){var t=null;return this.prefabs.forEach(function(o){o.name==e&&(t=o)}),t},t.prototype.SpawnThing=function(e,t){var o=this.GetPrefabByName(t);if(null==o)return null;var n=cc.instantiate(o);return n.active=!0,n.position=new cc.Vec3(e.x,e.y,0),n.parent=this.holder,n},t.prototype.onEnable=function(){this.LoadHolder(),this.LoadPrefabs()},i([s(cc.Node)],t.prototype,"prefabs",void 0),i([s(cc.Node)],t.prototype,"holder",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],Spinner:[function(e,t,o){"use strict";cc._RF.push(t,"9bb946QoZVOMKPUS/9hPO3J","Spinner");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.Speed=600,t}return r(t,e),t.prototype.update=function(e){this.node.angle=(this.node.angle-this.Speed*e)%360},i([s(cc.Integer)],t.prototype,"Speed",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],StageGameEnd:[function(e,t,o){"use strict";cc._RF.push(t,"d0df7MrCDxIOqiQAqLISxA9","StageGameEnd");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../common/SoundMgr"),c=e("../game/GameDefine"),s=e("../PeerComponent/PeerDefine"),l=e("../PeerComponent/PeerManager"),p=e("./Stage"),u=e("./StageMgr"),d=cc._decorator,f=d.ccclass,h=d.property,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.btnPlay=null,t.btnBack=null,t.playerRankBases=[],t.fireWorks=[],t.endGameMulti=null,t.endGameSingle=null,t.dragonSkin=["Char3","Char2","Char1"],t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.start=function(){this.btnPlay.interactable=!0,this.btnBack.interactable=!1},t.prototype.showResult=function(e){if(e.length>1){this.endGameMulti.active=!0,this.endGameSingle.active=!1;for(var t=0;t<3;t++)if(t=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./Stage"),c=e("./StageGameEnd"),s=e("../playGround"),l=e("../PeerComponent/PeerManager"),p=e("../PeerComponent/PeerAction"),u=cc._decorator,d=u.ccclass,f=u.property,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.playGround=null,t.container=null,t.playerAvatar=[],t.playerRankSpriteFrames=[],t.normalSprite=null,t.graySprite=null,t.tutorialPopup=null,t.lblTimer=null,t.bgSpriteFrames=[],t.roadSpriteFrames=[],t.objectsSpriteFrame1=[],t.objectsSpriteFrame2=[],t.objectsSpriteFrame3=[],t.isDead=[],t.isGameOver=[],t.playerScore=[],t.avatarPositionY=[50,-125,-300],t.connectedPlayerIndex=[],t.rankUpdateInterval=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this,cc.director.getCollisionManager().enabled=!0},t.prototype.initial=function(){for(var e=this,t=0,o=this.container.children;t0;o--){var n=Math.floor(Math.random()*(o+1));t=[e[n],e[o]],e[o]=t[0],e[n]=t[1]}},t.prototype.showConnectMessage=function(e,t){void 0===t&&(t=null),this.container.children[e]&&this.container.children[e].getComponent(s.default).showMessagePlayerDisconnect(t)},t.prototype.setGameOver=function(e,t){if(void 0===t&&(t=!0),this.isGameOver[e]=!0,t&&(this.isDead[e]=!0,this.playerAvatar[e].getComponent(cc.Sprite).setMaterial(0,this.graySprite)),this.isGameOver.every(function(e){return 1==e})){clearInterval(this.rankUpdateInterval);for(var o=0,n=this.container.children;o0&&c.default.Instance.showResult(i)}},t.prototype.updateRank=function(){for(var e=this.getPlayerRank(),t=0;t=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../common/SoundMgr"),c=(e("../PeerComponent/PeerManager"),e("../PeerComponent/QRCodeGen")),s=e("./Stage"),l=e("./StageMgr"),p=cc._decorator,u=p.ccclass,d=p.property,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.qrCode=null,t.btnNext=null,t.lblRoomCode=null,t.players=[],t.normalSpine=null,t.graySpine=null,t.msg=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.start=function(){this.msg.string=""+window.controllerOrigin},t.prototype.onEnable=function(){},t.prototype.nextStage=function(){a.default.playSfx(a.default.Instance.SFX_BUTTON),cc.tween(this.btnNext.node).to(.1,{scale:.65}).to(.1,{scale:.5}).call(function(){l.default.show(l.Stages.StageInGame)}).start()},t.prototype.setUI=function(e,t){this.players[t].getChildByName("playerReady").active=e,this.players[t].getChildByName("playerNotReady").active=!e,this.players[t].getChildByName("playerSprite").getComponent(sp.Skeleton).setMaterial(0,e?this.normalSpine:this.graySpine)},t.Instance=null,i([d(c.default)],t.prototype,"qrCode",void 0),i([d(cc.Button)],t.prototype,"btnNext",void 0),i([d(cc.Label)],t.prototype,"lblRoomCode",void 0),i([d(cc.Node)],t.prototype,"players",void 0),i([d(cc.Material)],t.prototype,"normalSpine",void 0),i([d(cc.Material)],t.prototype,"graySpine",void 0),i([d(cc.Label)],t.prototype,"msg",void 0),o=i([u],t)}(s.default);o.default=f,cc._RF.pop()},{"../PeerComponent/PeerManager":"PeerManager","../PeerComponent/QRCodeGen":"QRCodeGen","../common/SoundMgr":"SoundMgr","./Stage":"Stage","./StageMgr":"StageMgr"}],StageMgr:[function(e,t,o){"use strict";cc._RF.push(t,"fd6a8RrsDtCgJjnXG0oVHlf","StageMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0}),o.Stages=void 0;var a,c=e("./Stage"),s=e("../utils/SingletonNode"),l=e("../utils/Helper"),p=e("../PeerComponent/PeerManager"),u=e("./StageQRscan"),d=e("./StageLobby"),f=e("./StageGameEnd"),h=(e("./StageInGame"),e("../PeerComponent/PeerDefine")),y=e("./StageStartGame"),g=cc._decorator,_=g.ccclass,v=g.property;(function(e){e[e.StageQRscan=0]="StageQRscan",e[e.StageLobby=1]="StageLobby",e[e.StageInGame=2]="StageInGame",e[e.StageGameEnd=3]="StageGameEnd",e[e.StageStartGame=4]="StageStartGame",e[e.StageTestGame=5]="StageTestGame"})(a=o.Stages||(o.Stages={}));var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.StagePrefabs=[],t.StageCover=null,t.isTweening=!1,t.mPreviousStage=null,t.mCurrentStage=null,t.inputCode=[],t}var o;return r(t,e),o=t,Object.defineProperty(t.prototype,"CurrentStage",{get:function(){return this.mCurrentStage},enumerable:!1,configurable:!0}),t.show=function(e,t){if(void 0===t&&(t=.5),!o.Instance.isTweening){var n=this.Instance;n.mPreviousStage=n.mCurrentStage;for(var r=0,i=n.node.children;r0)&&(r=e?r+1:r-1,o.show(l.default.GetIndexEnum(a,n.node.children[r].name),t))},t.prototype.onLoad=function(){var t=this;e.prototype.onLoad.call(this);for(var n=0;n=4&&(t.inputCode.toString()==[54,55,56,57].toString()&&cc.debug.setDisplayStats(!0),t.inputCode.shift()),p.default.Instance.isPlayWithRemote)switch(o.Instance.CurrentStage.name){case a[a.StageQRscan]:13==e.keyCode&&(u.default.Instance.nextStage(!0),p.default.Instance.setRemoteMode(!0));break;case a[a.StageStartGame]:13==e.keyCode&&y.default.Instance.nextStage(!0);break;case a[a.StageLobby]:13==e.keyCode&&d.default.Instance.nextStage();break;case a[a.StageGameEnd]:37==e.keyCode?f.default.Instance.chooseButton(!1):39==e.keyCode?f.default.Instance.chooseButton(!0):13==e.keyCode&&(f.default.Instance.btnPlay.interactable?f.default.Instance.nextStage():f.default.Instance.previousStage())}}),window.addEventListener("message",this.onReciveMessage.bind(this),!1),this.sendMessage("getControllerURL"),this.sendMessage("getPrefix"),this.sendMessage("getControllerOrigin")},t.prototype.onReciveMessage=function(e){if(e.data&&e.data.action){var t=e.data;switch(t.action){case"getPrefix":window.controllerPrefix=t.message;break;case"getControllerURL":window.controllerURL=t.message;break;case"getControllerOrigin":window.controllerOrigin=t.message}}},t.prototype.sendMessage=function(e,t){void 0===t&&(t=null);var o={action:e,game:"zig-zag",customParam:t};window.parent.postMessage(o,"*")},t.prototype.start=function(){this.StageCover=cc.find("Canvas").getChildByName("Stage Cover"),this.StageCover.active=!1,o.show(a.StageQRscan)},t.prototype.animate=function(e){var t=this;this.mPreviousStage.active=!0,this.mCurrentStage.active=!1,this.isTweening=!0,this.StageCover.active=!0,cc.tween(this.mPreviousStage).to(e,{scale:this.mPreviousStage.scaleX},{progress:function(e,o,n,r){return t.StageCover.opacity=255*r,e+(o-e)*r}}).call(function(){t.mPreviousStage.active=!1,t.mCurrentStage.active=!0,t.mCurrentStage.getComponent(c.default).init()}).start(),cc.tween(this.mCurrentStage).delay(e).to(e,{scale:this.mCurrentStage.scaleX},{progress:function(e,o,n,r){return t.StageCover.opacity=255*(1-r),e+(o-e)*r}}).call(function(){t.StageCover.active=!1,t.isTweening=!1}).start()},i([v(cc.Prefab)],t.prototype,"StagePrefabs",void 0),o=i([_],t)}(s.default());o.default=m,cc._RF.pop()},{"../PeerComponent/PeerDefine":"PeerDefine","../PeerComponent/PeerManager":"PeerManager","../utils/Helper":"Helper","../utils/SingletonNode":"SingletonNode","./Stage":"Stage","./StageGameEnd":"StageGameEnd","./StageInGame":"StageInGame","./StageLobby":"StageLobby","./StageQRscan":"StageQRscan","./StageStartGame":"StageStartGame"}],StageQRscan:[function(e,t,o){"use strict";cc._RF.push(t,"824b3x307FID6iZwnCxazfr","StageQRscan");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../common/Global"),c=e("../common/SoundMgr"),s=(e("../PeerComponent/PeerManager"),e("../PeerComponent/QRCodeGen")),l=e("./Stage"),p=(e("./StageLobby"),e("./StageMgr")),u=cc._decorator,d=u.ccclass,f=u.property,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.qrCode=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.start=function(){c.default.playMusic(c.default.Instance.BGM);var e=new URLSearchParams(window.location.search),t=Number(e.get("timer_qr"))||3e4;a.default.Instance.backAppTime=Date.now()+t},t.prototype.nextStage=function(e){void 0===e&&(e=!1),e?(c.default.playSfx(c.default.Instance.SFX_BUTTON),p.default.show(p.Stages.StageStartGame)):p.default.show(p.Stages.StageStartGame)},t.Instance=null,i([f(s.default)],t.prototype,"qrCode",void 0),o=i([d],t)}(l.default);o.default=h,cc._RF.pop()},{"../PeerComponent/PeerManager":"PeerManager","../PeerComponent/QRCodeGen":"QRCodeGen","../common/Global":"Global","../common/SoundMgr":"SoundMgr","./Stage":"Stage","./StageLobby":"StageLobby","./StageMgr":"StageMgr"}],StageStartGame:[function(e,t,o){"use strict";cc._RF.push(t,"0e252LdYfhIyIZLhk6PCy9f","StageStartGame");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../common/SoundMgr"),c=e("./Stage"),s=e("./StageMgr"),l=cc._decorator,p=l.ccclass,u=l.property,d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.startButton=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.nextStage=function(e){void 0===e&&(e=!1),e?(a.default.playSfx(a.default.Instance.SFX_BUTTON),cc.tween(this.startButton).to(.1,{scale:.65}).to(.1,{scale:.5}).call(function(){s.default.show(s.Stages.StageTestGame)}).start()):s.default.show(s.Stages.StageTestGame)},t.Instance=null,i([u(cc.Node)],t.prototype,"startButton",void 0),o=i([p],t)}(c.default);o.default=d,cc._RF.pop()},{"../common/SoundMgr":"SoundMgr","./Stage":"Stage","./StageMgr":"StageMgr"}],StageTestGame:[function(e,t,o){"use strict";cc._RF.push(t,"0c894rNk45KaZ1YxbpCwkvS","StageTestGame");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./Stage"),c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ballHolder=null,t}return r(t,e),t.prototype.start=function(){},i([l(cc.Node)],t.prototype,"ballHolder",void 0),i([s],t)}(a.default);o.default=p,cc._RF.pop()},{"./Stage":"Stage"}],Stage:[function(e,t,o){"use strict";cc._RF.push(t,"d1579TpISVNGpuqBRR5e3Kh","Stage");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.init=function(){},i([c],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],TimeNeedTouch:[function(e,t,o){"use strict";cc._RF.push(t,"84042I9KIdEGo233ywZTGud","TimeNeedTouch");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./GamePlayManager"),c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.label=null,t.TimeNeedToTouch=0,t.isOpenDoor=!1,t}return r(t,e),t.prototype.setBounce=function(e){this.TimeNeedToTouch=e,this.label.string=this.TimeNeedToTouch.toString(),this.isOpenDoor=!1},t.prototype.Touching=function(){this.TimeNeedToTouch>0?(this.TimeNeedToTouch--,this.label.string=this.TimeNeedToTouch.toString(),0==this.TimeNeedToTouch&&0==this.isOpenDoor&&(a.default.Instance.fadeWall.FadeWall(),this.label.string=this.TimeNeedToTouch.toString(),this.isOpenDoor=!0)):0==this.TimeNeedToTouch&&(this.isOpenDoor=!0,a.default.Instance.isLost=!0,this.label.string="Lost",this.scheduleOnce(function(){a.default.Instance.Lose()},.4))},i([l(cc.Label)],t.prototype,"label",void 0),i([l],t.prototype,"TimeNeedToTouch",void 0),i([s],t)}(cc.Component);o.default=p,cc._RF.pop()},{"./GamePlayManager":"GamePlayManager"}],Timer:[function(e,t,o){"use strict";cc._RF.push(t,"2f2fcQ9soJHUbtX80Hsh3jj","Timer"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function e(){this.timer=0,this.duration=0,this.overhead=0,this.isDone=!0}return e.prototype.SetDuration=function(e){this.timer=e,this.duration=e,this.overhead=0,this.isDone=!1},e.prototype.GetDuration=function(){return this.duration},e.prototype.GetTime=function(){return this.timer},e.prototype.GetPercent=function(){return this.timer/this.duration},e.prototype.Reset=function(){this.timer=this.duration,this.overhead=0,this.isDone=!1},e.prototype.IsDone=function(){return 0===this.timer},e.prototype.FirstFinished=function(){return!(this.timer>0||this.isDone||(this.isDone=!0,0))},e.prototype.GetOverhead=function(){return this.overhead},e.prototype.Update=function(e){0!==this.timer&&(this.timer-=e,this.timer<0&&(this.overhead=-this.timer,this.timer=0))},e}();o.default=n,cc._RF.pop()},{}],Trail:[function(e,t,o){"use strict";cc._RF.push(t,"bdaffaF72hHi4PuAcpqk95k","Trail");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.color=cc.Color.WHITE,t.target=null,t.width=10,t.trailLength=40,t.trailPoints=[],t.graphics=null,t}return r(t,e),t.prototype.start=function(){this.graphics=this.node.getComponent(cc.Graphics),console.log(this.graphics)},t.prototype.update=function(){for(this.trailPoints.push(this.target.getPosition());this.trailPoints.length>this.trailLength;)this.trailPoints.shift();this.graphics.clear(),this.graphics.lineWidth=this.width,this.graphics.strokeColor=this.color;for(var e=this.trailPoints.length-2;e>=0;--e)this.graphics.moveTo(this.trailPoints[e].x,this.trailPoints[e].y),this.graphics.lineTo(this.trailPoints[e+1].x,this.trailPoints[e+1].y),this.graphics.stroke(),this.graphics.lineWidth=this.graphics.lineWidth-1},i([s(cc.Color)],t.prototype,"color",void 0),i([s(cc.Node)],t.prototype,"target",void 0),i([s(cc.Float)],t.prototype,"width",void 0),i([s(cc.Float)],t.prototype,"trailLength",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],TrajectoryLine:[function(e,t,o){"use strict";cc._RF.push(t,"70e104pF95DF4JScfXbPalN","TrajectoryLine");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=(a.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.graphics=null,t}return r(t,e),t.prototype.onEnable=function(){this.graphics=this.node.getComponent(cc.Graphics)},t.prototype.start=function(){},t.prototype.drawLine=function(e,t,o){this.graphics.clear(),this.graphics.strokeColor=cc.Color.ORANGE,this.graphics.lineWidth=3,this.graphics.moveTo(e.x,e.y);var n=t.mul(o).add(e);this.graphics.lineTo(n.x,n.y),this.graphics.stroke()},t.prototype.drawCircle=function(e,t,o){this.graphics.lineWidth=2;var n=0,r=0,i=cc.Vec2.ZERO,a=t.normalize().clone(),c=a.clone().normalizeSelf();n=0;var s=e.clone();for(s.x=e.x+a.normalizeSelf().x,s.y=e.y+a.normalizeSelf().y,this.graphics.moveTo(e.x,e.y),this.graphics.circle(s.x,s.y,4);r=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0}),o.UI_MOVE_DIRECTION=o.UI_SHOW_EFFECT=o.UIs=void 0;var a,c,s,l=e("../utils/Helper"),p=e("../utils/SingletonNode"),u=cc._decorator,d=u.ccclass,f=u.property;(function(e){e[e.UIInterstitial=0]="UIInterstitial",e[e.UIWaiting=1]="UIWaiting",e[e.UIGame=2]="UIGame",e[e.UIScan=3]="UIScan",e[e.UIGuide=4]="UIGuide"})(a=o.UIs||(o.UIs={})),function(e){e[e.APPEAR=0]="APPEAR",e[e.MOVE=1]="MOVE",e[e.SCALE=2]="SCALE",e[e.FADE=3]="FADE"}(c=o.UI_SHOW_EFFECT||(o.UI_SHOW_EFFECT={})),function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(s=o.UI_MOVE_DIRECTION||(o.UI_MOVE_DIRECTION={}));var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.UIPrefabs=[],t.Canvas=null,t.mMoveDirection=s.LEFT,t.mPreviousView=null,t.mCurrentView=null,t}return r(t,e),Object.defineProperty(t.prototype,"MoveDirection",{set:function(e){this.mMoveDirection=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CurrentView",{get:function(){return this.mCurrentView},enumerable:!1,configurable:!0}),t.show=function(e,t,o,n){void 0===t&&(t=c.APPEAR),void 0===o&&(o="smooth"),void 0===n&&(n=.5);var r=this.Instance;r.mPreviousView=r.mCurrentView;for(var i=0,s=r.node.children;i0)&&(i=e?i+1:i-1,this.show(l.default.GetIndexEnum(a,r.node.children[i].name),t,o,n))},t.getUI=function(e){return this.Instance.node.getChildByName(a[e]).getComponent(a[e])},t.prototype.onLoad=function(){e.prototype.onLoad.call(this);for(var t=0;t=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("../GamePlayManager"),c=cc._decorator,s=c.ccclass,l=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.onCollisionEnter=function(e,t){e!=t&&0==a.default.Instance.isLost&&a.default.Instance.Win()},i([s],t)}(cc.Component));o.default=l,cc._RF.pop()},{"../GamePlayManager":"GamePlayManager"}],collisionReset:[function(e,t,o){"use strict";cc._RF.push(t,"a17f9LZSlxJWIxURW1Pdn8u","collisionReset");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./cuboid"),c=e("./playGround"),s=cc._decorator,l=s.ccclass,p=s.property,u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PlayGround=null,t}return r(t,e),t.prototype.onCollisionExit=function(e){!this.PlayGround.isPlayerDead&&5===e.tag&&this.PlayGround.isReady&&("ExtraCuboid"==e.node.name?this.PlayGround.extraCuboidPool.put(e.node):e.node==this.PlayGround.cuboidBase||(e.node.getComponent(a.default).diamond&&this.PlayGround.diamondPool.put(e.node.getComponent(a.default).diamond),this.PlayGround.createCuboid(e.node)))},i([p(c.default)],t.prototype,"PlayGround",void 0),i([l],t)}(cc.Component);o.default=u,cc._RF.pop()},{"./cuboid":"cuboid","./playGround":"playGround"}],cuboid:[function(e,t,o){"use strict";cc._RF.push(t,"1bcb2GEmxRB1458fn5Fjmnu","cuboid");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.player=null,t.diamond=null,t.thresHold=9999,t.thresHoldActive=9999,t}return r(t,e),t.prototype.onLoad=function(){var e=this;this.schedule(function(){var t=e.player.position.y-e.node.position.y;if(t<200&&t>-200){if(0===e.thresHold)return;e.thresHold=0,e.node.children.forEach(function(e){1===e.childrenCount&&e.children[0].getComponent(cc.BoxCollider)&&(e.children[0].getComponent(cc.BoxCollider).enabled=!0)}),e.getComponent(cc.BoxCollider).enabled=!0}else{if(200===e.thresHold)return;e.thresHold=200,e.node.children.forEach(function(e){1===e.childrenCount&&e.children[0].getComponent(cc.BoxCollider)&&(e.children[0].getComponent(cc.BoxCollider).enabled=!1)})}t<-500&&(e.getComponent(cc.BoxCollider).enabled=!1)},.1),this.schedule(function(){if(e.player.position.y-e.node.position.y<720&&e.player.position.y-e.node.position.y>-720){if(0===e.thresHoldActive)return;e.thresHoldActive=0,e.node.children.forEach(function(e){e.getComponent(cc.Sprite)&&(e.getComponent(cc.Sprite).enabled=!0)})}else{if(720===e.thresHoldActive)return;e.thresHoldActive=720,e.node.children.forEach(function(e){e.getComponent(cc.Sprite)&&(e.getComponent(cc.Sprite).enabled=!1)})}},.2)},i([s(cc.Node)],t.prototype,"player",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],diamond:[function(e,t,o){"use strict";cc._RF.push(t,"085b587D41NjKlGgaQmpnmJ","diamond");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=cc._decorator,c=a.ccclass,s=a.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.player=null,t.diamondSprite=null,t.diamondParticle=null,t.lblScorePlus=null,t.thresHold=9999,t}return r(t,e),t.prototype.onLoad=function(){var e=this;this.schedule(function(){var t=e.player.position.y-e.node.position.y;if(t<200&&t>-200){if(0===e.thresHold)return;e.thresHold=0,e.getComponent(cc.CircleCollider).enabled=!0}else{if(200===e.thresHold)return;e.thresHold=200,e.getComponent(cc.CircleCollider).enabled=!1}},.1)},i([s(cc.Node)],t.prototype,"player",void 0),i([s(cc.Sprite)],t.prototype,"diamondSprite",void 0),i([s(cc.ParticleSystem)],t.prototype,"diamondParticle",void 0),i([s(cc.Label)],t.prototype,"lblScorePlus",void 0),i([c],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],levelDesign:[function(e,t,o){"use strict";cc._RF.push(t,"f4cdaX2XKlHqKKlKcebjlUE","levelDesign"),o.__esModule=!0,o.default=void 0,o.default=[{startIndex:0,directionChangeRate:0,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:50,directionChangeRate:.1,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:100,directionChangeRate:.2,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:0},{startIndex:200,directionChangeRate:.7,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:.1},{startIndex:240,directionChangeRate:.25,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:.1},{startIndex:300,directionChangeRate:1,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:320,directionChangeRate:.3,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:400,directionChangeRate:.6,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:0},{startIndex:450,directionChangeRate:.4,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:0},{startIndex:500,directionChangeRate:.8,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:.1},{startIndex:530,directionChangeRate:.5,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:.1},{startIndex:600,directionChangeRate:1,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:620,directionChangeRate:.65,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:700,directionChangeRate:.9,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:.1},{startIndex:750,directionChangeRate:.5,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:.1}],t.exports=o.default,cc._RF.pop()},{}],playGround:[function(e,t,o){"use strict";cc._RF.push(t,"7c0988P9KdKaoNjh5pLuFPn","playGround");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./game/GameDefine"),c=e("./PeerComponent/PeerManager"),s=e("./stage/StageInGame"),l=e("../levelDesign.js"),p=e("./common/SoundMgr"),u=e("./cuboid"),d=e("./diamond"),f=cc._decorator,h=f.ccclass,y=f.property,g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cuboid=null,t.diamond=null,t.cuboidContainer=null,t.cuboidBase=null,t.playerBall=null,t.lblScore=null,t.bg=null,t.dragonSP=[],t.diamondContainer=null,t.endGamePopup=null,t.bannerLabel=null,t.popupLabel=null,t.playerIndex=0,t.previousCuboid=null,t.distance=cc.v2(100*Math.cos(45*Math.PI/180),100*Math.cos(45*Math.PI/180)),t.initialDistance=cc.v2(100*Math.cos(45*Math.PI/180),0*Math.cos(45*Math.PI/180)),t.isMoveLeft=!1,t.isPlayerDead=!1,t.score=0,t.diamondPool=new cc.NodePool,t.extraCuboidPool=new cc.NodePool,t.isReady=!1,t.isSpawnLeft=!1,t.currentLevel=0,t.cubiodCount=0,t.isChangingDirection=!1,t.dragonSpine=null,t.dragonSkin=["Char3","Char2","Char1"],t.bgSpriteFrame=null,t.roadSpriteFrame=null,t.objectsSpriteFrame=null,t.playerPos=new cc.Vec2(0,0),t}return r(t,e),t.prototype.onLoad=function(){var e=this;cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,function(t){c.default.Instance.isPlayWithRemote&&0==e.playerIndex&&13==t.keyCode&&e.changeDirection()});for(var t=0;t<10;++t){var o=cc.instantiate(this.diamond);this.diamondPool.put(o)}for(t=0;t<30;++t){var n=cc.instantiate(this.cuboid);this.extraCuboidPool.put(n)}this.dragonSpine=this.playerBall.getChildByName("playerChar").getComponent(sp.Skeleton)},t.prototype.start=function(){this.playerBall.zIndex=999,this.cuboidBase.zIndex=0;for(var e=0;e<15;e++)this.createCuboid();this.dragonSpine.setSkin(this.dragonSkin[this.playerIndex]),this.bg.getComponent(cc.Sprite).spriteFrame=this.bgSpriteFrame,this.cuboidBase.getChildByName("frontFace").getComponent(cc.Sprite).spriteFrame=this.roadSpriteFrame},t.prototype.changeDirection=function(){var e=this;this.isPlayerDead||!this.isReady||this.isChangingDirection||(this.isMoveLeft=!this.isMoveLeft,this.isChangingDirection=!0,cc.tween(this.playerBall).to(.15,{angle:this.isMoveLeft?45:-45}).call(function(){e.isChangingDirection=!1}).start(),this.scoreUpdate())},t.prototype.createCuboid=function(e){var t=this;void 0===e&&(e=cc.instantiate(this.cuboid)),e.getChildByName("frontFace").getComponent(cc.Sprite).spriteFrame=this.roadSpriteFrame;var o=l[this.currentLevel+1];o&&++this.cubiodCount>=o.startIndex&&this.currentLevel++;var n=l[this.currentLevel];if(this.previousCuboid){var r=Math.random(),i=0;switch(r105?i=0:(this.previousCuboid.x<-70||this.previousCuboid.x>70)&&(i=1)):r105)&&(i=0)):i=0,i){case 0:if(Math.random()140&&(this.isSpawnLeft=!0),e.x=(this.isSpawnLeft?-this.distance.x:this.distance.x)+this.previousCuboid.x,e.y=this.previousCuboid.y+this.distance.y,e.getChildByName("fence-1").active=!this.isSpawnLeft,e.getChildByName("fence-2").active=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-3").active=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-4").active=!this.isSpawnLeft,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-3").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-4").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft,Math.random()<.5){var a=e.getChildByName("objectRandom").getChildByName("objectSprite");e.getChildByName("objectRandom").active=!0,a.getComponent(cc.Sprite).spriteFrame=this.objectsSpriteFrame[Math.floor(Math.random()*this.objectsSpriteFrame.length)],a.x=e.x>0?-400:400}else e.getChildByName("objectRandom").active=!1;break;case 1:var c=this.previousCuboid.x,s=this.previousCuboid.y;setTimeout(function(){t.createExtraCuboid(-t.distance.x+c,s+t.distance.y,[!1,!0,!1,!0])},50),setTimeout(function(){t.createExtraCuboid(t.distance.x+c,s+t.distance.y,[!0,!1,!0,!1])},100),e.x=this.previousCuboid.x,e.y=this.previousCuboid.y+2*this.distance.y,e.getChildByName("fence-1").active=!1,e.getChildByName("fence-2").active=!1,this.previousCuboid.getChildByName("fence-3").active=!1,this.previousCuboid.getChildByName("fence-4").active=!1,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!1,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-3").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-4").children[0].getComponent(cc.BoxCollider).enabled=!1;break;case 2:var p=this.previousCuboid.x,d=this.previousCuboid.y;setTimeout(function(){t.createExtraCuboid(-t.distance.x+p,d+t.distance.y,[!1,!0,!0,!1])},50),setTimeout(function(){t.createExtraCuboid(t.distance.x+p,d+t.distance.y,[!0,!1,!1,!0])},100),setTimeout(function(){t.createExtraCuboid(2*-t.distance.x+p,d+2*t.distance.y,[!1,!0,!1,!0])},150),setTimeout(function(){t.createExtraCuboid(2*t.distance.x+p,d+2*t.distance.y,[!0,!1,!0,!1])},200),setTimeout(function(){t.createExtraCuboid(-t.distance.x+p,d+3*t.distance.y,[!0,!1,!1,!0])},250),setTimeout(function(){t.createExtraCuboid(t.distance.x+p,d+3*t.distance.y,[!1,!0,!0,!1])},300),e.x=this.previousCuboid.x,e.y=this.previousCuboid.y+4*this.distance.y,e.getChildByName("fence-1").active=!1,e.getChildByName("fence-2").active=!1,this.previousCuboid.getChildByName("fence-3").active=!1,this.previousCuboid.getChildByName("fence-4").active=!1,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!1,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-3").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-4").children[0].getComponent(cc.BoxCollider).enabled=!1}}else this.isSpawnLeft=!1,e.x=this.isSpawnLeft?-this.initialDistance.x:this.initialDistance.x,e.y=this.initialDistance.y,e.getChildByName("fence-1").active=!this.isSpawnLeft,e.getChildByName("fence-2").active=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-7").active=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-8").active=!this.isSpawnLeft,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-7").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-8").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft;if(e.zIndex=-e.y/70,e.parent=this.cuboidContainer,this.previousCuboid=e,Math.random()0?this.diamondPool.get():cc.instantiate(this.diamond)).x=e,o.y=t,o.parent=this.diamondContainer,o.getComponent(d.default).diamondSprite.node.active=!0,o.getComponent(d.default).diamondParticle.node.active=!1,o.getComponent(d.default).lblScorePlus.node.active=!1,o},t.prototype.createExtraCuboid=function(e,t,o){void 0===o&&(o=[!0,!0,!0,!0]);var n=null;if((n=this.extraCuboidPool.size()>0?this.extraCuboidPool.get():cc.instantiate(this.cuboid)).x=e,n.y=t,n.getChildByName("frontFace").getComponent(cc.Sprite).spriteFrame=this.roadSpriteFrame,n.parent=this.cuboidContainer,n.name="ExtraCuboid",n.zIndex=-n.y/70,Math.random()=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./common/SoundMgr"),c=e("./diamond"),s=e("./game/GameDefine"),l=e("./playGround"),p=cc._decorator,u=p.ccclass,d=p.property,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PlayGround=null,t}return r(t,e),t.prototype.onCollisionEnter=function(e){if(3===e.tag){var t=e.node.getComponent(c.default);t.diamondSprite.node.active&&(a.default.playSfx(a.default.Instance.SFX_CRYSTAL),t.diamondSprite.node.active=!1,t.diamondParticle.node.active=!0,t.diamondParticle.resetSystem(),t.lblScorePlus.node.active=!0,cc.tween(t.lblScorePlus.node).to(.5,{y:175}).call(function(){t.lblScorePlus.node.active=!1,t.lblScorePlus.node.y=75}).start(),this.PlayGround.scoreUpdate(s.default.DiamondScore),t.lblScorePlus.string="+"+s.default.DiamondScore)}},i([d(l.default)],t.prototype,"PlayGround",void 0),i([u],t)}(cc.Component);o.default=f,cc._RF.pop()},{"./common/SoundMgr":"SoundMgr","./diamond":"diamond","./game/GameDefine":"GameDefine","./playGround":"playGround"}],playerBall:[function(e,t,o){"use strict";cc._RF.push(t,"9a52dKv1yRLFb9DOGF+w6r+","playerBall");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};Object.defineProperty(o,"__esModule",{value:!0});var a=e("./playGround"),c=cc._decorator,s=c.ccclass,l=c.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PlayGround=null,t.enterCount=1,t}return r(t,e),t.prototype.start=function(){},t.prototype.onCollisionEnter=function(e){!this.PlayGround.isPlayerDead&&2===e.tag&&this.PlayGround.isReady&&(this.PlayGround.isPlayerDead=!0)},i([l(a.default)],t.prototype,"PlayGround",void 0),i([s],t)}(cc.Component);o.default=p,cc._RF.pop()},{"./playGround":"playGround"}],strings:[function(e,t){"use strict";cc._RF.push(t,"06f1dcF/lRJcYoC0Xu0umHM","strings"),t.exports={EMPTY:{EN:"",MY:"",MU:""},COMMON_HIGHSCORE:{EN:"High Score:",MY:"\u1021\u103b\u1019\u1004\u1037\u1039\u1006\u102f\u1036\u1038\u101b\u1019\u103d\u1010\u1039",MU:"\u1021\u1019\u103c\u1004\u1037\u103a\u1006\u102f\u1036\u1038\u101b\u1019\u103e\u1010\u103a"},COMMON_STORE_EQUIP:{EN:"Store &\nEquipment",MY:"\u1015\u1005\u1065\u100a\u1039\u1038\u1005\u1010\u102d\u102f\u1038\u1006\u102d\u102f\u1004\u1039",MU:"\u1015\u1005\u1039\u1005\u100a\u103a\u1038\u1005\u1010\u102d\u102f\u1038\u1006\u102d\u102f\u1004\u103a"},COMMON_GIFT_GUIDE:{EN:"Gift & Guide",MY:"Gift & Guide",MU:"Gift & Guide"},COMMON_LEADERBOARD:{EN:"Leader board",MY:"Leader board",MU:"Leader board"},COMMON_HISTORY:{EN:"Your History",MY:"Your History",MU:"Your History"},COMMON_COLLECTION:{EN:"Your Collection",MY:"Collection",MU:"Collection"},COMMON_SCORE:{EN:"Score:",MY:"\u101b\u1019\u103d\u1010\u1039",MU:"\u101b\u1019\u103e\u1010\u103a"},COMMON_SKILL:{EN:"Skill",MY:"Skill",MU:"Skill"},COMMON_ATTACK:{EN:"Attack",MY:"Attack",MU:"Attack"},COMMON_COOLDOWN:{EN:"Cool down:",MY:"Cool down:",MU:"Cool down:"},COMMON_XP:{EN:"XP",MY:"XP",MU:"XP"},COMMON_LV:{EN:"LV.",MY:"LV.",MU:"LV."},COMMON_LEVEL_UP:{EN:"Level up!!!",MY:"Level \u1010\u102d\u102f\u1038",MU:"Level \u1010\u102d\u102f\u1038"},COMMON_EQUIP:{EN:"EQUIP NOW",MY:"\u101e\u102f\u1036\u1038\u1019\u100a\u1039",MU:"\u101e\u102f\u1036\u1038\u1019\u100a\u103a"},COMMON_UNEQUIP:{EN:"UNEQUIP",MY:"\u1019\u101e\u102f\u1036\u1038\u1015\u102b",MU:"\u1019\u101e\u102f\u1036\u1038\u1015\u102b"},COMMON_YES:{EN:"Yes",MY:"Yes",MU:"Yes"},COMMON_NO:{EN:"No",MY:"No",MU:"No"},COMMON_OK:{EN:"OK",MY:"OK",MU:"OK"},COMMON_COPY:{EN:"Copy",MY:"\u1000\u1030\u1038\u101a\u1030\u1019\u100a\u1039",MU:"\u1000\u1030\u1038\u101a\u1030\u1019\u100a\u103a"},COMMON_TURN_REMAIN:{EN:"Daily remaining turns:",MY:"\u101a\u1031\u1014\u1094\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u101a\u1014\u1031\u1037\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},COMMON_TURN_TOTAL:{EN:"Total turns:",MY:"\u1005\u102f\u1005\u102f\u1031\u1015\u102b\u1004\u1039\u1038\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u1005\u102f\u1005\u102f\u1015\u1031\u102b\u1004\u103a\u1038\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},COMMON_YOUR_STICK:{EN:"Your Sticks:",MY:"\u101e\u1004\u1037\u1039stick\u1019\u103a\u102c\u1038",MU:"\u101e\u1004\u1037\u103astick\u1019\u103b\u102c\u1038"},COMMON_NO_OF:{EN:"No.",MY:"No.",MU:"No."},COMMON_DATE_TIME:{EN:"Date / Time",MY:"\u101b\u1000\u1039/\u1021\u1001\u103a\u102d\u1014\u1039",MU:"\u101b\u1000\u103a/\u1021\u1001\u103b\u102d\u1014\u103a"},PLAYER_ID:{EN:"Your ID:",MY:"\u101e\u1004\u1037\u1039 ID",MU:"\u101e\u1004\u1037\u103a ID"},PLAYER_STAR:{EN:"Collected Stars",MY:"\u101b\u101b\u103d\u102d\u1011\u102c\u1038\u1031\u101e\u102c\u107e\u1000\u101a\u1039\u1019\u103a\u102c\u1038",MU:"\u101b\u101b\u103e\u102d\u1011\u102c\u1038\u101e\u1031\u102c\u1000\u103c\u101a\u103a\u1019\u103b\u102c\u1038"},PLAYER_RANK:{EN:"Current Rank:",MY:"\u101c\u1000\u1039\u101b\u103d\u102d\u1021\u1006\u1004\u1037\u1039",MU:"\u101c\u1000\u103a\u101b\u103e\u102d\u1021\u1006\u1004\u1037\u103a"},BOOSTER_TITLE:{EN:"Booster pack",MY:"\u1021\u1004\u1039\u1021\u102c\u1038\u1010\u102d\u102f\u1038 Pack",MU:"\u1021\u1004\u103a\u1021\u102c\u1038\u1010\u102d\u102f\u1038 Pack"},BOOSTER_TITLE_2:{EN:"Buy sticks",MY:"Stick\u1019\u103a\u102c\u1038\u101d\u101a\u1039\u1019\u100a\u1039",MU:"Stick\u1019\u103b\u102c\u1038\u101d\u101a\u103a\u1019\u100a\u103a"},BOOSTER_DESC:{EN:"For this turn only",MY:"\u101a\u1001\u102f\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1021\u1010\u103c\u1000\u1039\u101e\u102c",MU:"\u101a\u1001\u102f\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1021\u1010\u103d\u1000\u103a\u101e\u102c"},BOOSTER_HP:{EN:"Max HP",MY:"Max HP",MU:"Max HP"},BOOSTER_CONFIRM:{EN:"Spend %d Ks main lalance\nto buy %d Sticks?",MY:"%d Stick \u101d\u101a\u1039\u101a\u1030\u101b\u1014\u1039 \u101c\u1000\u1039\u1000\u103a\u1014\u1039\u1031\u1004\u103c\n%d \u1000\u103a\u1015\u1039\u1000\u102d\u102f\u1021\u101e\u102f\u1036\u1038\u103b\u1015\u1033\u1019\u100a\u1039",MU:"%d Stick \u101d\u101a\u103a\u101a\u1030\u101b\u1014\u103a \u101c\u1000\u103a\u1000\u103b\u1014\u103a\u1004\u103d\u1031\n%d \u1000\u103b\u1015\u103a\u1000\u102d\u102f\u1021\u101e\u102f\u1036\u1038\u1015\u103c\u102f\u1019\u100a\u103a"},STORE_DESC:{EN:"Buy and equip skills for special powers",MY:"\u1021\u1011\u1030\u1038\u1015\u102b\u101d\u102b\u1019\u103a\u102c\u1038\u101b\u1031\u1021\u102c\u1004\u1039\u1000\u103c\u107d\u1019\u1039\u1038\u1000\u103a\u1004\u1039\u1019\u1088\u1019\u103a\u102c\u1038\u101d\u101a\u1039\u101a\u1030\u1015\u102b",MU:"\u1021\u1011\u1030\u1038\u1015\u102b\u101d\u102b\u1019\u103b\u102c\u1038\u101b\u1021\u1031\u102c\u1004\u103a\u1000\u103b\u103d\u1019\u103a\u1038\u1000\u103b\u1004\u103a\u1019\u103e\u102f\u1019\u103b\u102c\u1038\u101d\u101a\u103a\u101a\u1030\u1015\u102b"},STORE_BUY_WITH:{EN:"Buy with 1000",MY:"\u1041\u1040\u1040\u1040\u103b\u1016\u1004\u1037\u1039\u101d\u101a\u1039\u1019\u100a\u1039",MU:"\u1041\u1040\u1040\u1040\u1016\u103c\u1004\u1037\u103a\u101d\u101a\u103a\u1019\u100a\u103a"},STORE_TURN_1:{EN:"Get 30 turns",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039 \u1043\u1040\u101a\u1030\u1019\u100a\u1039",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a \u1043\u1040\u101a\u1030\u1019\u100a\u103a"},STORE_TURN_2:{EN:"Not affect daily limit",MY:"\u1031\u1014\u1094\u1005\u1025\u1039\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u101e\u1010\u1039\u1019\u103d\u1010\u1039\n\u1001\u103a\u1000\u1039\u1000\u102d\u102f\u1019\u1031\u103b\u1015\u102c\u1004\u1039\u1038\u101c\u1032\u108f\u102d\u102f\u1004\u1039\u1015\u102b",MU:"\u1014\u1031\u1037\u1005\u1009\u103a\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u101e\u1010\u103a\u1019\u103e\u1010\u103a\n\u1001\u103b\u1000\u103a\u1000\u102d\u102f\u1019\u1015\u103c\u1031\u102c\u1004\u103a\u1038\u101c\u1032\u1014\u102d\u102f\u1004\u103a\u1015\u102b"},STORE_FREEZE:{EN:"Freeze all\nenemies for 2s",MY:"\u101b\u1014\u1039\u101e\u1030\u1019\u103a\u102c\u1038 2\u1005\u1000\u1060\u1014\u1094\u1039\n\u1031\u101b\u1001\u1032\u101e\u103c\u102c\u1038\u1031\u1005\u103b\u1001\u1004\u1039\u1038",MU:"\u101b\u1014\u103a\u101e\u1030\u1019\u103b\u102c\u1038 2\u1005\u1000\u1039\u1000\u1014\u1037\u103a\n\u101b\u1031\u1001\u1032\u101e\u103d\u102c\u1038\u1005\u1031\u1001\u103c\u1004\u103a\u1038"},STORE_SLOW:{EN:"Slow enemies\n70% for 5s",MY:"\u101b\u1014\u1039\u101e\u1030\u1094\u101c\u1088\u1015\u1039\u101b\u103d\u102c\u1038\u1019\u1088 70% \u1001\u1014\u1094\u1039\n5\u1005\u1000\u1060\u1014\u1094\u1039\u107e\u1000\u102c\u1031\u108f\u103d\u1038\u101e\u103c\u102c\u1038\u1031\u1005\u103b\u1001\u1004\u1039\u1038",MU:"\u101b\u1014\u103a\u101e\u1030\u1037\u101c\u103e\u102f\u1015\u103a\u101b\u103e\u102c\u1038\u1019\u103e\u102f 70%\u1001\u1014\u1037\u103a\n5\u1005\u1000\u1039\u1000\u1014\u1037\u103a\u1000\u103c\u102c\u1014\u103e\u1031\u1038\u101e\u103d\u102c\u1038\u1005\u1031\u1001\u103c\u1004\u103a\u1038"},STORE_ATTACK:{EN:"+50% Attack\nfor 5s",MY:"5\u1005\u1000\u1060\u1014\u1094\u1039\u107e\u1000\u102c \u1010\u102d\u102f\u1000\u1039\u1001\u102d\u102f\u1000\u1039\u1019\u1088\u1021\u102c\u1038\n50%\u1010\u102d\u102f\u1038\u1010\u1010\u1039\u1031\u1005\u103b\u1001\u1004\u1039\u1038",MU:"5\u1005\u1000\u1039\u1000\u1014\u1037\u103a\u1000\u103c\u102c \u1010\u102d\u102f\u1000\u103a\u1001\u102d\u102f\u1000\u103a\u1019\u103e\u102f\u1021\u102c\u1038\n50%\u1010\u102d\u102f\u1038\u1010\u1010\u103a\u1005\u1031\u1001\u103c\u1004\u103a\u1038"},STORE_INVISIBLE:{EN:"Be invisible\nfor 5s",MY:"5\u1005\u1000\u1060\u1014\u1094\u1039\u107e\u1000\u102c\n\u1000\u102d\u102f\u101a\u1039\u1031\u1016\u103a\u102c\u1000\u1039\u108f\u102d\u102f\u1004\u1039\u103b\u1001\u1004\u1039\u1038",MU:"5\u1005\u1000\u1039\u1000\u1014\u1037\u103a\u1000\u103c\u102c\n\u1000\u102d\u102f\u101a\u103a\u1016\u103b\u1031\u102c\u1000\u103a\u1014\u102d\u102f\u1004\u103a\u1001\u103c\u1004\u103a\u1038"},COLLECTION_DESC_1:{EN:"Collect all 10 sims to win",MY:"\u1006\u1004\u1039\u1038\u1000\u1012\u1039 \u1041\u1040\u1001\u102f\u1005\u102f\u1031\u1006\u102c\u1004\u1039\u1038\u107f\u1015\u102e\u1038",MU:"\u1006\u1004\u103a\u1038\u1000\u1012\u103a \u1041\u1040\u1001\u102f\u1005\u102f\u1006\u1031\u102c\u1004\u103a\u1038\u1015\u103c\u102e\u1038"},COLLECTION_DESC_2:{EN:"20,000,000 Kyats",MY:"20,000,000 Kyats",MU:"20,000,000 Kyats"},COLLECTION_DESC_3:{EN:"as Grand Prize.",MY:"\u1000\u102d\u102f\u1006\u102f\u1080\u1000\u102e\u1038\u101a\u1030\u1019\u100a\u1039",MU:"\u1000\u102d\u102f\u1006\u102f\u1000\u103c\u102e\u1038\u101a\u1030\u1019\u100a\u103a"},COLLECTION_DESC_4:{EN:"Play more to get more chance",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103a\u102c\u1038\u101b\u101a\u1030\u108f\u102d\u102f\u1004\u1039\u1019\u100a\u1037\u1039",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103b\u102c\u1038\u101b\u101a\u1030\u1014\u102d\u102f\u1004\u103a\u1019\u100a\u1037\u103a"},COLLECTION_DESC_5:{EN:"to win these amazing prizes!",MY:"\u1021\u1001\u103c\u1004\u1037\u1039\u1021\u1031\u101b\u1038\u1015\u102d\u102f\u101b\u1031\u1021\u102c\u1004\u1039\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b",MU:"\u1021\u1001\u103d\u1004\u1037\u103a\u1021\u101b\u1031\u1038\u1015\u102d\u102f\u101b\u1021\u1031\u102c\u1004\u103a\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b"},COLLECTION_DESC_6:{EN:"to win more prizes!",MY:"\u1021\u1001\u103c\u1004\u1037\u1039\u1021\u1031\u101b\u1038\u1015\u102d\u102f\u101b\u1031\u1021\u102c\u1004\u1039\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b",MU:"\u1021\u1001\u103d\u1004\u1037\u103a\u1021\u101b\u1031\u1038\u1015\u102d\u102f\u101b\u1021\u1031\u102c\u1004\u103a\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b"},COLLECTION_DESC_7:{EN:"Check your grand prize collection progress!",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u101b\u101a\u1030\u101b\u1014\u1039\u1005\u102f\u1031\u1006\u102c\u1004\u1039\u1038\u1019\u1088\u1019\u103a\u102c\u1038",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u101b\u101a\u1030\u101b\u1014\u103a\u1005\u102f\u1006\u1031\u102c\u1004\u103a\u1038\u1019\u103e\u102f\u1019\u103b\u102c\u1038"},COLLECTION_TARGET:{EN:"Your Target",MY:"\u101e\u1004\u1037\u1039\u101b\u100a\u1039\u1019\u103d\u1014\u1039\u1038\u1001\u103a\u1000\u1039",MU:"\u101e\u1004\u1037\u103a\u101b\u100a\u103a\u1019\u103e\u1014\u103a\u1038\u1001\u103b\u1000\u103a"},LB_DESC:{EN:"See how you compete with other players!",MY:"\u1021\u103b\u1001\u102c\u1038\u1000\u1005\u102c\u1038\u101e\u1019\u102c\u1038\u1031\u1010\u103c\u108f\u103d\u1004\u1037\u1039\u101a\u103d\u1025\u1039\u107f\u1015\u102d\u1033\u1004\u1039\u1019\u1088\u101b\u101c\u1012\u1039",MU:"\u1021\u1001\u103c\u102c\u1038\u1000\u1005\u102c\u1038\u101e\u1019\u102c\u1038\u1010\u103d\u1031\u1014\u103e\u1004\u1037\u103a\u101a\u103e\u1009\u103a\u1015\u103c\u102d\u102f\u1004\u103a\u1019\u103e\u102f\u101b\u101c\u1012\u103a"},LB_STAR_TITLE:{EN:"TOP STAR",MY:"TOP STAR",MU:"TOP STAR"},LB_STAR_DESC:{EN:"Top 10 weekly star collectors will receive 10,000Ks Emoney each",MY:"\u101a\u1001\u102f\u1021\u1015\u1010\u1039\u1021\u1010\u103c\u1000\u1039\u1011\u102d\u1015\u1039\u1010\u1014\u1039\u1038\u107e\u1000\u101a\u1039\u1021\u1019\u103a\u102c\u1038\u1005\u102f\u1006\u102f \u1041\u1040\u1031\u101a\u102c\u1000\u1039\n\u1005\u102c\u101b\u1004\u1039\u1038\u1010\u103c\u1004\u1039\u1015\u102b\u101d\u1004\u1039\u1015\u102b\u1000 Emoney \u1041\u1040,\u1040\u1040\u1040\u1000\u103a\u1015\u1039\u1005\u102e\u101b\u101b\u103d\u102d\u1015\u102b\u1019\u100a\u1039\u104b",MU:"\u101a\u1001\u102f\u1021\u1015\u1010\u103a\u1021\u1010\u103d\u1000\u103a\u1011\u102d\u1015\u103a\u1010\u1014\u103a\u1038\u1000\u103c\u101a\u103a\u1021\u1019\u103b\u102c\u1038\u1005\u102f\u1006\u102f \u1041\u1040\u101a\u1031\u102c\u1000\u103a\n\u1005\u102c\u101b\u1004\u103a\u1038\u1010\u103d\u1004\u103a\u1015\u102b\u101d\u1004\u103a\u1015\u102b\u1000 Emoney \u1041\u1040,\u1040\u1040\u1040\u1000\u103b\u1015\u103a\u1005\u102e\u101b\u101b\u103e\u102d\u1015\u102b\u1019\u100a\u103a\u104b"},LB_STAR_TIME:{EN:"Star Times",MY:"Star Times",MU:"Star Times"},LB_STARS:{EN:"Stars",MY:"Stars",MU:"Stars"},LB_SCORE_TITLE:{EN:"TOP SCORE",MY:"TOP SCORE",MU:"TOP SCORE"},LB_SCORE_TIMES:{EN:"Score time",MY:"Score time",MU:"Score time"},LB_SCORES:{EN:"Score",MY:"Score",MU:"Score"},LB_WINNER_TITLE:{EN:"WINNER LIST",MY:"\u1000\u1036\u1011\u1030\u1038\u101b\u103d\u1004\u1039\u1019\u103a\u102c\u1038",MU:"\u1000\u1036\u1011\u1030\u1038\u101b\u103e\u1004\u103a\u1019\u103b\u102c\u1038"},LB_WINNER_GRAND:{EN:"Grand Prizes",MY:"\u1011\u102d\u1015\u1039\u1010\u1014\u1039\u1038\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1011\u102d\u1015\u103a\u1010\u1014\u103a\u1038\u1006\u102f\u1019\u103b\u102c\u1038"},LB_WINNER_PREMIUM:{EN:"Premium Prizes",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103b\u102c\u1038"},LB_THIS_WEEK:{EN:"This Week",MY:"\u101a\u1001\u102f\u1021\u1015\u102b\u1010\u1039",MU:"\u101a\u1001\u102f\u1021\u1015\u102b\u1010\u103a"},LB_LAST_WEEK:{EN:"Last Week",MY:"\u101a\u1001\u1004\u1039\u1021\u1015\u102b\u1010\u1039",MU:"\u101a\u1001\u1004\u103a\u1021\u1015\u102b\u1010\u103a"},LB_PERIOD:{EN:"Period:",MY:"\u1021\u1001\u103a\u102d\u1014\u1039",MU:"\u1021\u1001\u103b\u102d\u1014\u103a"},GG_GIFT:{EN:"GIFTS",MY:"\u1006\u102f\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1019\u103a\u102c\u1038",MU:"\u1006\u102f\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1019\u103b\u102c\u1038"},GG_GIFT_SPECIAL:{EN:"SPECIAL PRIZES",MY:"\u1005\u1015\u102b\u101a\u1039\u101b\u103d\u101a\u1039\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1005\u1015\u102b\u101a\u103a\u101b\u103e\u101a\u103a\u1006\u102f\u1019\u103b\u102c\u1038"},GG_GUIDE:{EN:"GUIDE",MY:"\u101c\u1019\u1039\u1038\u106b\u108a\u1014\u1039\u1001\u103a\u1000\u1039",MU:"\u101c\u1019\u103a\u1038\u100a\u103d\u103e\u1014\u103a\u1001\u103b\u1000\u103a"},GG_GUIDE_01:{EN:"How to play game?",MY:"\u1002\u102d\u1019\u1039\u1038\u1018\u101a\u1039\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u101b\u1019\u101c\u1032",MU:"\u1002\u102d\u1019\u103a\u1038\u1018\u101a\u103a\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u101b\u1019\u101c\u1032"},GG_GUIDE_02:{EN:"How to view history?",MY:"History \u1000\u102d\u102f\u1018\u101a\u1039\u101c\u102d\u102f\u107e\u1000\u100a\u1037\u1039\u101b\u1019\u101c\u1032",MU:"History \u1000\u102d\u102f\u1018\u101a\u103a\u101c\u102d\u102f\u1000\u103c\u100a\u1037\u103a\u101b\u1019\u101c\u1032"},GG_GUIDE_03:{EN:"How to redeem gifts?",MY:"\u1006\u102f\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1031\u1010\u103c\u1018\u101a\u1039\u101c\u102d\u102f\u1011\u102f\u1010\u1039\u101a\u1030\u101b\u1019\u101c\u1032",MU:"\u1006\u102f\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1010\u103d\u1031\u1018\u101a\u103a\u101c\u102d\u102f\u1011\u102f\u1010\u103a\u101a\u1030\u101b\u1019\u101c\u1032"},GG_GUIDE_04:{EN:"How to to up sticks?",MY:"Stick \u101b\u1031\u1021\u102c\u1004\u1039\u1018\u101a\u1039\u101c\u102d\u102f\u101c\u102f\u1015\u1039\u101b\u1019\u101c\u1032",MU:"Stick \u101b\u1021\u1031\u102c\u1004\u103a\u1018\u101a\u103a\u101c\u102d\u102f\u101c\u102f\u1015\u103a\u101b\u1019\u101c\u1032"},HISTORY_DESC_1:{EN:"Get more turns after buying\nPackage/topup or buy at the Store!",MY:"\u1015\u1010\u1037\u1039\u1031\u1000\u1037\u1001\u1039\u103a\u101d\u101a\u1039\u101a\u1030\u107f\u1015\u102e\u1038\u104a\u1016\u102f\u1014\u1039\u1038\u1031\u1004\u103c\u103b\u1016\u100a\u1037\u1039\u107f\u1015\u102e\u1038\n(\u101e\u102d\u102f\u1094) \u1005\u1010\u102d\u102f\u1038\u1019\u103d\u101d\u101a\u1039\u101a\u1030\u107f\u1015\u102e\u1038\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1019\u103a\u102c\u1038\u1015\u102d\u102f\u1019\u102d\u102f\u101b\u101a\u1030\u1015\u102b",MU:"\u1015\u1010\u1037\u103a\u1000\u1031\u1037\u1001\u103a\u103b\u101d\u101a\u103a\u101a\u1030\u1015\u103c\u102e\u1038\u104a\u1016\u102f\u1014\u103a\u1038\u1004\u103d\u1031\u1016\u103c\u100a\u1037\u103a\u1015\u103c\u102e\u1038\n(\u101e\u102d\u102f\u1037) \u1005\u1010\u102d\u102f\u1038\u1019\u103e\u101d\u101a\u103a\u101a\u1030\u1015\u103c\u102e\u1038\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1019\u103b\u102c\u1038\u1015\u102d\u102f\u1019\u102d\u102f\u101b\u101a\u1030\u1015\u102b"},HISTORY_DESC_2:{EN:"Tap for details!",MY:"\u1021\u1031\u101e\u1038\u1005\u102d\u1010\u1039\u107e\u1000\u100a\u1037\u1039\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b",MU:"\u1021\u101e\u1031\u1038\u1005\u102d\u1010\u103a\u1000\u103c\u100a\u1037\u103a\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b"},HISTORY_DESC_3:{EN:"Check your received turns & prizes here!",MY:"\u101b\u101b\u103d\u102d\u1011\u102c\u1038\u101e\u100a\u1037\u1039\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1019\u103a\u102c\u1038\u108f\u103d\u1004\u1037\u1039\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u101b\u101b\u103e\u102d\u1011\u102c\u1038\u101e\u100a\u1037\u103a\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1019\u103b\u102c\u1038\u1014\u103e\u1004\u1037\u103a\u1006\u102f\u1019\u103b\u102c\u1038"},HISTORY_TURN:{EN:"TURN",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},HISTORY_TURNS:{EN:"Turn",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},HISTORY_PRIZE:{EN:"PRIZE",MY:"\u1006\u102f\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039",MU:"\u1006\u102f\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a"},HISTORY_GIFT:{EN:"Received Gifts",MY:"\u101b\u101b\u103d\u102d\u101e\u100a\u1037\u1039\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u101b\u101b\u103e\u102d\u101e\u100a\u1037\u103a\u1006\u102f\u1019\u103b\u102c\u1038"},HISTORY_LUCKY_CODE:{EN:"Lucky Code",MY:"\u101c\u1015\u1039\u1000\u102e\u1038\u1000\u102f\u1012\u1039",MU:"\u101c\u1015\u103a\u1000\u102e\u1038\u1000\u102f\u1012\u103a"},HISTORY_LUCKY_CODE_DESC:{EN:"Lucky Codes will be selected\nduring livestreams to win 20,000,000Ks",MY:"LiveStream \u1019\u103a\u102c\u1038\u1010\u103c\u1004\u1039 \u101c\u1015\u1039\u1000\u102e\u1038\u1000\u102f\u1012\u1039\u1019\u103a\u102c\u1038\u1019\u103d\n\u101e\u102d\u1014\u1039\u1038\u1042\u1040\u1040\u1000\u1036\u1011\u1030\u1038\u101b\u103d\u1004\u1039\u1031\u1090\u103c\u1038\u1001\u103a\u101a\u1039\u1015\u102b\u1019\u100a\u1039",MU:"LiveStream \u1019\u103b\u102c\u1038\u1010\u103d\u1004\u103a \u101c\u1015\u103a\u1000\u102e\u1038\u1000\u102f\u1012\u103a\u1019\u103b\u102c\u1038\u1019\u103e\n\u101e\u102d\u1014\u103a\u1038\u1042\u1040\u1040\u1000\u1036\u1011\u1030\u1038\u101b\u103e\u1004\u103a\u101b\u103d\u1031\u1038\u1001\u103b\u101a\u103a\u1015\u102b\u1019\u100a\u103a"},HISTORY_GIFT_CODE:{EN:"Emoney Gift Code",MY:"Emoney\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039",MU:"Emoney\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a"},HISTORY_GIFT_CODE_DESC_1:{EN:"Input Gift Code to claim\nyour emoney prize.",MY:"Emoney \u1006\u102f\u101a\u1030\u101b\u1014\u1039\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039\u1011\u100a\u1037\u1039\u1015\u102b",MU:"Emoney \u1006\u102f\u101a\u1030\u101b\u1014\u103a\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a\u1011\u100a\u1037\u103a\u1015\u102b"},HISTORY_GIFT_CODE_DESC_2:{EN:"Tap me to get MytelPay application!",MY:"MytelPay App \u101b\u101a\u1030\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b",MU:"MytelPay App \u101b\u101a\u1030\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b"},HISTORY_GIFT_CODE_DESC_3:{EN:"Gift code can be used one time only. You can claim\non MytelPay app and please do not share to anyone",MY:"\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039\u1019\u103a\u102c\u1038\u1000\u102d\u102f\u1010\u1005\u1039\u1080\u1000\u102d\u1019\u1039\u101e\u102c\u1021\u101e\u102f\u1036\u1038\u103b\u1015\u1033\u108f\u102d\u102f\u1004\u1039\u1015\u102b\u101e\u100a\u1039\u104b MytelPay \u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039\n\u1010\u103c\u1004\u1039\u1011\u100a\u1037\u1039\u101e\u103c\u1004\u1039\u1038\u101b\u1019\u100a\u1039\u103b\u1016\u1005\u1039\u107f\u1015\u102e\u1038 \u1010\u1005\u1039\u103b\u1001\u102c\u1038\u101e\u1030\u1000\u102d\u102f\u1019\u103d\u103a\u1031\u101d\u103b\u1001\u1004\u1039\u1038\u1019\u103b\u1015\u1033\u101c\u102f\u1015\u1039\u1015\u102b\u108f\u103d\u1004\u1037\u1039\u104b",MU:"\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a\u1019\u103b\u102c\u1038\u1000\u102d\u102f\u1010\u1005\u103a\u1000\u103c\u102d\u1019\u103a\u101e\u102c\u1021\u101e\u102f\u1036\u1038\u1015\u103c\u102f\u1014\u102d\u102f\u1004\u103a\u1015\u102b\u101e\u100a\u103a\u104b MytelPay \u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a\n\u1010\u103d\u1004\u103a\u1011\u100a\u1037\u103a\u101e\u103d\u1004\u103a\u1038\u101b\u1019\u100a\u103a\u1016\u103c\u1005\u103a\u1015\u103c\u102e\u1038 \u1010\u1005\u103a\u1001\u103c\u102c\u1038\u101e\u1030\u1000\u102d\u102f\u1019\u103b\u103e\u101d\u1031\u1001\u103c\u1004\u103a\u1038\u1019\u1015\u103c\u102f\u101c\u102f\u1015\u103a\u1015\u102b\u1014\u103e\u1004\u1037\u103a\u104b"},END_GAMEOVER:{EN:"Game Over",MY:"Game Over",MU:"Game Over"},END_BEST_SCORE:{EN:"BEST\nSCORE",MY:"\u1021\u1031\u1000\u102c\u1004\u1039\u1038\n\u1006\u102f\u1036\u1038\u101b\u1019\u103d\u1010\u1039",MU:"\u1021\u1000\u1031\u102c\u1004\u103a\u1038\n\u1006\u102f\u1036\u1038\u101b\u1019\u103e\u1010\u103a"},END_REPLAY:{EN:"PLAY AGAIN",MY:"\u1011\u1015\u1039\u200c\u1000\u1005\u102c\u1038",MU:"\u1011\u1015\u103a\u200c\u1000\u1005\u102c\u1038"},END_PRIZE:{EN:"YOU WON THESE AMAZING PRIZES",MY:"\u101e\u1004\u1039\u1031\u1021\u102c\u1000\u1039\u1015\u102b\u1006\u102f\u1080\u1000\u102e\u1038\u1019\u103a\u102c\u1038\u101b\u101b\u103d\u102d\u1015\u102b\u101e\u100a\u1039",MU:"\u101e\u1004\u103a\u1021\u1031\u102c\u1000\u103a\u1015\u102b\u1006\u102f\u1000\u103c\u102e\u1038\u1019\u103b\u102c\u1038\u101b\u101b\u103e\u102d\u1015\u102b\u101e\u100a\u103a"},TUTOR_TITLE:{EN:"How to play in 3 steps",MY:"\u1018\u101a\u1039\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u1019\u101c\u1032",MU:"\u1018\u101a\u103a\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u1019\u101c\u1032"},TUTOR_DESC_1:{EN:"Keep MoMo running as\nfar as possible",MY:"\u1019\u102d\u102f\u1019\u102d\u102f\u1000\u102d\u102f \u103b\u1019\u1014\u1039\u103b\u1019\u1014\u1039\u1031\u103b\u1015\u1038\u1001\u102d\u102f\u1004\u1039\u1038\u1015\u102b",MU:"\u1019\u102d\u102f\u1019\u102d\u102f\u1000\u102d\u102f \u1019\u103c\u1014\u103a\u1019\u103c\u1014\u103a\u1015\u103c\u1031\u1038\u1001\u102d\u102f\u1004\u103a\u1038\u1015\u102b"},TUTOR_DESC_2:{EN:"Swipe to kill enemies",MY:"\u101b\u1014\u1039\u101e\u1030\u101e\u1010\u1039\u101b\u1014\u1039\u101b\u1014\u1039\u101e\u1030\u1031\u1015\u105a\u1000\u102d\u102f\u1015\u103c\u1010\u1039\u1006\u103c\u1032\u1015\u102b",MU:"\u101b\u1014\u103a\u101e\u1030\u101e\u1010\u103a\u101b\u1014\u103a\u101b\u1014\u103a\u101e\u1030\u1015\u1031\u102b\u103a\u1000\u102d\u102f\u1015\u103d\u1010\u103a\u1006\u103d\u1032\u1015\u102b"},TUTOR_DESC_3:{EN:"Jump over water!",MY:"\u1031\u101b\u1031\u1021\u102c\u1000\u1039\u1019\u1000\u103a\u1031\u1021\u102c\u1004\u1039\u1001\u102f\u1014\u1039\u1015\u102b",MU:"\u101b\u1031\u1021\u1031\u102c\u1000\u103a\u1019\u1000\u103b\u1021\u1031\u102c\u1004\u103a\u1001\u102f\u1014\u103a\u1015\u102b"},GAME_MODE:{EN:"CHOOSE GAME MODE",MY:"\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u1039\u1015\u102f\u1036\u1005\u1036\u1031\u1090\u103c\u1038\u1015\u102b",MU:"\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u103a\u1015\u102f\u1036\u1005\u1036\u101b\u103d\u1031\u1038\u1015\u102b"},GAME_MODE_VOICE:{EN:"Use voice",MY:"\u1021\u101e\u1036\u103b\u1016\u1004\u1037\u1039",MU:"\u1021\u101e\u1036\u1016\u103c\u1004\u1037\u103a"},GAME_MODE_VOICE_DESC_1:{EN:"SCREAM\n2 JUMP",MY:"\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u1021\u101e\u1036\n\u1011\u103c\u1000\u1039\u1015\u102b",MU:"\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1021\u101e\u1036\n\u1011\u103d\u1000\u103a\u1015\u102b"},GAME_MODE_VOICE_DESC_2:{EN:"To play with voice input, you need to:",MY:"\u1021\u101e\u1036\u103b\u1016\u1004\u1037\u1039\u1000\u1005\u102c\u1038\u101b\u1014\u1039 \u101e\u1004\u1039\u101e\u100a\u1039",MU:"\u1021\u101e\u1036\u1016\u103c\u1004\u1037\u103a\u1000\u1005\u102c\u1038\u101b\u1014\u103a \u101e\u1004\u103a\u101e\u100a\u103a"},GAME_MODE_VOICE_DESC_3:{EN:"1. Enable MyID to access microphone.",MY:"1.\u1019\u102d\u102f\u1000\u1039\u1001\u1090\u102d\u102f\u1016\u102f\u1014\u1039\u1038\u1021\u101e\u102f\u1036\u1038\u103b\u1015\u1033\u101b\u1014\u1039MyID\u1000\u102d\u102f\u1001\u103c\u1004\u1037\u1039\u103b\u1015\u1033\u1011\u102c\u1038\u1015\u102b",MU:"1.\u1019\u102d\u102f\u1000\u103a\u1001\u101b\u102d\u102f\u1016\u102f\u1014\u103a\u1038\u1021\u101e\u102f\u1036\u1038\u1015\u103c\u102f\u101b\u1014\u103aMyID\u1000\u102d\u102f\u1001\u103d\u1004\u1037\u103a\u1015\u103c\u102f\u1011\u102c\u1038\u1015\u102b"},GAME_MODE_HAND:{EN:"Use hand",MY:"\u101c\u1000\u1039\u103b\u1016\u1004\u1037\u1039",MU:"\u101c\u1000\u103a\u1016\u103c\u1004\u1037\u103a"},GAME_MODE_HAND_DESC:{EN:"SHAKE\n2 JUMP",MY:"\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u1016\u102f\u1014\u1039\u1038\u1000\u102d\u102f\n\u101c\u1088\u1015\u1039\u1001\u102b\u1015\u102b",MU:"\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1016\u102f\u1014\u103a\u1038\u1000\u102d\u102f\n\u101c\u103e\u102f\u1015\u103a\u1001\u102b\u1015\u102b"},WARNING_VOICE_1:{EN:"VOICE INPUT\nNOT DETECTED",MY:"\u1021\u101e\u1036\u1001\u103c\u1004\u1037\u1039\u103b\u1015\u1033\n\u1011\u102c\u1038\u103b\u1001\u1004\u1039\u1038\u1019\u101b\u103d\u102d\u1015\u102b",MU:"\u1021\u101e\u1036\u1001\u103d\u1004\u1037\u103a\u1015\u103c\u102f\n\u1011\u102c\u1038\u1001\u103c\u1004\u103a\u1038\u1019\u101b\u103e\u102d\u1015\u102b"},WARNING_VOICE_2:{EN:"PLEASE CHOOSE",MY:"\u1031\u1090\u103c\u1038\u1001\u103a\u101a\u1039\u1015\u102b",MU:"\u101b\u103d\u1031\u1038\u1001\u103b\u101a\u103a\u1015\u102b"},WARNING_VOICE_3:{EN:"\u201cSHAKE 2 JUMP MODE\u201d",MY:"\u201cSHAKE 2 JUMP MODE\u201d",MU:'"SHAKE 2 JUMP MODE"'},GAME_GO:{EN:"GO!",MY:"GO!",MU:"GO!"},GAME_WAVE:{EN:"Wave",MY:"Wave",MU:"Wave"},GAME_ENEMY_NOTICE:{EN:"Enemies incoming in",MY:"\u101b\u1014\u1039\u101e\u1030\u1031\u1010\u103c\u101c\u102c\u101b\u1014\u1039",MU:"\u101b\u1014\u103a\u101e\u1030\u1010\u103d\u1031\u101c\u102c\u101b\u1014\u103a"},GAME_WATER_NOTICE:{EN:"Water incoming in",MY:"\u1031\u101b\u1031\u1000\u103a\u102c\u1039\u103b\u1016\u1010\u1039\u101b\u1014\u1039",MU:"\u101b\u1031\u1000\u103b\u1031\u102c\u103a\u1016\u103c\u1010\u103a\u101b\u1014\u103a"},GAME_REVIVE_TITLE:{EN:"Oops\u2026 Revive now?",MY:"\u1021\u101e\u1000\u1039\u1006\u1000\u1039\u101c\u1000\u1039\u101b\u103d\u1004\u1039\u101e\u1014\u1039\u1031\u1005\u1019\u101c\u102c\u1038",MU:"\u1021\u101e\u1000\u103a\u1006\u1000\u103a\u101c\u1000\u103a\u101b\u103e\u1004\u103a\u101e\u1014\u103a\u1005\u1031\u1019\u101c\u102c\u1038"},GAME_REVIVE_DESC:{EN:"Get full health and move to next wave",MY:"Health \u1021\u103b\u1015\u100a\u1037\u1039\u103b\u1016\u1004\u1037\u1039 \u1031\u1014\u102c\u1000\u1039 wave \u101e\u102d\u102f\u1094\u101e\u103c\u102c\u1038\u1019\u100a\u1039",MU:"Health \u1021\u1015\u103c\u100a\u1037\u103a\u1016\u103c\u1004\u1037\u103a \u1014\u1031\u102c\u1000\u103a wave \u101e\u102d\u102f\u1037\u101e\u103d\u102c\u1038\u1019\u100a\u103a"},"GG_GRAND PRIZE":{EN:"GRAND PRIZE",MY:"\u1011\u102d\u1015\u1039\u1010\u1014\u1039\u1038\u1006\u102f",MU:"\u1011\u102d\u1015\u103a\u1010\u1014\u103a\u1038\u1006\u102f"},"GG_PREMIUM PRIZE":{EN:"PREMIUM PRIZES",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103b\u102c\u1038"},ENEMY_COMMING_TUT:{EN:"SWIPE TO\nKILL ENEMIES",MY:"\u101b\u1014\u1039\u101e\u1030\u101e\u1010\u1039\u101b\u1014\u1039 \u101b\u1014\u1039\u101e\u1030\n\u1031\u1015\u105a\u1000\u102d\u102f\u1015\u103c\u1010\u1039\u1006\u103c\u1032\u1015\u102b",MU:"\u101b\u1014\u103a\u101e\u1030\u101e\u1010\u103a\u101b\u1014\u103a \u101b\u1014\u103a\u101e\u1030\n\u1015\u1031\u102b\u103a\u1000\u102d\u102f\u1015\u103d\u1010\u103a\u1006\u103d\u1032\u1015\u102b"},TUTOR_DESC_3_IOS:{EN:"Shake to jump\nover water!",MY:"\u1031\u101b\u1021\u1031\u1015\u105a\u101e\u102d\u102f\u1094\u1031\u101b\u102c\u1000\u1039\u1031\u1021\u102c\u1004\u1039\n\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u1016\u102f\u1014\u1039\u1038\u1000\u102d\u102f\u101c\u1088\u1015\u1039\u1001\u102b\u1015\u102b\u104b",MU:"\u101b\u1031\u1021\u1015\u1031\u102b\u103a\u101e\u102d\u102f\u1037\u101b\u1031\u102c\u1000\u103a\u1021\u1031\u102c\u1004\u103a\n\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1016\u102f\u1014\u103a\u1038\u1000\u102d\u102f\u101c\u103e\u102f\u1015\u103a\u1001\u102b\u1015\u102b\u104b"},GAME_MODE_VOICE_DESC_4:{EN:'2. Tap "ALLOW" whenever you play Speak 2 Jump',MY:'2.\u1021\u101e\u1036\u103b\u1016\u1004\u1037\u1039\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u1039\u1021\u1001\u102b\u1010\u102d\u102f\u1004\u1039\u1038 "ALLOW" \u1000\u102d\u102f\u1031\u1090\u103c\u1038\u1015\u102b',MU:'2.\u1021\u101e\u1036\u1016\u103c\u1004\u1037\u103a\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u103a\u1021\u1001\u102b\u1010\u102d\u102f\u1004\u103a\u1038 "ALLOW" \u1000\u102d\u102f\u101b\u103d\u1031\u1038\u1015\u102b'},STORE_BUY_WITH_500:{EN:"Buy with 500",MY:"\u1045\u1040\u1040 \u103b\u1016\u1004\u1037\u1039\u101d\u101a\u1039\u1019\u100a\u1039",MU:"\u1045\u1040\u1040 \u1016\u103c\u1004\u1037\u103a\u101d\u101a\u103a\u1019\u100a\u103a"},HISTORY_GIFT_CODE_DESC_4:{EN:"Tap me to to Follow Mytel fanpage!",MY:"Mytel Fanpage \u101e\u103c\u102c\u1038\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b\u104b",MU:"Mytel Fanpage \u101e\u103d\u102c\u1038\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b\u104b"},LB_WINNER_TITLE_2:{EN:"Collect all 10 sims to win 20,000,000 Kyats",MY:"\u1006\u1004\u1039\u1038\u1000\u1012\u1039\u1041\u1040\u1001\u102f\u1005\u102f\u1031\u1006\u102c\u1004\u1039\u1038\u107f\u1015\u102e\u1038 \u1031\u1004\u103c \u101e\u102d\u1014\u1039\u1038 \u1042\u1040\u1040\u101b\u101a\u1030\u1015\u102b\u104b",MU:"\u1006\u1004\u103a\u1038\u1000\u1012\u103a\u1041\u1040\u1001\u102f\u1005\u102f\u1006\u1031\u102c\u1004\u103a\u1038\u1015\u103c\u102e\u1038 \u1004\u103d\u1031 \u101e\u102d\u1014\u103a\u1038 \u1042\u1040\u1040\u101b\u101a\u1030\u1015\u102b\u104b"},WARNING_DESC:{EN:"Are you sure to quit this session?",MY:"\u101a\u1001\u102f\u1011\u103c\u1000\u1039\u1031\u1010\u102c\u1037\u1019\u103d\u102c\u1031\u101e\u1001\u103a\u102c\u1015\u102b\u101e\u101c\u102c\u1038\u104b",MU:"\u101a\u1001\u102f\u1011\u103d\u1000\u103a\u1010\u1031\u102c\u1037\u1019\u103e\u102c\u101e\u1031\u1001\u103b\u102c\u1015\u102b\u101e\u101c\u102c\u1038\u104b"},UI_ERROR:{EN:"Oops... Connection error!\nPlease try again later",MY:"\u1006\u1000\u1039\u101e\u103c\u101a\u1039\u1019\u1088\u103b\u1015\u1010\u1039\u1031\u1010\u102c\u1000\u1039\u1031\u1014\u1015\u102b\u101e\u103b\u1016\u1004\u1037\u1039\n\u103b\u1015\u1014\u1039\u101c\u100a\u1039\u1080\u1000\u102d\u1033\u1038\u1005\u102c\u1038\u1015\u102b\u104b",MU:"\u1006\u1000\u103a\u101e\u103d\u101a\u103a\u1019\u103e\u102f\u1015\u103c\u1010\u103a\u1010\u1031\u102c\u1000\u103a\u1014\u1031\u1015\u102b\u101e\u1016\u103c\u1004\u1037\u103a\n\u1015\u103c\u1014\u103a\u101c\u100a\u103a\u1000\u103c\u102d\u102f\u1038\u1005\u102c\u1038\u1015\u102b\u104b"},UI_CANCEL:{EN:"CANCEL",MY:"\u1011\u103c\u1000\u1039\u1019\u100a\u1039",MU:"\u1011\u103d\u1000\u103a\u1019\u100a\u103a"},UI_RETRY:{EN:"RETRY",MY:"\u103b\u1015\u1014\u1039\u101c\u102f\u1015\u1039\u1019\u100a\u1039",MU:"\u1015\u103c\u1014\u103a\u101c\u102f\u1015\u103a\u1019\u100a\u103a"},UI_QUIT:{EN:"QUIT",MY:"\u1011\u103c\u1000\u1039\u1001\u103c\u102c\u1019\u100a\u1039",MU:"\u1011\u103d\u1000\u103a\u1001\u103d\u102c\u1019\u100a\u103a"},UI_WRONG:{EN:"Oops\u2026\nSomething goes wrong!",MY:"\u1019\u103d\u102c\u1038\u101a\u103c\u1004\u1039\u1038\u1019\u1088\u103b\u1016\u1005\u1039\u1031\u1015\u105a\u1031\u1014\u1015\u102b\u101e\u100a\u1039\u104b",MU:"\u1019\u103e\u102c\u1038\u101a\u103d\u1004\u103a\u1038\u1019\u103e\u102f\u1016\u103c\u1005\u103a\u1015\u1031\u102b\u103a\u1014\u1031\u1015\u102b\u101e\u100a\u103a\u104b"},TUTOR_DESC_3_IOS_HAND:{EN:"Tap to jump\nover water!",MY:"\u1031\u101b\u1031\u1015\u105a\u1010\u103c\u1004\u1039\n\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b\u104b",MU:"\u101b\u1031\u1015\u1031\u102b\u103a\u1010\u103d\u1004\u103a\n\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b\u104b"},GAME_MODE_HAND_TAP_DESC:{EN:"TAP 2\nJUMP",MY:"\u1001\u102f\u1014\u1039\u101b\u1014\u1039\n\u108f\u103d\u102d\u1015\u1039\u1015\u102b\u104b",MU:"\u1001\u102f\u1014\u103a\u101b\u1014\u103a\n\u1014\u103e\u102d\u1015\u103a\u1015\u102b\u104b"},UI_NO_MORE_TURN:{EN:"OOPS... NO MORE PLAY TURNS.\nBUY AT STORE?",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1000\u102f\u1014\u1039\u1006\u102f\u1036\u1038\u101e\u103c\u102c\u1038\u1015\u102b\u107f\u1015\u102e\u104b\n \u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u101d\u101a\u1039\u101c\u102d\u102f\u1015\u102b\u101e\u101c\u102c\u1038\u104b",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1000\u102f\u1014\u103a\u1006\u102f\u1036\u1038\u101e\u103d\u102c\u1038\u1015\u102b\u1015\u103c\u102e\u104b\n\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u101d\u101a\u103a\u101c\u102d\u102f\u1015\u102b\u101e\u101c\u102c\u1038\u104b"},ENDGAME_ERROR_PRIZE:{EN:"Network unstable. \nPlease check History page\nlater for details.",MY:"\u1021\u1004\u103a\u1010\u102c\u1014\u1000\u103a\u1006\u1000\u103a\u101e\u103d\u101a\u103a\u1019\u103e\u102f \u1015\u103c\u1010\u103a\u1010\u1031\u102c\u1000\u103a\u1014\u1031\u1015\u102b\u101e\u1016\u103c\u1004\u1037\u103a \nHistory page \u1019\u103e \u1021\u1001\u103b\u1000\u103a\u1021\u101c\u1000\u103a \n\u1019\u103b\u102c\u1038\u1000\u102d\u102f \u1011\u1015\u103a\u1019\u1036\u1037 \u1005\u1005\u103a\u1006\u1031\u1038\u1015\u1031\u1038\u1015\u102b",MU:"\u1021\u1004\u103a\u1010\u102c\u1014\u1000\u103a\u1006\u1000\u103a\u101e\u103d\u101a\u103a\u1019\u103e\u102f \u1015\u103c\u1010\u103a\u1010\u1031\u102c\u1000\u103a\u1014\u1031\u1015\u102b\u101e\u1016\u103c\u1004\u1037\u103a \nHistory page \u1019\u103e \u1021\u1001\u103b\u1000\u103a\u1021\u101c\u1000\u103a \n\u1019\u103b\u102c\u1038\u1000\u102d\u102f \u1011\u1015\u103a\u1019\u1036\u1037 \u1005\u1005\u103a\u1006\u1031\u1038\u1015\u1031\u1038\u1015\u102b"}},cc._RF.pop()},{}]},{},["AudioController","Loader","PeerAction","PeerClientManager","PeerDefine","PeerManager","QRCodeGen","Popup","PopupManager","collisionReset","Events","Global","LoadingCover","LoadingIcon","Localization","SoundMgr","Spinner","cuboid","diamond","FrameMgr","GameDefine","GameManager","Ball","BallPhysics","Trail","FadeWall","GamePlayManager","LevelManager","GameplayLevelDesgin","ParticleManager","Sound","Spawn","TimeNeedTouch","TrajectoryLine","ObstaclesWallSpawner","WinDetect","playGround","playerBall","playerBallHitBox","Stage","StageGameEnd","StageInGame","StageLobby","StageMgr","StageQRscan","StageStartGame","StageTestGame","UIMgr","GameObject","Helper","LocalizedFrame","LocalizedText","ObjectMgr","Singleton","SingletonNode","Timer","levelDesign","strings"]); \ No newline at end of file diff --git a/assets/main/index.b205e.js b/assets/main/index.b205e.js deleted file mode 100644 index b8fd6a5..0000000 --- a/assets/main/index.b205e.js +++ /dev/null @@ -1 +0,0 @@ -window.__require=function e(t,o,n){function r(c,a){if(!o[c]){if(!t[c]){var s=c.split("/");if(s=s[s.length-1],!t[s]){var l="function"==typeof __require&&__require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+c+"'")}c=s}var p=o[c]={exports:{}};t[c][0].call(p.exports,function(e){return r(t[c][1][e]||e)},p,p.exports,e,t,o,n)}return o[c].exports}for(var i="function"==typeof __require&&__require,c=0;c=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0}),o.Audios=void 0;var c,a=e("./utils/SingletonNode"),s=cc._decorator,l=s.ccclass,p=s.property;(function(e){e[e.Booster=0]="Booster",e[e.BtnClick=1]="BtnClick",e[e.MCDie=2]="MCDie",e[e.EnemiesComing=3]="EnemiesComing",e[e.EnemyDie=4]="EnemyDie",e[e.FreezeSkill=5]="FreezeSkill",e[e.GameOver=6]="GameOver",e[e.GamePlayLoop=7]="GamePlayLoop",e[e.HomeLoop=8]="HomeLoop",e[e.InvisibleSkill=9]="InvisibleSkill",e[e.Jump=10]="Jump",e[e.MCHit=11]="MCHit",e[e.RageSkill=12]="RageSkill",e[e.Roarr=13]="Roarr",e[e.SlowSkill=14]="SlowSkill",e[e.SwipeOnEnemy=15]="SwipeOnEnemy",e[e.WaterComming=16]="WaterComming"})(c=o.Audios||(o.Audios={}));var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.AudioList=[],t.volume=1,t}return r(t,e),t.prototype.onLoad=function(){e.prototype.onLoad.call(this)},t.prototype.start=function(){},t.prototype.playAudioEffect=function(e,t){void 0===t&&(t=!1);var o=this.AudioList[e];return cc.audioEngine.playEffect(o,t)},t.prototype.stopAudioEffect=function(e){cc.audioEngine.stopEffect(e)},t.prototype.stopAllAudioEffect=function(){cc.audioEngine.stopAllEffects()},t.prototype.playButtonSound=function(){this.playAudioEffect(c.BtnClick)},t.prototype.setMute=function(){1==this.volume?(this.volume=0,cc.audioEngine.setEffectsVolume(0)):(this.volume=1,cc.audioEngine.setEffectsVolume(1))},i([p(cc.AudioClip)],t.prototype,"AudioList",void 0),i([l],t)}(a.default());o.default=u,cc._RF.pop()},{"./utils/SingletonNode":"SingletonNode"}],BlockSpawner:[function(e,t,o){"use strict";cc._RF.push(t,"6b13bIv6Y1C451Kh0ywajbh","BlockSpawner");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../Spawn"),a=cc._decorator,s=a.ccclass,l=(a.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._prefabsName={Block:"Block"},t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.SpawnThing=function(t,o){return e.prototype.SpawnThing.call(this,t,o)},t.prototype.Reset=function(){this.holder.removeAllChildren()},t.Instance=null,o=i([s],t)}(c.default));o.default=l,cc._RF.pop()},{"../Spawn":"Spawn"}],Block:[function(e,t,o){"use strict";cc._RF.push(t,"6e424L9UZtOCaum8SdoVNRD","Block");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0}),o.successDropState=void 0;var c,a=e("../GameManager/GameManager"),s=e("../Particle/ParticleManager");(function(e){e[e.perfect=0]="perfect",e[e.semiPerfect=1]="semiPerfect"})(c=o.successDropState||(o.successDropState={}));var l=cc._decorator,p=l.ccclass,u=l.property,d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.model=null,t.width=0,t.beginMove=!1,t.moveSpeed=1,t.moveDir=cc.Vec2.RIGHT,t.rangeMove=0,t.timeMove=0,t.successDropState={perfect:"perfect",notPerfect:"notPerfect"},t.currentState=null,t}return r(t,e),t.prototype.onEnable=function(){this.width=this.node.getContentSize().width},t.prototype.Rotate=function(e){var t=30;1==e&&(t*=-1),cc.tween(this.model).to(.1,{angle:t}).to(.3,{angle:0}).start()},t.prototype.Drop=function(e){var t=this;this.node.group="noContact",this.node.getComponent(cc.RigidBody).type=cc.RigidBodyType.Static,this.node.getComponent(cc.PhysicsBoxCollider).enabled=!1,this.node.getComponent(cc.RigidBody).enabled=!1,this.node.getComponent(cc.RigidBody).fixedRotation=!1,this.node.getChildByName("OtherBlockHitBox").active=!1,this.node.getChildByName("BlockHitBox").active=!1;var o;o=0==e?-1:1;var n=this.node.position;cc.tween(this.node).call(function(){t.node.getComponent(cc.RigidBody).enabled=!1}).to(.3,{angle:60*-o,position:new cc.Vec3(n.x+90*o,n.y-100,0)}).call(function(){t.node.active=!1}).start()},t.prototype.MoveSideToSide=function(e,t){var o=t*e.x,n=new cc.Vec2(0,0),r=cc.Vec2.lerp(n,this.node.getPosition(),new cc.Vec2(this.node.position.x+o,this.node.position.y),t);this.node.setPosition(r)},t.prototype.MoveToAline=function(e){var t=this.node.position;e>0?t=new cc.Vec3(t.x-e,t.y,0):e<0&&(t=new cc.Vec3(t.x+Math.abs(e),t.y,0)),cc.tween(this.node).to(.001,{position:t}).start()},t.prototype.CalculateRotateAngle=function(e,t){var o=this,n=100*Math.abs(e)/this.width;Math.abs(n)<=10&&Math.abs(n)>=0?(this.MoveToAline(e),a.default.Instance.AddBlock(this.node),this.node.getComponent(cc.RigidBody).type=cc.RigidBodyType.Static,a.default.Instance.topBlock=this.node,this.currentState=c.perfect,s.default.Instance.SpawnParticleForPerfectDrop(),console.log("PERFECT DROP")):Math.abs(n)>10&&Math.abs(n)<=45?(Math.abs(n)>=35&&this.Rotate(t),this.currentState=c.semiPerfect,a.default.Instance.AddBlock(this.node),this.node.getComponent(cc.RigidBody).type=cc.RigidBodyType.Static,a.default.Instance.topBlock=this.node,console.log("SEMI PERFECT DROP")):(this.node.getChildByName("OtherBlockHitBox").active=!1,this.node.getChildByName("BlockHitBox").active=!1,a.default.Instance.LoseLive(),this.Drop(t),console.log("Fail DROP"),a.default.Instance.shakeEffect.shakeNode(a.default.Instance.cam),this.scheduleOnce(function(){o.node.active=!1},.5))},t.prototype.update=function(){1==this.beginMove&&this.MoveSideToSide(this.moveDir,this.moveSpeed)},i([u(cc.Node)],t.prototype,"model",void 0),i([u(Number)],t.prototype,"rangeMove",void 0),i([u(Number)],t.prototype,"timeMove",void 0),i([p],t)}(cc.Component);o.default=d,cc._RF.pop()},{"../GameManager/GameManager":"GameManager","../Particle/ParticleManager":"ParticleManager"}],Camera:[function(e,t,o){"use strict";cc._RF.push(t,"a0c09ToLh1HdLsaAjSRhVi7","Camera");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.update=function(){},i([a],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],Chain:[function(e,t,o){"use strict";cc._RF.push(t,"740b5rh1lhIbL/VLg/LtKPM","Chain");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.revoJoint=null,t.rigi=null,t.swingSpeed=0,t.maxAngle=0,t.minAngle=0,t.isDisableSwing=!1,t.actualSpeedDir=0,t}return r(t,e),t.prototype.start=function(){this.rigi=this.node.getComponent(cc.RigidBody),this.actualSpeedDir=this.swingSpeed},t.prototype.update=function(e){this.ChangeDir(e)},t.prototype.clamp=function(e,t,o){return Math.min(Math.max(e,t),o)},t.prototype.ChangeDir=function(){this.node.angle>this.maxAngle&&this.node.angle<140?this.actualSpeedDir=-this.swingSpeed:this.node.angle-140&&(this.actualSpeedDir=this.swingSpeed),this.rigi.linearVelocity=new cc.Vec2(this.actualSpeedDir,0),this.node.angle=this.clamp(this.node.angle,this.minAngle,this.maxAngle)},i([s(cc.RevoluteJoint)],t.prototype,"revoJoint",void 0),i([s(Number)],t.prototype,"swingSpeed",void 0),i([s(Number)],t.prototype,"maxAngle",void 0),i([s(Number)],t.prototype,"minAngle",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],Events:[function(e,t,o){"use strict";cc._RF.push(t,"ea18dqOuq1Cx7O+U51FB9JD","Events");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},c=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../utils/SingletonNode"),a=cc._decorator,s=a.ccclass,l=a.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameHouse=[],t.frameBuilding=[],t}return r(t,e),i([l(cc.SpriteFrame)],t.prototype,"frameHouse",void 0),i([l(cc.SpriteFrame)],t.prototype,"frameBuilding",void 0),i([s],t)}(c.default());o.default=p,cc._RF.pop()},{"../utils/SingletonNode":"SingletonNode"}],GameDefine:[function(e,t,o){"use strict";cc._RF.push(t,"0722aPCpZtLXYBO1CTGdGFr","GameDefine"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=new function(){this.DiamondScore=2,this.PlayTime=300,this.player="VI"==window.language.toUpperCase()?"Ng\u01b0\u1eddi ch\u01a1i":"Player",this.died="VI"==window.language.toUpperCase()?"\u0111\xe3 ch\u1ebft.":"has died.",this.gameover="VI"==window.language.toUpperCase()?"K\u1ebeT TH\xdaC":"GAMEOVER",this.disconnect="VI"==window.language.toUpperCase()?"M\u1ea4T K\u1ebeT N\u1ed0I":"LOST CONNECTION",this.hasdisconnect="VI"==window.language.toUpperCase()?"\u0111\xe3 m\u1ea5t k\u1ebft n\u1ed1i.":"has been disconnected.",this.hosting="VI"==window.language.toUpperCase()?"s\u1ebd tr\u1edf th\xe0nh ch\u1ee7 ph\xf2ng.":"is now hosting."},cc._RF.pop()},{}],GameManager:[function(e,t,o){"use strict";cc._RF.push(t,"8dd1ej7a4pMcpsg0S4Tgp0f","GameManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../Block/Block"),a=e("../Block/BlockSpawner"),s=e("../Effect/ShakeEffect"),l=e("../UI/UIManager"),p=e("../chain/Rope"),u=cc._decorator,d=u.ccclass,f=u.property,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allBlock=[],t.cam=null,t.rope=null,t.numberOfBlockBeginToShake=0,t.movingDistance=90,t.moveSpeed=1,t.maxLive=3,t.shakeEffect=null,t.haveFirstBlock=!1,t.isAlive=!0,t.blockMoveDir=new cc.Vec2(1,0),t.isBlockMoving=!1,t.topBlock=null,t.timeNeedToMoveCam=0,t.currentLive=0,t.score=0,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this,cc.director.getPhysicsManager().enabled=!0,cc.director.getCollisionManager().enabled=!0},t.prototype.start=function(){this.currentLive=this.maxLive,this.cam=cc.Camera.findCamera(this.node.parent).node,this.shakeEffect=this.node.getComponent(s.default),console.log(this.cam)},t.prototype.AddBlock=function(e){this.allBlock.push(e),this.timeNeedToMoveCam++,console.log(this.timeNeedToMoveCam),1==this.haveFirstBlock&&this.AddScore(),this.timeNeedToMoveCam>3&&(this.rope.getComponent(p.default).MoveUp(),this.MoveCam()),this.allBlock.length>this.numberOfBlockBeginToShake?(this.isBlockMoving=!0,this.SetTowerMove(),this.MoveTheTower()):1==this.isBlockMoving&&(this.SetTowerMove(),this.MoveTheTower())},t.prototype.MoveTheTower=function(){for(var e=this.allBlock.length-1;e>=0;--e){var t=this.allBlock[e].getComponent(c.default);t.beginMove=!0,t.moveDir=this.blockMoveDir,t.moveSpeed=this.moveSpeed}},t.prototype.SetTowerMove=function(){this.allBlock.length>12&&(this.moveSpeed+=.05,this.movingDistance+=5,this.moveSpeed=cc.misc.clampf(this.moveSpeed,1,0),this.movingDistance=cc.misc.clampf(this.movingDistance,100,-100))},t.prototype.ReduceTowerMove=function(){this.allBlock.length>12&&(this.moveSpeed-=.05,this.movingDistance-=5,this.moveSpeed=cc.misc.clampf(this.moveSpeed,1,0),this.movingDistance=cc.misc.clampf(this.movingDistance,100,-100))},t.prototype.DropMulBlock=function(e){for(var t=this.allBlock.indexOf(e),o=0,n=this.allBlock.length-1;n>=t&&1!=this.allBlock.length;--n){var r=this.allBlock.pop().getComponent(c.default);if(r.Drop(!0),r.Rotate(!0),this.ReduceTowerMove(),this.allBlock.length>=3&&o++,3==o)break}this.allBlock.length>=1?(this.topBlock=this.allBlock[this.allBlock.length-1],1==this.allBlock.length?this.timeNeedToMoveCam=1:this.timeNeedToMoveCam=this.allBlock.length):(this.haveFirstBlock=!1,this.topBlock=null),this.rope.getComponent(p.default).MoveDown(o),this.MoveCamDown(o),this.LoseLive()},t.prototype.MoveCam=function(){l.default.Instance.MoveUIUp(),cc.tween(this.cam).to(.5,{position:new cc.Vec3(this.cam.getPosition().x,this.cam.getPosition().y+51,0)}).start()},t.prototype.CheckTopBlockReachTarget=function(){var e=this.node.convertToNodeSpaceAR(this.topBlock.parent.convertToWorldSpaceAR(this.topBlock.getPosition()));return(e.x>=this.movingDistance||e.x<=-this.movingDistance)&&(e.x>=this.movingDistance?this.blockMoveDir.x=-1:e.x<=-this.movingDistance&&(this.blockMoveDir.x=1),!0)},t.prototype.MoveCamDown=function(e){var t=this;l.default.Instance.MoveUIDown(e),cc.tween(this.cam).to(.3,{position:new cc.Vec3(this.cam.getPosition().x,this.cam.getPosition().y-Math.abs(51*e),0)}).call(function(){t.node.getComponent(s.default).shakeNode(t.cam)}).start()},t.prototype.LoseLive=function(){1==this.isAlive&&(l.default.Instance.remainLiveUI.setLive(--this.currentLive),this.currentLive<=0&&(this.GameOver(),this.isAlive=!1))},t.prototype.GameOver=function(){console.log("Lose"),this.isAlive=!1,l.default.Instance.GameOverPopup()},t.prototype.AddScore=function(){l.default.Instance.plusScore(++this.score)},t.prototype.ResetGame=function(){this.isAlive=!0,this.currentLive=this.maxLive,this.topBlock=null,this.timeNeedToMoveCam=0,this.haveFirstBlock=!1,this.allBlock.length=0,this.moveSpeed=0,this.movingDistance=0,this.isBlockMoving=!1,this.score=0,l.default.Instance.scoreUI.setScore(0),l.default.Instance.remainLiveUI.setLive(this.maxLive),l.default.Instance.Reset(),a.default.Instance.Reset(),this.ResetCamera(),this.rope.getComponent(p.default).Reset()},t.prototype.ResetCamera=function(){cc.tween(this.cam).to(.3,{position:new cc.Vec3(0,0,0)}).start()},t.prototype.update=function(){1==this.isBlockMoving&&this.CheckTopBlockReachTarget()&&(console.log("this.CheckTopBlockReachTarget()",this.CheckTopBlockReachTarget()),this.MoveTheTower())},t.Instance=null,i([f(cc.Node)],t.prototype,"rope",void 0),i([f(Number)],t.prototype,"numberOfBlockBeginToShake",void 0),i([f(Number)],t.prototype,"movingDistance",void 0),i([f(Number)],t.prototype,"moveSpeed",void 0),i([f(Number)],t.prototype,"maxLive",void 0),o=i([d],t)}(cc.Component);o.default=h,cc._RF.pop()},{"../Block/Block":"Block","../Block/BlockSpawner":"BlockSpawner","../Effect/ShakeEffect":"ShakeEffect","../UI/UIManager":"UIManager","../chain/Rope":"Rope"}],GameObject:[function(e,t,o){"use strict";cc._RF.push(t,"ac648lWW65FVL6lqaVqOgIb","GameObject");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.load=function(){},t.prototype.kill=function(){this.node.active=!1},i([a],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],Global:[function(e,t,o){"use strict";cc._RF.push(t,"d20a0HD4J5Lx6vX5OXcGy4+","Global");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.backAppTime=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.Instance=null,o=i([a],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],Ground:[function(e,t,o){"use strict";cc._RF.push(t,"0ae18+eAF1EAoKkp5bUoRQp","Ground");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../GameManager/GameManager"),a=cc._decorator,s=a.ccclass,l=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.onBeginContact=function(e,t,o){0==c.default.Instance.haveFirstBlock?(c.default.Instance.haveFirstBlock=!0,c.default.Instance.AddScore()):(o.node.active=!1,c.default.Instance.LoseLive())},t.Instance=null,o=i([s],t)}(cc.Component));o.default=l,cc._RF.pop()},{"../GameManager/GameManager":"GameManager"}],HelloWorld:[function(e,t){"use strict";cc._RF.push(t,"280c3rsZJJKnZ9RqbALVwtK","HelloWorld"),cc.Class({extends:cc.Component,properties:{label:{default:null,type:cc.Label},text:"Hello, World!"},onLoad:function(){this.label.string=this.text},update:function(){}}),cc._RF.pop()},{}],Helper:[function(e,t,o){"use strict";cc._RF.push(t,"90a75udUmlJUqYerDKv5BZf","Helper"),Object.defineProperty(o,"__esModule",{value:!0});var n=e("../PeerComponent/PeerManager");o.default=new(function(){function e(){}return e.prototype.Rand=function(e,t){return Math.random()*(t-e)+e},e.prototype.RandInt=function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},e.prototype.RandArgument=function(){for(var e=[],t=0;to.x+o.width||t>o.y+o.height)},e.prototype.Distance=function(e,t,o,n){return Math.sqrt((e-o)*(e-o)+(t-n)*(t-n))},e.prototype.Constrain=function(e,t,o){return e=Math.max(t,e),Math.min(o,e)},e.prototype.ToRadian=function(e){return e/180*Math.PI},e.prototype.ToAngle=function(e){return e/Math.PI*180},e.prototype.TimeoutPromise=function(e,t){var o=new Promise(function(t,o){setTimeout(function(){o("Timed out.")},e)});return Promise.race([t,o])},e.prototype.HttpRequest=function(e,t,o,n,r,i){void 0===r&&(r=null),void 0===i&&(i={});var c=window.logEvent||console.log,a=Date.now(),s=t.split("/").pop().split("?").shift();return new Promise(function(l,p){var u=new XMLHttpRequest;u.open(e,t,!0),"POST"==e&&u.setRequestHeader("Content-Type","application/json");for(var d=0,f=r;du?r%u:r,i=(i=u-(i+=d+c))>u?i%u:i,e.lineWidth=l,e.strokeColor=s,e.arc(t,o,n,r,i,a),p&&(e.lineTo(t,o),e.close()),e.stroke()},e.prototype.DrawCircle=function(e,t,o,n,r,i){void 0===r&&(r=cc.Color.RED),void 0===i&&(i=2),this.DrawEllipse(e,t,o,n,n,r,i)},e.prototype.DrawEllipse=function(e,t,o,n,r,i,c){void 0===i&&(i=cc.Color.RED),void 0===c&&(c=2),e.lineWidth=c,e.strokeColor=i,e.ellipse(t,o,n,r),e.stroke()},e.prototype.FillSquare=function(e,t,o,n,r){void 0===r&&(r=cc.Color.RED),this.FillRect(e,t,o,n,n,r)},e.prototype.FillRect=function(e,t,o,n,r,i){void 0===i&&(i=cc.Color.RED),e.fillColor=i,this.DrawRect(e,t,o,n,r,i,0),e.fill()},e.prototype.FillArc=function(e,t,o,n,r,i,c,a,s){void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),void 0===c&&(c=0),void 0===a&&(a=!0),void 0===s&&(s=cc.Color.RED),e.fillColor=s,this.DrawArc(e,t,o,n,r,i,c,a,void 0,0,!0),e.fill()},e.prototype.FillCircle=function(e,t,o,n,r){void 0===r&&(r=cc.Color.RED),this.FillEllipse(e,t,o,n,n,r)},e.prototype.FillEllipse=function(e,t,o,n,r,i){void 0===i&&(i=cc.Color.RED),e.fillColor=i,this.DrawEllipse(e,t,o,n,r,i,0),e.fill()},e.prototype.getControllerURL=function(){var e=window.controllerURL;if(e&&""!=e)return""+e+n.default.Instance.sip},e}()),cc._RF.pop()},{"../PeerComponent/PeerManager":"PeerManager"}],LiveUI:[function(e,t,o){"use strict";cc._RF.push(t,"89c93v4xZVGqJ6zzZ9Q+iJt","LiveUI");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../GameManager/GameManager"),a=cc._decorator,s=a.ccclass,l=a.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.live=null,t}return r(t,e),t.prototype.start=function(){this.setLive(c.default.Instance.maxLive)},t.prototype.setLive=function(e){this.live.string="Live: "+e.toString()},i([l(cc.Label)],t.prototype,"live",void 0),i([s],t)}(cc.Component);o.default=p,cc._RF.pop()},{"../GameManager/GameManager":"GameManager"}],Loader:[function(e,t,o){"use strict";cc._RF.push(t,"1b8496GkHdFirfeeZ/dlzhB","Loader");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=new URLSearchParams(window.location.search);window.language=c.get("language")||"vi",cc.assetManager.force=!0,cc.assetManager.loadBundle(window.language,null,function(e,t){console.log(t)});var a=cc._decorator,s=a.ccclass,l=a.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.SystemPrefabs=[],t.PlaceHolderPrefabs=[],t}return r(t,e),t.prototype.onLoad=function(){for(var e=0;e=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../utils/SingletonNode"),a=cc._decorator,s=a.ccclass,l=a.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.Container=null,t}return r(t,e),t.prototype.onLoad=function(){e.prototype.onLoad.call(this),this.hide()},t.prototype.show=function(){this.Container.active=!0},t.prototype.hide=function(){this.Container.active=!1},i([l(cc.Node)],t.prototype,"Container",void 0),i([s],t)}(c.default());o.default=p,cc._RF.pop()},{"../utils/SingletonNode":"SingletonNode"}],LoadingIcon:[function(e,t,o){"use strict";cc._RF.push(t,"be9ed13DexHaZjgDih502/F","LoadingIcon");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./Spinner"),a=cc._decorator,s=a.ccclass,l=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.show=function(){this.node.active=!0},t.prototype.hide=function(){this.node.active=!1},i([s],t)}(c.default));o.default=l,cc._RF.pop()},{"./Spinner":"Spinner"}],Localization:[function(e,t,o){"use strict";cc._RF.push(t,"bd45doTXaVJGazSbf1+Ekni","Localization");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0}),o.TextTransforms=o.LOCALIZATION_ENUM=o.LOCALIZATION_KEYS=void 0;var c=cc._decorator,a=c.ccclass,s=(c.property,e("../../strings")),l=e("./Events"),p={};o.LOCALIZATION_KEYS=Object.keys(s);for(var u=0;u=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.EN=null,t.VI=null,t}return r(t,e),t.prototype.start=function(){var e=this.node.getComponent(cc.Sprite),t=e.spriteFrame;e.spriteFrame=this[window.language.toUpperCase()]||t},i([s(cc.SpriteFrame)],t.prototype,"EN",void 0),i([s(cc.SpriteFrame)],t.prototype,"VI",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],LocalizedText:[function(e,t,o){"use strict";cc._RF.push(t,"d9adbSs7VdIeaPiYGmWgXvR","LocalizedText");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.EN="",t.VI="",t}return r(t,e),t.prototype.start=function(){var e=this.node.getComponent(cc.Label),t=e.string;e.string=this[window.language.toUpperCase()]||t},i([s({type:String,multiline:!0})],t.prototype,"EN",void 0),i([s({type:String,multiline:!0})],t.prototype,"VI",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],ObjectMgr:[function(e,t,o){"use strict";cc._RF.push(t,"dbc77ws+sxPlY9zPANdJYTf","ObjectMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.load=function(){},t.prototype.init=function(){this.hide()},t.prototype.hide=function(){for(var e=0,t=this.node.children;e=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../GameManager/GameManager"),a=e("./Block"),s=cc._decorator,l=s.ccclass,p=(s.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.thisBlock=null,t}return r(t,e),t.prototype.start=function(){this.thisBlock=this.node.parent.getComponent(a.default)},t.prototype.onCollisionEnter=function(e,t){if(e.node.parent!=t.node.parent){e.node.parent.getComponent(a.default);var o=e.node.parent.convertToNodeSpaceAR(this.node.parent.convertToWorldSpaceAR(this.node.getPosition()));e.node.parent==c.default.Instance.topBlock?(e.node.getPosition(),o.x>=0?this.thisBlock.CalculateRotateAngle(o.x,!0):this.thisBlock.CalculateRotateAngle(o.x,!1)):1==c.default.Instance.allBlock.includes(e.node.parent)&&(o.x>=0?(this.thisBlock.Drop(!0),this.thisBlock.Rotate(!0)):(this.thisBlock.Drop(!1),this.thisBlock.Rotate(!1)),this.enabled=!1,this.node.active=!1,c.default.Instance.DropMulBlock(e.node.parent))}},i([l],t)}(cc.Component));o.default=p,cc._RF.pop()},{"../GameManager/GameManager":"GameManager","./Block":"Block"}],OutOfBoundLine:[function(e,t,o){"use strict";cc._RF.push(t,"255d8KVHjlEaqBdheu+/5ax","OutOfBoundLine");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./Block/Block"),a=e("./GameManager/GameManager"),s=cc._decorator,l=s.ccclass,p=(s.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.onCollisionEnter=function(e){null==e.node.parent.getComponent(c.default).currentState?(e.node.parent.active=!1,a.default.Instance.LoseLive()):0==a.default.Instance.haveFirstBlock&&1==a.default.Instance.allBlock.length&&a.default.Instance.GameOver()},i([l],t)}(cc.Component));o.default=p,cc._RF.pop()},{"./Block/Block":"Block","./GameManager/GameManager":"GameManager"}],ParticleManager:[function(e,t,o){"use strict";cc._RF.push(t,"10a64+EnhJATawTbpcBHmDl","ParticleManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../GameManager/GameManager"),a=e("../Spawn"),s=cc._decorator,l=s.ccclass,p=(s.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._particleName={PrefectDropParticle:"PrefectDropParticle"},t}var o;return r(t,e),o=t,t.prototype.start=function(){o.Instance=this},t.prototype.SpawnParticleForPerfectDrop=function(){var e=this;console.log("SPAWN");var t=c.default.Instance.topBlock;t.getChildByName("ParticleSpawnPlace").children.forEach(function(o){var n=e.node.convertToNodeSpace(t.convertToWorldSpaceAR(o.getPosition()));e.SpawnThing(n,e._particleName.PrefectDropParticle)})},t.prototype.ConvertToWorld=function(){},t.Instance=null,o=i([l],t)}(a.default));o.default=p,cc._RF.pop()},{"../GameManager/GameManager":"GameManager","../Spawn":"Spawn"}],PeerAction:[function(e,t,o){"use strict";cc._RF.push(t,"1c65drFRtpG/LO3xlybZ0cn","PeerAction");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0}),o.PeerType=void 0;var c,a=e("./PeerClientManager"),s=e("./PeerDefine"),l=e("./PeerManager");(function(e){e[e.NONE=0]="NONE",e[e.SEND=1]="SEND",e[e.RECEIVE=2]="RECEIVE"})(c=o.PeerType||(o.PeerType={}));var p=cc._decorator,u=p.ccclass,d=p.property,f=function(){function e(){this.actionName=s.PeerActionType.NONE,this.eventHandler=[],this.customMessage=""}return i([d({type:cc.Enum(s.PeerActionType)})],e.prototype,"actionName",void 0),i([d(cc.Component.EventHandler)],e.prototype,"eventHandler",void 0),i([d()],e.prototype,"customMessage",void 0),i([u("PeerHandler")],e)}(),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=c.NONE,t.actionPhase=s.PeerPhase.NONE,t.actionHandler=[],t.actionName=s.PeerActionType.NONE,t.eventHandler=[],t.customMessage="",t.playerSIP=null,t}return r(t,e),t.prototype.onLoad=function(){switch(this.type){case c.NONE:break;case c.SEND:this.node.on(cc.Node.EventType.TOUCH_END,this.hanleSubmit.bind(this));break;case c.RECEIVE:return}},t.prototype.hanleSubmit=function(){if(this.node.active){for(var e=0,t=this.eventHandler;e=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./PeerDefine"),a=e("./PeerManager"),s=cc._decorator,l=s.ccclass,p=(s.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.masterSIP=0,t.currentID=0,t.currentMainPlayerID=0,t.isMainPlayer=!1,t.isConnected=!1,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){e.prototype.onLoad.call(this),o.Instance=this;var t=new URLSearchParams(window.location.search);this.masterSIP=parseInt(t.get("sip"))||0,console.log("masterSIP: "+this.masterSIP),delete this.setConnectedCB,delete this.setDisConnectCB,delete this.getClients},t.prototype.setClientConnectedCB=function(e){this.connectedCB=e},t.prototype.setClientDisconnectCB=function(e){this.disconnectCB=e},t.prototype.IsConnected=function(){return this.isConnected},t.prototype.IsMainPlayer=function(){return this.isMainPlayer},t.prototype.update=function(t){e.prototype.update.call(this,t)},t.prototype.init=function(){e.prototype.init.call(this)},t.prototype.connect=function(){var e=this,t=setInterval(function(){if(e.isInitalized){clearInterval(t);var o=cc.sys.localStorage.getItem("masterSIP");if(o&&o==e.masterSIP&&!e.isConnected)return e.reconnect(function(t){switch(cc.sys.localStorage.setItem("localSIP",e.sip),t.currentStage){case c.PeerStage.PLAYING:case c.PeerStage.WAITING:}}),void setTimeout(function(){e.isConnected||(e.disconnectCB&&e.disconnectCB(),e.clientTimeoutPingPong&&clearTimeout(e.clientTimeoutPingPong),e.clientIntervalPing&&clearInterval(e.clientIntervalPing),e.isConnected=!1)},c.default.TIMEOUT_RETRY);cc.sys.localStorage.setItem("localSIP",e.sip),cc.sys.localStorage.setItem("masterSIP",e.masterSIP);var n={phase:c.PeerPhase.CONNECT,action:c.PeerActionConnect.CONNECTING,customParam:""};e.sendMessage(n),setTimeout(function(){e.isConnected||(e.disconnectCB&&e.disconnectCB(),e.clientTimeoutPingPong&&clearTimeout(e.clientTimeoutPingPong),e.clientIntervalPing&&clearInterval(e.clientIntervalPing),e.isConnected=!1)},c.default.TIMEOUT_RETRY)}},1e3)},t.prototype.reconnect=function(e){void 0===e&&(e=null),cc.log("reconnect"),this.reconnectCB=e;var t=0|cc.sys.localStorage.getItem("localSIP"),o={phase:c.PeerPhase.CONNECT,action:c.PeerActionConnect.CONNECT_RETRY,customParam:""+t};this.sendMessage(o)},t.prototype.sendMessage=function(e){this.masterSIP&&this.peer.sendTo(this.masterSIP,JSON.stringify(e))},t.prototype.onRecievedMessage=function(e){var t=JSON.parse(e);if(t.phase!=c.PeerPhase.CONNECT&&console.log(e),t.phase!=c.PeerPhase.CONNECT)a.default.emit(a.default.EventReceivedMessage,t),this.onmessage&&this.onmessage(e);else switch(t.action){case c.PeerActionConnect.CONNECTED:this.isMainPlayer="mainPlayer"==t.customParam,this.isConnected=!0,this.currentID=t.currentID,this.currentMainPlayerID=t.currentMainPlayerID,this.connectedCB&&this.connectedCB(),this.setClientPing(),a.default.emit(a.default.EventSwitchMainPlayer,this.isMainPlayer);break;case c.PeerActionConnect.CONNECT_FAILED:this.isConnected=!1,this.disconnectCB&&this.disconnectCB();break;case c.PeerActionConnect.SWITCH_MAINPLAYER:this.isMainPlayer=this.currentID==t.currentMainPlayerID,this.currentMainPlayerID=t.currentMainPlayerID,a.default.emit(a.default.EventSwitchMainPlayer,this.isMainPlayer);break;case c.PeerActionConnect.PING_PONG:this.clientUpdatePingPong();break;case c.PeerActionConnect.CONNECT_RETRY_SUCCESS:this.isMainPlayer="mainPlayer"==t.customParam,this.isConnected=!0,this.currentID=t.currentID,this.currentMainPlayerID=t.currentMainPlayerID,this.reconnectCB&&this.reconnectCB(t),this.reconnectCB=null,this.setClientPing(),a.default.emit(a.default.EventSwitchMainPlayer,this.isMainPlayer),cc.log("reconnect success")}},t.prototype.setClientPing=function(){var e=this;this.clientIntervalPing=setInterval(function(){var t={action:c.PeerActionConnect.PING_PONG,phase:c.PeerPhase.CONNECT,customParam:"Ping"};e.sendMessage(t)},c.default.PING_TIMER)},t.prototype.clientUpdatePingPong=function(){var e=this;this.clientTimeoutPingPong&&clearTimeout(this.clientTimeoutPingPong),this.clientTimeoutPingPong=setTimeout(function(){e.disconnectCB&&e.disconnectCB(),clearTimeout(e.clientTimeoutPingPong),clearInterval(e.clientIntervalPing),e.isConnected=!1,console.log("disconnect")},c.default.TIMEOUT_DISCONNECT)},t.Instance=null,o=i([l],t)}(a.default));o.default=p,cc._RF.pop()},{"./PeerDefine":"PeerDefine","./PeerManager":"PeerManager"}],PeerDefine:[function(e,t,o){"use strict";cc._RF.push(t,"6d3cf1QRs9NY4n4TNnuAi/J","PeerDefine"),Object.defineProperty(o,"__esModule",{value:!0}),o.PeerActionType=o.PeerActionConnect=o.PeerStage=o.PeerPhase=void 0,o.default=new function(){this.MAX_CLIENT=3,this.TIMEOUT_DISCONNECT=3e3,this.PING_TIMER=1e3,this.TIMEOUT_RETRY=5e3},function(e){e[e.NONE=0]="NONE",e[e.CONNECT=1]="CONNECT",e[e.START_SCREEN=2]="START_SCREEN",e[e.WAITING=3]="WAITING",e[e.SCAN_QR=4]="SCAN_QR",e[e.INGAME=5]="INGAME",e[e.GAMEOVER=6]="GAMEOVER"}(o.PeerPhase||(o.PeerPhase={})),function(e){e[e.PLAYING=0]="PLAYING",e[e.WAITING=1]="WAITING"}(o.PeerStage||(o.PeerStage={})),function(e){e[e.CONNECTING=0]="CONNECTING",e[e.CONNECTED=1]="CONNECTED",e[e.CONNECT_FAILED=2]="CONNECT_FAILED",e[e.CONNECT_RETRY=3]="CONNECT_RETRY",e[e.CONNECT_RETRY_SUCCESS=4]="CONNECT_RETRY_SUCCESS",e[e.SWITCH_MAINPLAYER=5]="SWITCH_MAINPLAYER",e[e.PING_PONG=6]="PING_PONG"}(o.PeerActionConnect||(o.PeerActionConnect={})),function(e){e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e[e.ENTER=5]="ENTER",e[e.NEXT=6]="NEXT",e[e.BACK=7]="BACK",e[e.CUSTOM=8]="CUSTOM",e[e.JUMP=9]="JUMP",e[e.ENDGAME=10]="ENDGAME",e[e.REPLAY=11]="REPLAY",e[e.HOME=12]="HOME",e[e.HOLD=13]="HOLD",e[e.RELEASE=14]="RELEASE",e[e.ROTATE=15]="ROTATE",e[e.SHOW=16]="SHOW"}(o.PeerActionType||(o.PeerActionType={})),cc._RF.pop()},{}],PeerManager:[function(e,t,o){"use strict";cc._RF.push(t,"f9ace5O2YJCy7edETP5LCWv","PeerManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},c=this&&this.__spreadArrays||function(){for(var e=0,t=0,o=arguments.length;t0?o.switchMainPlayer(n):(p.default.show(p.Stages.StageQRscan),o.isPlayWithRemote=!0,o.isPlayingGame=!1))},u.default.TIMEOUT_DISCONNECT))},t.prototype.switchMainPlayer=function(e){for(var t=0,o=this.clientConnected;t=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.speed=400,t.limit=10,t.randomStart=!1,t.random=0,t}return r(t,e),t.prototype.onLoad=function(){this.randomStart&&(this.random=this.randomInRange(0,1))},t.prototype.randomInRange=function(e,t){return Math.random()*(t-e)+e},t.prototype.update=function(){var e=this.limit*Math.sin(tim+this.random*this.speed);this.node.angle=e,console.log(e)},i([a],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],Pen:[function(e,t,o){"use strict";cc._RF.push(t,"9b988keymVDZrIuwhVl2HW4","Pen");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),i([a],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],PopupManager:[function(e,t,o){"use strict";cc._RF.push(t,"30835F+tMxLu4+MZ1zfvBzu","PopupManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0}),o.Popups=void 0;var c,a=e("../utils/Helper"),s=e("../utils/SingletonNode"),l=cc._decorator,p=l.ccclass,u=l.property;c=o.Popups||(o.Popups={});var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PopupBackground=null,t.PopupContainer=null,t.ShownPopups=null,t.PopupPrefabs=[],t}return r(t,e),t.push=function(e,t){void 0===t&&(t=!0);var o=this.Instance,n=o.PopupContainer.getChildByName(c[e]);n&&(o.usePopup(n),o.animate(!0,n),o.PopupBackground.active=t)},t.pop=function(){var e=this.Instance;if(e.ShownPopups.children.length>0){var t=e.ShownPopups.children[e.ShownPopups.children.length-1];e.PopupBackground.active=e.ShownPopups.children.length-1>0,e.animate(!1,t)}},t.hide=function(e){var t=this.Instance,o=t.ShownPopups.getChildByName(c[e]);o&&t.animate(!1,o)},t.getPopup=function(e){var t=this.Instance;return t.PopupContainer.getChildByName(c[e])||t.ShownPopups.getChildByName(c[e])},t.prototype.animate=function(e,t){var o=this;if(e)r=(n=["bounceOut","quadOut","backOut"])[a.default.RandInt(0,n.length-1)],t.setScale(0),cc.tween(t).by(.3,{scale:1},{easing:r}).start();else{var n,r=(n=["bounceOut","quadOut","backOut"])[a.default.RandInt(0,n.length-1)];cc.tween(t).to(.3,{scale:0},{easing:"quadIn"}).call(function(){o.returnPopup(t)}).start()}},t.prototype.usePopup=function(e){this.PopupContainer.removeChild(e,!1),this.ShownPopups.addChild(e)},t.prototype.returnPopup=function(e){this.ShownPopups.removeChild(e,!1),this.PopupContainer.addChild(e)},t.prototype.onLoad=function(){e.prototype.onLoad.call(this);for(var t=0;t=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.init=function(){},t.prototype.start=function(){},i([a],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],QRCodeGen:[function(e,t,o){"use strict";cc._RF.push(t,"8d77cuBjJ1BGq6/i3kFeUx7","QRCodeGen");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../common/Global"),a=e("../stage/StageMgr"),s=e("../utils/Helper"),l=cc._decorator,p=l.ccclass,u=l.property,d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.qrCode=null,t.size=100,t.loadingCover=null,t}return r(t,e),t.prototype.createQR=function(){var e=this;try{var t=s.default.getControllerURL();if(!t)throw console.error("Can't generate QR Code because controller url is "+t);t+="&language="+window.language;var o=document.createElement("div"),n=(new QRCode(o,{text:t,width:this.size,height:this.size,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.L}),o.children[0]);setTimeout(function(){e.loadingCover.active=!1;var t=new cc.Texture2D;t.initWithElement(n),t.handleLoadedTexture();var o=new cc.SpriteFrame(t),r=new cc.Node,i=r.addComponent(cc.Sprite);i.spriteFrame=o,i.sizeMode=cc.Sprite.SizeMode.CUSTOM,e.qrCode.removeAllChildren(),e.qrCode.addChild(r),r.width=e.size,r.height=e.size},300)}catch(r){if(c.default.Instance.backAppTime-Date.now()<0)return void a.default.Instance.sendMessage("backToApp");setTimeout(function(){e.createQR()},2e3)}},t.prototype.start=function(){},i([u(cc.Node)],t.prototype,"qrCode",void 0),i([u],t.prototype,"size",void 0),i([u(cc.Node)],t.prototype,"loadingCover",void 0),i([p],t)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/Global":"Global","../stage/StageMgr":"StageMgr","../utils/Helper":"Helper"}],Rope:[function(e,t,o){"use strict";cc._RF.push(t,"3e382lGARlLAZFWeDSIozNl","Rope");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../Block/Block"),a=e("../Block/BlockSpawner"),s=e("../GameManager/GameManager"),l=cc._decorator,p=l.ccclass,u=l.property,d=function(){function e(){}return e.prototype.MovePlace=function(e,t){this.speed=e,this.duration=t},i([u(cc.Float)],e.prototype,"speed",void 0),i([u(cc.Float)],e.prototype,"duration",void 0),i([p],e)}(),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getHookBlock=null,t.hookPos=null,t.startPos=new cc.Vec3(0,170,0),t.movePlacePatten=[],t.delayTime=1,t.delayTimerCounter=0,t}return r(t,e),t.prototype.start=function(){cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,this.onKeyPress,this);var e=a.default.Instance.SpawnThing(new cc.Vec2(this.node.getPosition().x,this.node.getPosition().y),a.default.Instance._prefabsName.Block);e.getComponent(c.default).currentState=c.successDropState.perfect,this.getHookBlock=e,s.default.Instance.topBlock=e,s.default.Instance.AddBlock(e)},t.prototype.onKeyPress=function(e){var t=this;if(1==s.default.Instance.isAlive&&this.delayTimerCounter>=this.delayTime)switch(e.keyCode){case cc.macro.KEY.enter:this.getHookBlock.getComponent(cc.PhysicsBoxCollider).enabled=!0,this.getHookBlock.getComponent(cc.PhysicsBoxCollider).density=0,this.getHookBlock.angle=0,this.getHookBlock.getComponent(cc.RevoluteJoint).enabled=!1,this.getHookBlock.getComponent(cc.RevoluteJoint).connectedBody=null,this.getHookBlock=null,this.delayTimerCounter=0,this.scheduleOnce(function(){var e=a.default.Instance.SpawnThing(new cc.Vec2(t.node.parent.convertToNodeSpaceAR(t.hookPos.parent.convertToWorldSpaceAR(t.hookPos.getPosition())).x,t.node.parent.convertToNodeSpaceAR(t.hookPos.parent.convertToWorldSpaceAR(t.hookPos.getPosition())).y),a.default.Instance._prefabsName.Block);t.getHookBlock=e},1)}},t.prototype.MoveUp=function(){var e=this;cc.tween(this.node).call(function(){e.delayTimerCounter=0}).to(.5,{position:new cc.Vec3(this.node.getPosition().x,this.node.getPosition().y+51,0)}).start()},t.prototype.Reset=function(){var e=a.default.Instance.SpawnThing(new cc.Vec2(this.node.getPosition().x,this.node.getPosition().y),a.default.Instance._prefabsName.Block);e.getComponent(c.default).currentState=c.successDropState.perfect,this.getHookBlock=e,s.default.Instance.topBlock=e,s.default.Instance.AddBlock(e),this.node.position=this.startPos},t.prototype.MoveDown=function(e){var t=this;cc.tween(this.node).call(function(){t.delayTimerCounter=0}).to(.3,{position:new cc.Vec3(this.node.getPosition().x,this.node.getPosition().y-Math.abs(51*e),0)}).start()},t.prototype.update=function(e){this.delayTimerCounter+=e,this.node.children.forEach(function(e){e.getComponent(cc.RigidBody)&&e.getComponent(cc.RigidBody).syncPosition(!0)})},i([u(cc.Node)],t.prototype,"hookPos",void 0),i([u(d)],t.prototype,"movePlacePatten",void 0),i([p],t)}(cc.Component);o.default=f,cc._RF.pop()},{"../Block/Block":"Block","../Block/BlockSpawner":"BlockSpawner","../GameManager/GameManager":"GameManager"}],ScoreUI:[function(e,t,o){"use strict";cc._RF.push(t,"d4063JhugNFvod0zqfttD0j","ScoreUI");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scoreText=null,t}return r(t,e),t.prototype.start=function(){this.setScore(0)},t.prototype.setScore=function(e){this.scoreText.string="Score: "+e.toString()},i([s(cc.Label)],t.prototype,"scoreText",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],ShakeEffect:[function(e,t,o){"use strict";cc._RF.push(t,"a95476TMPFMHrWiHmzDEOpB","ShakeEffect");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.duration=.5,t.intensity=5,t}return r(t,e),t.prototype.start=function(){},t.prototype.shakeNode=function(e){var t=e.position,o=this.duration,n=cc.tween().sequence(cc.tween().to(o/10,{position:cc.v2(t.x+this.intensity,t.y)}),cc.tween().to(o/5,{position:cc.v2(t.x-this.intensity,t.y)}),cc.tween().to(o/10,{position:cc.v2(t.x+this.intensity,t.y)}),cc.tween().to(o/5,{position:cc.v2(t.x-this.intensity,t.y)}),cc.tween().to(o/10,{position:t}));cc.tween(e).then(n).start()},i([s({type:cc.Integer,tooltip:"Duration of the shake effect in seconds"})],t.prototype,"duration",void 0),i([s({type:cc.Integer,tooltip:"Intensity of the shake effect"})],t.prototype,"intensity",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],SingletonNode:[function(e,t,o){"use strict";cc._RF.push(t,"005153jN7pCg4dYKrYXehlc","SingletonNode");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t,"Instance",{get:function(){return this.instance},enumerable:!1,configurable:!0}),t.prototype.onLoad=function(){if(t.instance)throw t.instance.constructor.name+" instance already exist";t.instance=this},t}(cc.Component)},cc._RF.pop()},{}],Singleton:[function(e,t,o){"use strict";cc._RF.push(t,"d05d9m5rI9IA7eX1WXQ8VpM","Singleton"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(){return function(){function e(){if(e.instance)throw e.instance.constructor.name+" instance already exist";e.instance=this}return Object.defineProperty(e,"Instance",{get:function(){return this.instance},enumerable:!1,configurable:!0}),e}()},cc._RF.pop()},{}],SoundMgr:[function(e,t,o){"use strict";cc._RF.push(t,"2fbc04KsHtO9rOLJqTjEbZu","SoundMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../utils/SingletonNode"),a=cc._decorator,s=a.ccclass,l=a.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.BGM=null,t.SFX_BUTTON=null,t.SFX_SELECT=null,t.SFX_ENDSCREEN=null,t.SFX_EXPLODE=null,t.SFX_CRYSTAL=null,t}return r(t,e),Object.defineProperty(t,"IsMute",{get:function(){return 0==cc.audioEngine.getMusicVolume()},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsMusicPlaying",{get:function(){return cc.audioEngine.isMusicPlaying()},enumerable:!1,configurable:!0}),t.playMusic=function(e,t){void 0===t&&(t=!0),cc.audioEngine.playMusic(e,t)},t.playSfx=function(e,t){void 0===t&&(t=!1),cc.audioEngine.playEffect(e,t)},t.pauseMusic=function(){cc.audioEngine.pauseMusic()},t.pauseAll=function(){cc.audioEngine.pauseAll()},t.stopMusic=function(){cc.audioEngine.stopMusic()},t.stopAll=function(){cc.audioEngine.stopAll()},t.setMute=function(e){void 0===e&&(e=!0);var t=Number(!e);this.setMusicVolume(t),this.setSfxVolume(t)},t.setMusicVolume=function(e){cc.audioEngine.setMusicVolume(e)},t.setSfxVolume=function(e){cc.audioEngine.setEffectsVolume(e)},t.toggleSound=function(){this.setMute(!this.IsMute)},i([l({type:cc.AudioClip})],t.prototype,"BGM",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_BUTTON",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_SELECT",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_ENDSCREEN",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_EXPLODE",void 0),i([l({type:cc.AudioClip})],t.prototype,"SFX_CRYSTAL",void 0),i([s],t)}(c.default());o.default=p,cc._RF.pop()},{"../utils/SingletonNode":"SingletonNode"}],Spawn:[function(e,t,o){"use strict";cc._RF.push(t,"a2953KOs91KIY4Cq9ZVW+sq","Spawn");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.prefabs=[],t.holder=null,t}return r(t,e),t.prototype.LoadHolder=function(){null==this.holder&&(this.holder=this.node.getChildByName("Holder"),console.log("Success load Holder ",this.holder))},t.prototype.LoadPrefabs=function(){var e=this;this.node.getChildByName("Prefabs").children.forEach(function(t){e.prefabs.push(t)})},t.prototype.GetPrefabByName=function(e){var t=null;return this.prefabs.forEach(function(o){o.name==e&&(t=o)}),t},t.prototype.SpawnThing=function(e,t){var o=this.GetPrefabByName(t);if(null==o)return null;var n=cc.instantiate(o);return n.position=new cc.Vec3(e.x,e.y,0),n.active=!0,n.parent=this.holder,n},t.prototype.onEnable=function(){this.LoadHolder(),this.LoadPrefabs()},i([s(cc.Node)],t.prototype,"prefabs",void 0),i([s(cc.Node)],t.prototype,"holder",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],Spinner:[function(e,t,o){"use strict";cc._RF.push(t,"9bb946QoZVOMKPUS/9hPO3J","Spinner");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.Speed=600,t}return r(t,e),t.prototype.update=function(e){this.node.angle=(this.node.angle-this.Speed*e)%360},i([s(cc.Integer)],t.prototype,"Speed",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],StageGameEnd:[function(e,t,o){"use strict";cc._RF.push(t,"d0df7MrCDxIOqiQAqLISxA9","StageGameEnd");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../common/SoundMgr"),a=e("../game/GameDefine"),s=e("../PeerComponent/PeerDefine"),l=e("../PeerComponent/PeerManager"),p=e("./Stage"),u=e("./StageMgr"),d=cc._decorator,f=d.ccclass,h=d.property,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.btnPlay=null,t.btnBack=null,t.playerRankBases=[],t.fireWorks=[],t.endGameMulti=null,t.endGameSingle=null,t.dragonSkin=["Char3","Char2","Char1"],t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.start=function(){this.btnPlay.interactable=!0,this.btnBack.interactable=!1},t.prototype.showResult=function(e){if(e.length>1){this.endGameMulti.active=!0,this.endGameSingle.active=!1;for(var t=0;t<3;t++)if(t=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./Stage"),a=e("./StageGameEnd"),s=e("../playGround"),l=e("../PeerComponent/PeerManager"),p=e("../PeerComponent/PeerAction"),u=cc._decorator,d=u.ccclass,f=u.property,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.playGround=null,t.container=null,t.playerAvatar=[],t.playerRankSpriteFrames=[],t.normalSprite=null,t.graySprite=null,t.tutorialPopup=null,t.lblTimer=null,t.bgSpriteFrames=[],t.roadSpriteFrames=[],t.objectsSpriteFrame1=[],t.objectsSpriteFrame2=[],t.objectsSpriteFrame3=[],t.isDead=[],t.isGameOver=[],t.playerScore=[],t.avatarPositionY=[50,-125,-300],t.connectedPlayerIndex=[],t.rankUpdateInterval=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this,cc.director.getCollisionManager().enabled=!0},t.prototype.initial=function(){for(var e=this,t=0,o=this.container.children;t0;o--){var n=Math.floor(Math.random()*(o+1));t=[e[n],e[o]],e[o]=t[0],e[n]=t[1]}},t.prototype.showConnectMessage=function(e,t){void 0===t&&(t=null),this.container.children[e]&&this.container.children[e].getComponent(s.default).showMessagePlayerDisconnect(t)},t.prototype.setGameOver=function(e,t){if(void 0===t&&(t=!0),this.isGameOver[e]=!0,t&&(this.isDead[e]=!0,this.playerAvatar[e].getComponent(cc.Sprite).setMaterial(0,this.graySprite)),this.isGameOver.every(function(e){return 1==e})){clearInterval(this.rankUpdateInterval);for(var o=0,n=this.container.children;o0&&a.default.Instance.showResult(i)}},t.prototype.updateRank=function(){for(var e=this.getPlayerRank(),t=0;t=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../common/SoundMgr"),a=(e("../PeerComponent/PeerManager"),e("../PeerComponent/QRCodeGen")),s=e("./Stage"),l=e("./StageMgr"),p=cc._decorator,u=p.ccclass,d=p.property,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.qrCode=null,t.btnNext=null,t.lblRoomCode=null,t.players=[],t.normalSpine=null,t.graySpine=null,t.msg=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.start=function(){this.msg.string=""+window.controllerOrigin},t.prototype.onEnable=function(){},t.prototype.nextStage=function(){c.default.playSfx(c.default.Instance.SFX_BUTTON),cc.tween(this.btnNext.node).to(.1,{scale:.65}).to(.1,{scale:.5}).call(function(){l.default.show(l.Stages.StageInGame)}).start()},t.prototype.setUI=function(e,t){this.players[t].getChildByName("playerReady").active=e,this.players[t].getChildByName("playerNotReady").active=!e,this.players[t].getChildByName("playerSprite").getComponent(sp.Skeleton).setMaterial(0,e?this.normalSpine:this.graySpine)},t.Instance=null,i([d(a.default)],t.prototype,"qrCode",void 0),i([d(cc.Button)],t.prototype,"btnNext",void 0),i([d(cc.Label)],t.prototype,"lblRoomCode",void 0),i([d(cc.Node)],t.prototype,"players",void 0),i([d(cc.Material)],t.prototype,"normalSpine",void 0),i([d(cc.Material)],t.prototype,"graySpine",void 0),i([d(cc.Label)],t.prototype,"msg",void 0),o=i([u],t)}(s.default);o.default=f,cc._RF.pop()},{"../PeerComponent/PeerManager":"PeerManager","../PeerComponent/QRCodeGen":"QRCodeGen","../common/SoundMgr":"SoundMgr","./Stage":"Stage","./StageMgr":"StageMgr"}],StageMgr:[function(e,t,o){"use strict";cc._RF.push(t,"fd6a8RrsDtCgJjnXG0oVHlf","StageMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0}),o.Stages=void 0;var c,a=e("./Stage"),s=e("../utils/SingletonNode"),l=e("../utils/Helper"),p=e("../PeerComponent/PeerManager"),u=e("./StageQRscan"),d=e("./StageLobby"),f=e("./StageGameEnd"),h=(e("./StageInGame"),e("../PeerComponent/PeerDefine")),y=e("./StageStartGame"),g=cc._decorator,v=g.ccclass,_=g.property;(function(e){e[e.StageQRscan=0]="StageQRscan",e[e.StageLobby=1]="StageLobby",e[e.StageInGame=2]="StageInGame",e[e.StageGameEnd=3]="StageGameEnd",e[e.StageStartGame=4]="StageStartGame",e[e.StageTestGame=5]="StageTestGame"})(c=o.Stages||(o.Stages={}));var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.StagePrefabs=[],t.StageCover=null,t.isTweening=!1,t.mPreviousStage=null,t.mCurrentStage=null,t.inputCode=[],t}var o;return r(t,e),o=t,Object.defineProperty(t.prototype,"CurrentStage",{get:function(){return this.mCurrentStage},enumerable:!1,configurable:!0}),t.show=function(e,t){if(void 0===t&&(t=.5),!o.Instance.isTweening){var n=this.Instance;n.mPreviousStage=n.mCurrentStage;for(var r=0,i=n.node.children;r0)&&(r=e?r+1:r-1,o.show(l.default.GetIndexEnum(c,n.node.children[r].name),t))},t.prototype.onLoad=function(){var t=this;e.prototype.onLoad.call(this);for(var n=0;n=4&&(t.inputCode.toString()==[54,55,56,57].toString()&&cc.debug.setDisplayStats(!0),t.inputCode.shift()),p.default.Instance.isPlayWithRemote)switch(o.Instance.CurrentStage.name){case c[c.StageQRscan]:13==e.keyCode&&(u.default.Instance.nextStage(!0),p.default.Instance.setRemoteMode(!0));break;case c[c.StageStartGame]:13==e.keyCode&&y.default.Instance.nextStage(!0);break;case c[c.StageLobby]:13==e.keyCode&&d.default.Instance.nextStage();break;case c[c.StageGameEnd]:37==e.keyCode?f.default.Instance.chooseButton(!1):39==e.keyCode?f.default.Instance.chooseButton(!0):13==e.keyCode&&(f.default.Instance.btnPlay.interactable?f.default.Instance.nextStage():f.default.Instance.previousStage())}}),window.addEventListener("message",this.onReciveMessage.bind(this),!1),this.sendMessage("getControllerURL"),this.sendMessage("getPrefix"),this.sendMessage("getControllerOrigin")},t.prototype.onReciveMessage=function(e){if(e.data&&e.data.action){var t=e.data;switch(t.action){case"getPrefix":window.controllerPrefix=t.message;break;case"getControllerURL":window.controllerURL=t.message;break;case"getControllerOrigin":window.controllerOrigin=t.message}}},t.prototype.sendMessage=function(e,t){void 0===t&&(t=null);var o={action:e,game:"zig-zag",customParam:t};window.parent.postMessage(o,"*")},t.prototype.start=function(){this.StageCover=cc.find("Canvas").getChildByName("Stage Cover"),this.StageCover.active=!1,o.show(c.StageQRscan)},t.prototype.animate=function(e){var t=this;this.mPreviousStage.active=!0,this.mCurrentStage.active=!1,this.isTweening=!0,this.StageCover.active=!0,cc.tween(this.mPreviousStage).to(e,{scale:this.mPreviousStage.scaleX},{progress:function(e,o,n,r){return t.StageCover.opacity=255*r,e+(o-e)*r}}).call(function(){t.mPreviousStage.active=!1,t.mCurrentStage.active=!0,t.mCurrentStage.getComponent(a.default).init()}).start(),cc.tween(this.mCurrentStage).delay(e).to(e,{scale:this.mCurrentStage.scaleX},{progress:function(e,o,n,r){return t.StageCover.opacity=255*(1-r),e+(o-e)*r}}).call(function(){t.StageCover.active=!1,t.isTweening=!1}).start()},i([_(cc.Prefab)],t.prototype,"StagePrefabs",void 0),o=i([v],t)}(s.default());o.default=m,cc._RF.pop()},{"../PeerComponent/PeerDefine":"PeerDefine","../PeerComponent/PeerManager":"PeerManager","../utils/Helper":"Helper","../utils/SingletonNode":"SingletonNode","./Stage":"Stage","./StageGameEnd":"StageGameEnd","./StageInGame":"StageInGame","./StageLobby":"StageLobby","./StageQRscan":"StageQRscan","./StageStartGame":"StageStartGame"}],StageQRscan:[function(e,t,o){"use strict";cc._RF.push(t,"824b3x307FID6iZwnCxazfr","StageQRscan");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../common/Global"),a=e("../common/SoundMgr"),s=(e("../PeerComponent/PeerManager"),e("../PeerComponent/QRCodeGen")),l=e("./Stage"),p=(e("./StageLobby"),e("./StageMgr")),u=cc._decorator,d=u.ccclass,f=u.property,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.qrCode=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.start=function(){a.default.playMusic(a.default.Instance.BGM);var e=new URLSearchParams(window.location.search),t=Number(e.get("timer_qr"))||3e4;c.default.Instance.backAppTime=Date.now()+t},t.prototype.nextStage=function(e){void 0===e&&(e=!1),e?(a.default.playSfx(a.default.Instance.SFX_BUTTON),p.default.show(p.Stages.StageStartGame)):p.default.show(p.Stages.StageStartGame)},t.Instance=null,i([f(s.default)],t.prototype,"qrCode",void 0),o=i([d],t)}(l.default);o.default=h,cc._RF.pop()},{"../PeerComponent/PeerManager":"PeerManager","../PeerComponent/QRCodeGen":"QRCodeGen","../common/Global":"Global","../common/SoundMgr":"SoundMgr","./Stage":"Stage","./StageLobby":"StageLobby","./StageMgr":"StageMgr"}],StageStartGame:[function(e,t,o){"use strict";cc._RF.push(t,"0e252LdYfhIyIZLhk6PCy9f","StageStartGame");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("../common/SoundMgr"),a=e("./Stage"),s=e("./StageMgr"),l=cc._decorator,p=l.ccclass,u=l.property,d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.startButton=null,t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.nextStage=function(e){void 0===e&&(e=!1),e?(c.default.playSfx(c.default.Instance.SFX_BUTTON),cc.tween(this.startButton).to(.1,{scale:.65}).to(.1,{scale:.5}).call(function(){s.default.show(s.Stages.StageTestGame)}).start()):s.default.show(s.Stages.StageTestGame)},t.Instance=null,i([u(cc.Node)],t.prototype,"startButton",void 0),o=i([p],t)}(a.default);o.default=d,cc._RF.pop()},{"../common/SoundMgr":"SoundMgr","./Stage":"Stage","./StageMgr":"StageMgr"}],StageTestGame:[function(e,t,o){"use strict";cc._RF.push(t,"0c894rNk45KaZ1YxbpCwkvS","StageTestGame");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./Stage"),a=cc._decorator,s=a.ccclass,l=(a.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.start=function(){},i([s],t)}(c.default));o.default=l,cc._RF.pop()},{"./Stage":"Stage"}],Stage:[function(e,t,o){"use strict";cc._RF.push(t,"d1579TpISVNGpuqBRR5e3Kh","Stage");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.init=function(){},i([a],t)}(cc.Component));o.default=s,cc._RF.pop()},{}],Timer:[function(e,t,o){"use strict";cc._RF.push(t,"2f2fcQ9soJHUbtX80Hsh3jj","Timer"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function e(){this.timer=0,this.duration=0,this.overhead=0,this.isDone=!0}return e.prototype.SetDuration=function(e){this.timer=e,this.duration=e,this.overhead=0,this.isDone=!1},e.prototype.GetDuration=function(){return this.duration},e.prototype.GetTime=function(){return this.timer},e.prototype.GetPercent=function(){return this.timer/this.duration},e.prototype.Reset=function(){this.timer=this.duration,this.overhead=0,this.isDone=!1},e.prototype.IsDone=function(){return 0===this.timer},e.prototype.FirstFinished=function(){return!(this.timer>0||this.isDone||(this.isDone=!0,0))},e.prototype.GetOverhead=function(){return this.overhead},e.prototype.Update=function(e){0!==this.timer&&(this.timer-=e,this.timer<0&&(this.overhead=-this.timer,this.timer=0))},e}();o.default=n,cc._RF.pop()},{}],UIManager:[function(e,t,o){"use strict";cc._RF.push(t,"9d62aOu/DVIAK79rPb4ptJO","UIManager");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./LiveUI"),a=e("./ScoreUI"),s=cc._decorator,l=s.ccclass,p=s.property,u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remainLiveUI=null,t.gameOverPanel=null,t.scoreUI=null,t.startPos=new cc.Vec3(-480,-270,0),t}var o;return r(t,e),o=t,t.prototype.onLoad=function(){o.Instance=this},t.prototype.plusScore=function(e){this.scoreUI.setScore(e)},t.prototype.MoveUIDown=function(e){cc.tween(this.node).to(.3,{position:new cc.Vec3(this.node.getPosition().x,this.node.getPosition().y-51*e,0)}).start()},t.prototype.Reset=function(){this.gameOverPanel.setPosition(this.gameOverPanel.x,this.gameOverPanel.y+800),cc.tween(this.node).to(.3,{position:this.startPos}).start()},t.prototype.GameOverPopup=function(){this.gameOverPanel.active=!0,cc.tween(this.gameOverPanel).to(.3,{position:new cc.Vec3(480,300,0)}).start()},t.prototype.MoveUIUp=function(){cc.tween(this.node).to(.5,{position:new cc.Vec3(this.node.getPosition().x,this.node.getPosition().y+51,0)}).start()},t.Instance=null,i([p(c.default)],t.prototype,"remainLiveUI",void 0),i([p(cc.Node)],t.prototype,"gameOverPanel",void 0),i([p(a.default)],t.prototype,"scoreUI",void 0),o=i([l],t)}(cc.Component);o.default=u,cc._RF.pop()},{"./LiveUI":"LiveUI","./ScoreUI":"ScoreUI"}],UIMgr:[function(e,t,o){"use strict";cc._RF.push(t,"8e195aDavdHDKGbdlAqNUxo","UIMgr");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0}),o.UI_MOVE_DIRECTION=o.UI_SHOW_EFFECT=o.UIs=void 0;var c,a,s,l=e("../utils/Helper"),p=e("../utils/SingletonNode"),u=cc._decorator,d=u.ccclass,f=u.property;(function(e){e[e.UIInterstitial=0]="UIInterstitial",e[e.UIWaiting=1]="UIWaiting",e[e.UIGame=2]="UIGame",e[e.UIScan=3]="UIScan",e[e.UIGuide=4]="UIGuide"})(c=o.UIs||(o.UIs={})),function(e){e[e.APPEAR=0]="APPEAR",e[e.MOVE=1]="MOVE",e[e.SCALE=2]="SCALE",e[e.FADE=3]="FADE"}(a=o.UI_SHOW_EFFECT||(o.UI_SHOW_EFFECT={})),function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(s=o.UI_MOVE_DIRECTION||(o.UI_MOVE_DIRECTION={}));var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.UIPrefabs=[],t.Canvas=null,t.mMoveDirection=s.LEFT,t.mPreviousView=null,t.mCurrentView=null,t}return r(t,e),Object.defineProperty(t.prototype,"MoveDirection",{set:function(e){this.mMoveDirection=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CurrentView",{get:function(){return this.mCurrentView},enumerable:!1,configurable:!0}),t.show=function(e,t,o,n){void 0===t&&(t=a.APPEAR),void 0===o&&(o="smooth"),void 0===n&&(n=.5);var r=this.Instance;r.mPreviousView=r.mCurrentView;for(var i=0,s=r.node.children;i0)&&(i=e?i+1:i-1,this.show(l.default.GetIndexEnum(c,r.node.children[i].name),t,o,n))},t.getUI=function(e){return this.Instance.node.getChildByName(c[e]).getComponent(c[e])},t.prototype.onLoad=function(){e.prototype.onLoad.call(this);for(var t=0;t=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./cuboid"),a=e("./playGround"),s=cc._decorator,l=s.ccclass,p=s.property,u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PlayGround=null,t}return r(t,e),t.prototype.onCollisionExit=function(e){!this.PlayGround.isPlayerDead&&5===e.tag&&this.PlayGround.isReady&&("ExtraCuboid"==e.node.name?this.PlayGround.extraCuboidPool.put(e.node):e.node==this.PlayGround.cuboidBase||(e.node.getComponent(c.default).diamond&&this.PlayGround.diamondPool.put(e.node.getComponent(c.default).diamond),this.PlayGround.createCuboid(e.node)))},i([p(a.default)],t.prototype,"PlayGround",void 0),i([l],t)}(cc.Component);o.default=u,cc._RF.pop()},{"./cuboid":"cuboid","./playGround":"playGround"}],cuboid:[function(e,t,o){"use strict";cc._RF.push(t,"1bcb2GEmxRB1458fn5Fjmnu","cuboid");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.player=null,t.diamond=null,t.thresHold=9999,t.thresHoldActive=9999,t}return r(t,e),t.prototype.onLoad=function(){var e=this;this.schedule(function(){var t=e.player.position.y-e.node.position.y;if(t<200&&t>-200){if(0===e.thresHold)return;e.thresHold=0,e.node.children.forEach(function(e){1===e.childrenCount&&e.children[0].getComponent(cc.BoxCollider)&&(e.children[0].getComponent(cc.BoxCollider).enabled=!0)}),e.getComponent(cc.BoxCollider).enabled=!0}else{if(200===e.thresHold)return;e.thresHold=200,e.node.children.forEach(function(e){1===e.childrenCount&&e.children[0].getComponent(cc.BoxCollider)&&(e.children[0].getComponent(cc.BoxCollider).enabled=!1)})}t<-500&&(e.getComponent(cc.BoxCollider).enabled=!1)},.1),this.schedule(function(){if(e.player.position.y-e.node.position.y<720&&e.player.position.y-e.node.position.y>-720){if(0===e.thresHoldActive)return;e.thresHoldActive=0,e.node.children.forEach(function(e){e.getComponent(cc.Sprite)&&(e.getComponent(cc.Sprite).enabled=!0)})}else{if(720===e.thresHoldActive)return;e.thresHoldActive=720,e.node.children.forEach(function(e){e.getComponent(cc.Sprite)&&(e.getComponent(cc.Sprite).enabled=!1)})}},.2)},i([s(cc.Node)],t.prototype,"player",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],diamond:[function(e,t,o){"use strict";cc._RF.push(t,"085b587D41NjKlGgaQmpnmJ","diamond");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.player=null,t.diamondSprite=null,t.diamondParticle=null,t.lblScorePlus=null,t.thresHold=9999,t}return r(t,e),t.prototype.onLoad=function(){var e=this;this.schedule(function(){var t=e.player.position.y-e.node.position.y;if(t<200&&t>-200){if(0===e.thresHold)return;e.thresHold=0,e.getComponent(cc.CircleCollider).enabled=!0}else{if(200===e.thresHold)return;e.thresHold=200,e.getComponent(cc.CircleCollider).enabled=!1}},.1)},i([s(cc.Node)],t.prototype,"player",void 0),i([s(cc.Sprite)],t.prototype,"diamondSprite",void 0),i([s(cc.ParticleSystem)],t.prototype,"diamondParticle",void 0),i([s(cc.Label)],t.prototype,"lblScorePlus",void 0),i([a],t)}(cc.Component);o.default=l,cc._RF.pop()},{}],levelDesign:[function(e,t,o){"use strict";cc._RF.push(t,"f4cdaX2XKlHqKKlKcebjlUE","levelDesign"),o.__esModule=!0,o.default=void 0,o.default=[{startIndex:0,directionChangeRate:0,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:50,directionChangeRate:.1,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:100,directionChangeRate:.2,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:0},{startIndex:200,directionChangeRate:.7,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:.1},{startIndex:240,directionChangeRate:.25,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:.1},{startIndex:300,directionChangeRate:1,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:320,directionChangeRate:.3,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:400,directionChangeRate:.6,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:0},{startIndex:450,directionChangeRate:.4,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:0},{startIndex:500,directionChangeRate:.8,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:.1},{startIndex:530,directionChangeRate:.5,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:.1},{startIndex:600,directionChangeRate:1,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:620,directionChangeRate:.65,diamondSpawnRate:.1,doubleWay2Rate:0,doubleWay1Rate:0},{startIndex:700,directionChangeRate:.9,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:.1},{startIndex:750,directionChangeRate:.5,diamondSpawnRate:.1,doubleWay2Rate:.1,doubleWay1Rate:.1}],t.exports=o.default,cc._RF.pop()},{}],playGround:[function(e,t,o){"use strict";cc._RF.push(t,"7c0988P9KdKaoNjh5pLuFPn","playGround");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./game/GameDefine"),a=e("./PeerComponent/PeerManager"),s=e("./stage/StageInGame"),l=e("../levelDesign.js"),p=e("./common/SoundMgr"),u=e("./cuboid"),d=e("./diamond"),f=cc._decorator,h=f.ccclass,y=f.property,g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cuboid=null,t.diamond=null,t.cuboidContainer=null,t.cuboidBase=null,t.playerBall=null,t.lblScore=null,t.bg=null,t.dragonSP=[],t.diamondContainer=null,t.endGamePopup=null,t.bannerLabel=null,t.popupLabel=null,t.playerIndex=0,t.previousCuboid=null,t.distance=cc.v2(100*Math.cos(45*Math.PI/180),100*Math.cos(45*Math.PI/180)),t.initialDistance=cc.v2(100*Math.cos(45*Math.PI/180),0*Math.cos(45*Math.PI/180)),t.isMoveLeft=!1,t.isPlayerDead=!1,t.score=0,t.diamondPool=new cc.NodePool,t.extraCuboidPool=new cc.NodePool,t.isReady=!1,t.isSpawnLeft=!1,t.currentLevel=0,t.cubiodCount=0,t.isChangingDirection=!1,t.dragonSpine=null,t.dragonSkin=["Char3","Char2","Char1"],t.bgSpriteFrame=null,t.roadSpriteFrame=null,t.objectsSpriteFrame=null,t.playerPos=new cc.Vec2(0,0),t}return r(t,e),t.prototype.onLoad=function(){var e=this;cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN,function(t){a.default.Instance.isPlayWithRemote&&0==e.playerIndex&&13==t.keyCode&&e.changeDirection()});for(var t=0;t<10;++t){var o=cc.instantiate(this.diamond);this.diamondPool.put(o)}for(t=0;t<30;++t){var n=cc.instantiate(this.cuboid);this.extraCuboidPool.put(n)}this.dragonSpine=this.playerBall.getChildByName("playerChar").getComponent(sp.Skeleton)},t.prototype.start=function(){this.playerBall.zIndex=999,this.cuboidBase.zIndex=0;for(var e=0;e<15;e++)this.createCuboid();this.dragonSpine.setSkin(this.dragonSkin[this.playerIndex]),this.bg.getComponent(cc.Sprite).spriteFrame=this.bgSpriteFrame,this.cuboidBase.getChildByName("frontFace").getComponent(cc.Sprite).spriteFrame=this.roadSpriteFrame},t.prototype.changeDirection=function(){var e=this;this.isPlayerDead||!this.isReady||this.isChangingDirection||(this.isMoveLeft=!this.isMoveLeft,this.isChangingDirection=!0,cc.tween(this.playerBall).to(.15,{angle:this.isMoveLeft?45:-45}).call(function(){e.isChangingDirection=!1}).start(),this.scoreUpdate())},t.prototype.createCuboid=function(e){var t=this;void 0===e&&(e=cc.instantiate(this.cuboid)),e.getChildByName("frontFace").getComponent(cc.Sprite).spriteFrame=this.roadSpriteFrame;var o=l[this.currentLevel+1];o&&++this.cubiodCount>=o.startIndex&&this.currentLevel++;var n=l[this.currentLevel];if(this.previousCuboid){var r=Math.random(),i=0;switch(r105?i=0:(this.previousCuboid.x<-70||this.previousCuboid.x>70)&&(i=1)):r105)&&(i=0)):i=0,i){case 0:if(Math.random()140&&(this.isSpawnLeft=!0),e.x=(this.isSpawnLeft?-this.distance.x:this.distance.x)+this.previousCuboid.x,e.y=this.previousCuboid.y+this.distance.y,e.getChildByName("fence-1").active=!this.isSpawnLeft,e.getChildByName("fence-2").active=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-3").active=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-4").active=!this.isSpawnLeft,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-3").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.previousCuboid.getChildByName("fence-4").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft,Math.random()<.5){var c=e.getChildByName("objectRandom").getChildByName("objectSprite");e.getChildByName("objectRandom").active=!0,c.getComponent(cc.Sprite).spriteFrame=this.objectsSpriteFrame[Math.floor(Math.random()*this.objectsSpriteFrame.length)],c.x=e.x>0?-400:400}else e.getChildByName("objectRandom").active=!1;break;case 1:var a=this.previousCuboid.x,s=this.previousCuboid.y;setTimeout(function(){t.createExtraCuboid(-t.distance.x+a,s+t.distance.y,[!1,!0,!1,!0])},50),setTimeout(function(){t.createExtraCuboid(t.distance.x+a,s+t.distance.y,[!0,!1,!0,!1])},100),e.x=this.previousCuboid.x,e.y=this.previousCuboid.y+2*this.distance.y,e.getChildByName("fence-1").active=!1,e.getChildByName("fence-2").active=!1,this.previousCuboid.getChildByName("fence-3").active=!1,this.previousCuboid.getChildByName("fence-4").active=!1,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!1,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-3").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-4").children[0].getComponent(cc.BoxCollider).enabled=!1;break;case 2:var p=this.previousCuboid.x,d=this.previousCuboid.y;setTimeout(function(){t.createExtraCuboid(-t.distance.x+p,d+t.distance.y,[!1,!0,!0,!1])},50),setTimeout(function(){t.createExtraCuboid(t.distance.x+p,d+t.distance.y,[!0,!1,!1,!0])},100),setTimeout(function(){t.createExtraCuboid(2*-t.distance.x+p,d+2*t.distance.y,[!1,!0,!1,!0])},150),setTimeout(function(){t.createExtraCuboid(2*t.distance.x+p,d+2*t.distance.y,[!0,!1,!0,!1])},200),setTimeout(function(){t.createExtraCuboid(-t.distance.x+p,d+3*t.distance.y,[!0,!1,!1,!0])},250),setTimeout(function(){t.createExtraCuboid(t.distance.x+p,d+3*t.distance.y,[!1,!0,!0,!1])},300),e.x=this.previousCuboid.x,e.y=this.previousCuboid.y+4*this.distance.y,e.getChildByName("fence-1").active=!1,e.getChildByName("fence-2").active=!1,this.previousCuboid.getChildByName("fence-3").active=!1,this.previousCuboid.getChildByName("fence-4").active=!1,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!1,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-3").children[0].getComponent(cc.BoxCollider).enabled=!1,this.previousCuboid.getChildByName("fence-4").children[0].getComponent(cc.BoxCollider).enabled=!1}}else this.isSpawnLeft=!1,e.x=this.isSpawnLeft?-this.initialDistance.x:this.initialDistance.x,e.y=this.initialDistance.y,e.getChildByName("fence-1").active=!this.isSpawnLeft,e.getChildByName("fence-2").active=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-7").active=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-8").active=!this.isSpawnLeft,e.getChildByName("fence-1").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft,e.getChildByName("fence-2").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-7").children[0].getComponent(cc.BoxCollider).enabled=!!this.isSpawnLeft,this.cuboidBase.getChildByName("fence-8").children[0].getComponent(cc.BoxCollider).enabled=!this.isSpawnLeft;if(e.zIndex=-e.y/70,e.parent=this.cuboidContainer,this.previousCuboid=e,Math.random()0?this.diamondPool.get():cc.instantiate(this.diamond)).x=e,o.y=t,o.parent=this.diamondContainer,o.getComponent(d.default).diamondSprite.node.active=!0,o.getComponent(d.default).diamondParticle.node.active=!1,o.getComponent(d.default).lblScorePlus.node.active=!1,o},t.prototype.createExtraCuboid=function(e,t,o){void 0===o&&(o=[!0,!0,!0,!0]);var n=null;if((n=this.extraCuboidPool.size()>0?this.extraCuboidPool.get():cc.instantiate(this.cuboid)).x=e,n.y=t,n.getChildByName("frontFace").getComponent(cc.Sprite).spriteFrame=this.roadSpriteFrame,n.parent=this.cuboidContainer,n.name="ExtraCuboid",n.zIndex=-n.y/70,Math.random()=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./common/SoundMgr"),a=e("./diamond"),s=e("./game/GameDefine"),l=e("./playGround"),p=cc._decorator,u=p.ccclass,d=p.property,f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PlayGround=null,t}return r(t,e),t.prototype.onCollisionEnter=function(e){if(3===e.tag){var t=e.node.getComponent(a.default);t.diamondSprite.node.active&&(c.default.playSfx(c.default.Instance.SFX_CRYSTAL),t.diamondSprite.node.active=!1,t.diamondParticle.node.active=!0,t.diamondParticle.resetSystem(),t.lblScorePlus.node.active=!0,cc.tween(t.lblScorePlus.node).to(.5,{y:175}).call(function(){t.lblScorePlus.node.active=!1,t.lblScorePlus.node.y=75}).start(),this.PlayGround.scoreUpdate(s.default.DiamondScore),t.lblScorePlus.string="+"+s.default.DiamondScore)}},i([d(l.default)],t.prototype,"PlayGround",void 0),i([u],t)}(cc.Component);o.default=f,cc._RF.pop()},{"./common/SoundMgr":"SoundMgr","./diamond":"diamond","./game/GameDefine":"GameDefine","./playGround":"playGround"}],playerBall:[function(e,t,o){"use strict";cc._RF.push(t,"9a52dKv1yRLFb9DOGF+w6r+","playerBall");var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=e("./playGround"),a=cc._decorator,s=a.ccclass,l=a.property,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.PlayGround=null,t.enterCount=1,t}return r(t,e),t.prototype.start=function(){},t.prototype.onCollisionEnter=function(e){!this.PlayGround.isPlayerDead&&2===e.tag&&this.PlayGround.isReady&&(this.PlayGround.isPlayerDead=!0)},i([l(c.default)],t.prototype,"PlayGround",void 0),i([s],t)}(cc.Component);o.default=p,cc._RF.pop()},{"./playGround":"playGround"}],strings:[function(e,t){"use strict";cc._RF.push(t,"06f1dcF/lRJcYoC0Xu0umHM","strings"),t.exports={EMPTY:{EN:"",MY:"",MU:""},COMMON_HIGHSCORE:{EN:"High Score:",MY:"\u1021\u103b\u1019\u1004\u1037\u1039\u1006\u102f\u1036\u1038\u101b\u1019\u103d\u1010\u1039",MU:"\u1021\u1019\u103c\u1004\u1037\u103a\u1006\u102f\u1036\u1038\u101b\u1019\u103e\u1010\u103a"},COMMON_STORE_EQUIP:{EN:"Store &\nEquipment",MY:"\u1015\u1005\u1065\u100a\u1039\u1038\u1005\u1010\u102d\u102f\u1038\u1006\u102d\u102f\u1004\u1039",MU:"\u1015\u1005\u1039\u1005\u100a\u103a\u1038\u1005\u1010\u102d\u102f\u1038\u1006\u102d\u102f\u1004\u103a"},COMMON_GIFT_GUIDE:{EN:"Gift & Guide",MY:"Gift & Guide",MU:"Gift & Guide"},COMMON_LEADERBOARD:{EN:"Leader board",MY:"Leader board",MU:"Leader board"},COMMON_HISTORY:{EN:"Your History",MY:"Your History",MU:"Your History"},COMMON_COLLECTION:{EN:"Your Collection",MY:"Collection",MU:"Collection"},COMMON_SCORE:{EN:"Score:",MY:"\u101b\u1019\u103d\u1010\u1039",MU:"\u101b\u1019\u103e\u1010\u103a"},COMMON_SKILL:{EN:"Skill",MY:"Skill",MU:"Skill"},COMMON_ATTACK:{EN:"Attack",MY:"Attack",MU:"Attack"},COMMON_COOLDOWN:{EN:"Cool down:",MY:"Cool down:",MU:"Cool down:"},COMMON_XP:{EN:"XP",MY:"XP",MU:"XP"},COMMON_LV:{EN:"LV.",MY:"LV.",MU:"LV."},COMMON_LEVEL_UP:{EN:"Level up!!!",MY:"Level \u1010\u102d\u102f\u1038",MU:"Level \u1010\u102d\u102f\u1038"},COMMON_EQUIP:{EN:"EQUIP NOW",MY:"\u101e\u102f\u1036\u1038\u1019\u100a\u1039",MU:"\u101e\u102f\u1036\u1038\u1019\u100a\u103a"},COMMON_UNEQUIP:{EN:"UNEQUIP",MY:"\u1019\u101e\u102f\u1036\u1038\u1015\u102b",MU:"\u1019\u101e\u102f\u1036\u1038\u1015\u102b"},COMMON_YES:{EN:"Yes",MY:"Yes",MU:"Yes"},COMMON_NO:{EN:"No",MY:"No",MU:"No"},COMMON_OK:{EN:"OK",MY:"OK",MU:"OK"},COMMON_COPY:{EN:"Copy",MY:"\u1000\u1030\u1038\u101a\u1030\u1019\u100a\u1039",MU:"\u1000\u1030\u1038\u101a\u1030\u1019\u100a\u103a"},COMMON_TURN_REMAIN:{EN:"Daily remaining turns:",MY:"\u101a\u1031\u1014\u1094\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u101a\u1014\u1031\u1037\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},COMMON_TURN_TOTAL:{EN:"Total turns:",MY:"\u1005\u102f\u1005\u102f\u1031\u1015\u102b\u1004\u1039\u1038\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u1005\u102f\u1005\u102f\u1015\u1031\u102b\u1004\u103a\u1038\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},COMMON_YOUR_STICK:{EN:"Your Sticks:",MY:"\u101e\u1004\u1037\u1039stick\u1019\u103a\u102c\u1038",MU:"\u101e\u1004\u1037\u103astick\u1019\u103b\u102c\u1038"},COMMON_NO_OF:{EN:"No.",MY:"No.",MU:"No."},COMMON_DATE_TIME:{EN:"Date / Time",MY:"\u101b\u1000\u1039/\u1021\u1001\u103a\u102d\u1014\u1039",MU:"\u101b\u1000\u103a/\u1021\u1001\u103b\u102d\u1014\u103a"},PLAYER_ID:{EN:"Your ID:",MY:"\u101e\u1004\u1037\u1039 ID",MU:"\u101e\u1004\u1037\u103a ID"},PLAYER_STAR:{EN:"Collected Stars",MY:"\u101b\u101b\u103d\u102d\u1011\u102c\u1038\u1031\u101e\u102c\u107e\u1000\u101a\u1039\u1019\u103a\u102c\u1038",MU:"\u101b\u101b\u103e\u102d\u1011\u102c\u1038\u101e\u1031\u102c\u1000\u103c\u101a\u103a\u1019\u103b\u102c\u1038"},PLAYER_RANK:{EN:"Current Rank:",MY:"\u101c\u1000\u1039\u101b\u103d\u102d\u1021\u1006\u1004\u1037\u1039",MU:"\u101c\u1000\u103a\u101b\u103e\u102d\u1021\u1006\u1004\u1037\u103a"},BOOSTER_TITLE:{EN:"Booster pack",MY:"\u1021\u1004\u1039\u1021\u102c\u1038\u1010\u102d\u102f\u1038 Pack",MU:"\u1021\u1004\u103a\u1021\u102c\u1038\u1010\u102d\u102f\u1038 Pack"},BOOSTER_TITLE_2:{EN:"Buy sticks",MY:"Stick\u1019\u103a\u102c\u1038\u101d\u101a\u1039\u1019\u100a\u1039",MU:"Stick\u1019\u103b\u102c\u1038\u101d\u101a\u103a\u1019\u100a\u103a"},BOOSTER_DESC:{EN:"For this turn only",MY:"\u101a\u1001\u102f\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1021\u1010\u103c\u1000\u1039\u101e\u102c",MU:"\u101a\u1001\u102f\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1021\u1010\u103d\u1000\u103a\u101e\u102c"},BOOSTER_HP:{EN:"Max HP",MY:"Max HP",MU:"Max HP"},BOOSTER_CONFIRM:{EN:"Spend %d Ks main lalance\nto buy %d Sticks?",MY:"%d Stick \u101d\u101a\u1039\u101a\u1030\u101b\u1014\u1039 \u101c\u1000\u1039\u1000\u103a\u1014\u1039\u1031\u1004\u103c\n%d \u1000\u103a\u1015\u1039\u1000\u102d\u102f\u1021\u101e\u102f\u1036\u1038\u103b\u1015\u1033\u1019\u100a\u1039",MU:"%d Stick \u101d\u101a\u103a\u101a\u1030\u101b\u1014\u103a \u101c\u1000\u103a\u1000\u103b\u1014\u103a\u1004\u103d\u1031\n%d \u1000\u103b\u1015\u103a\u1000\u102d\u102f\u1021\u101e\u102f\u1036\u1038\u1015\u103c\u102f\u1019\u100a\u103a"},STORE_DESC:{EN:"Buy and equip skills for special powers",MY:"\u1021\u1011\u1030\u1038\u1015\u102b\u101d\u102b\u1019\u103a\u102c\u1038\u101b\u1031\u1021\u102c\u1004\u1039\u1000\u103c\u107d\u1019\u1039\u1038\u1000\u103a\u1004\u1039\u1019\u1088\u1019\u103a\u102c\u1038\u101d\u101a\u1039\u101a\u1030\u1015\u102b",MU:"\u1021\u1011\u1030\u1038\u1015\u102b\u101d\u102b\u1019\u103b\u102c\u1038\u101b\u1021\u1031\u102c\u1004\u103a\u1000\u103b\u103d\u1019\u103a\u1038\u1000\u103b\u1004\u103a\u1019\u103e\u102f\u1019\u103b\u102c\u1038\u101d\u101a\u103a\u101a\u1030\u1015\u102b"},STORE_BUY_WITH:{EN:"Buy with 1000",MY:"\u1041\u1040\u1040\u1040\u103b\u1016\u1004\u1037\u1039\u101d\u101a\u1039\u1019\u100a\u1039",MU:"\u1041\u1040\u1040\u1040\u1016\u103c\u1004\u1037\u103a\u101d\u101a\u103a\u1019\u100a\u103a"},STORE_TURN_1:{EN:"Get 30 turns",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039 \u1043\u1040\u101a\u1030\u1019\u100a\u1039",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a \u1043\u1040\u101a\u1030\u1019\u100a\u103a"},STORE_TURN_2:{EN:"Not affect daily limit",MY:"\u1031\u1014\u1094\u1005\u1025\u1039\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u101e\u1010\u1039\u1019\u103d\u1010\u1039\n\u1001\u103a\u1000\u1039\u1000\u102d\u102f\u1019\u1031\u103b\u1015\u102c\u1004\u1039\u1038\u101c\u1032\u108f\u102d\u102f\u1004\u1039\u1015\u102b",MU:"\u1014\u1031\u1037\u1005\u1009\u103a\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u101e\u1010\u103a\u1019\u103e\u1010\u103a\n\u1001\u103b\u1000\u103a\u1000\u102d\u102f\u1019\u1015\u103c\u1031\u102c\u1004\u103a\u1038\u101c\u1032\u1014\u102d\u102f\u1004\u103a\u1015\u102b"},STORE_FREEZE:{EN:"Freeze all\nenemies for 2s",MY:"\u101b\u1014\u1039\u101e\u1030\u1019\u103a\u102c\u1038 2\u1005\u1000\u1060\u1014\u1094\u1039\n\u1031\u101b\u1001\u1032\u101e\u103c\u102c\u1038\u1031\u1005\u103b\u1001\u1004\u1039\u1038",MU:"\u101b\u1014\u103a\u101e\u1030\u1019\u103b\u102c\u1038 2\u1005\u1000\u1039\u1000\u1014\u1037\u103a\n\u101b\u1031\u1001\u1032\u101e\u103d\u102c\u1038\u1005\u1031\u1001\u103c\u1004\u103a\u1038"},STORE_SLOW:{EN:"Slow enemies\n70% for 5s",MY:"\u101b\u1014\u1039\u101e\u1030\u1094\u101c\u1088\u1015\u1039\u101b\u103d\u102c\u1038\u1019\u1088 70% \u1001\u1014\u1094\u1039\n5\u1005\u1000\u1060\u1014\u1094\u1039\u107e\u1000\u102c\u1031\u108f\u103d\u1038\u101e\u103c\u102c\u1038\u1031\u1005\u103b\u1001\u1004\u1039\u1038",MU:"\u101b\u1014\u103a\u101e\u1030\u1037\u101c\u103e\u102f\u1015\u103a\u101b\u103e\u102c\u1038\u1019\u103e\u102f 70%\u1001\u1014\u1037\u103a\n5\u1005\u1000\u1039\u1000\u1014\u1037\u103a\u1000\u103c\u102c\u1014\u103e\u1031\u1038\u101e\u103d\u102c\u1038\u1005\u1031\u1001\u103c\u1004\u103a\u1038"},STORE_ATTACK:{EN:"+50% Attack\nfor 5s",MY:"5\u1005\u1000\u1060\u1014\u1094\u1039\u107e\u1000\u102c \u1010\u102d\u102f\u1000\u1039\u1001\u102d\u102f\u1000\u1039\u1019\u1088\u1021\u102c\u1038\n50%\u1010\u102d\u102f\u1038\u1010\u1010\u1039\u1031\u1005\u103b\u1001\u1004\u1039\u1038",MU:"5\u1005\u1000\u1039\u1000\u1014\u1037\u103a\u1000\u103c\u102c \u1010\u102d\u102f\u1000\u103a\u1001\u102d\u102f\u1000\u103a\u1019\u103e\u102f\u1021\u102c\u1038\n50%\u1010\u102d\u102f\u1038\u1010\u1010\u103a\u1005\u1031\u1001\u103c\u1004\u103a\u1038"},STORE_INVISIBLE:{EN:"Be invisible\nfor 5s",MY:"5\u1005\u1000\u1060\u1014\u1094\u1039\u107e\u1000\u102c\n\u1000\u102d\u102f\u101a\u1039\u1031\u1016\u103a\u102c\u1000\u1039\u108f\u102d\u102f\u1004\u1039\u103b\u1001\u1004\u1039\u1038",MU:"5\u1005\u1000\u1039\u1000\u1014\u1037\u103a\u1000\u103c\u102c\n\u1000\u102d\u102f\u101a\u103a\u1016\u103b\u1031\u102c\u1000\u103a\u1014\u102d\u102f\u1004\u103a\u1001\u103c\u1004\u103a\u1038"},COLLECTION_DESC_1:{EN:"Collect all 10 sims to win",MY:"\u1006\u1004\u1039\u1038\u1000\u1012\u1039 \u1041\u1040\u1001\u102f\u1005\u102f\u1031\u1006\u102c\u1004\u1039\u1038\u107f\u1015\u102e\u1038",MU:"\u1006\u1004\u103a\u1038\u1000\u1012\u103a \u1041\u1040\u1001\u102f\u1005\u102f\u1006\u1031\u102c\u1004\u103a\u1038\u1015\u103c\u102e\u1038"},COLLECTION_DESC_2:{EN:"20,000,000 Kyats",MY:"20,000,000 Kyats",MU:"20,000,000 Kyats"},COLLECTION_DESC_3:{EN:"as Grand Prize.",MY:"\u1000\u102d\u102f\u1006\u102f\u1080\u1000\u102e\u1038\u101a\u1030\u1019\u100a\u1039",MU:"\u1000\u102d\u102f\u1006\u102f\u1000\u103c\u102e\u1038\u101a\u1030\u1019\u100a\u103a"},COLLECTION_DESC_4:{EN:"Play more to get more chance",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103a\u102c\u1038\u101b\u101a\u1030\u108f\u102d\u102f\u1004\u1039\u1019\u100a\u1037\u1039",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103b\u102c\u1038\u101b\u101a\u1030\u1014\u102d\u102f\u1004\u103a\u1019\u100a\u1037\u103a"},COLLECTION_DESC_5:{EN:"to win these amazing prizes!",MY:"\u1021\u1001\u103c\u1004\u1037\u1039\u1021\u1031\u101b\u1038\u1015\u102d\u102f\u101b\u1031\u1021\u102c\u1004\u1039\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b",MU:"\u1021\u1001\u103d\u1004\u1037\u103a\u1021\u101b\u1031\u1038\u1015\u102d\u102f\u101b\u1021\u1031\u102c\u1004\u103a\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b"},COLLECTION_DESC_6:{EN:"to win more prizes!",MY:"\u1021\u1001\u103c\u1004\u1037\u1039\u1021\u1031\u101b\u1038\u1015\u102d\u102f\u101b\u1031\u1021\u102c\u1004\u1039\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b",MU:"\u1021\u1001\u103d\u1004\u1037\u103a\u1021\u101b\u1031\u1038\u1015\u102d\u102f\u101b\u1021\u1031\u102c\u1004\u103a\u1015\u102d\u102f\u1000\u1005\u102c\u1038\u1015\u102b"},COLLECTION_DESC_7:{EN:"Check your grand prize collection progress!",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u101b\u101a\u1030\u101b\u1014\u1039\u1005\u102f\u1031\u1006\u102c\u1004\u1039\u1038\u1019\u1088\u1019\u103a\u102c\u1038",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u101b\u101a\u1030\u101b\u1014\u103a\u1005\u102f\u1006\u1031\u102c\u1004\u103a\u1038\u1019\u103e\u102f\u1019\u103b\u102c\u1038"},COLLECTION_TARGET:{EN:"Your Target",MY:"\u101e\u1004\u1037\u1039\u101b\u100a\u1039\u1019\u103d\u1014\u1039\u1038\u1001\u103a\u1000\u1039",MU:"\u101e\u1004\u1037\u103a\u101b\u100a\u103a\u1019\u103e\u1014\u103a\u1038\u1001\u103b\u1000\u103a"},LB_DESC:{EN:"See how you compete with other players!",MY:"\u1021\u103b\u1001\u102c\u1038\u1000\u1005\u102c\u1038\u101e\u1019\u102c\u1038\u1031\u1010\u103c\u108f\u103d\u1004\u1037\u1039\u101a\u103d\u1025\u1039\u107f\u1015\u102d\u1033\u1004\u1039\u1019\u1088\u101b\u101c\u1012\u1039",MU:"\u1021\u1001\u103c\u102c\u1038\u1000\u1005\u102c\u1038\u101e\u1019\u102c\u1038\u1010\u103d\u1031\u1014\u103e\u1004\u1037\u103a\u101a\u103e\u1009\u103a\u1015\u103c\u102d\u102f\u1004\u103a\u1019\u103e\u102f\u101b\u101c\u1012\u103a"},LB_STAR_TITLE:{EN:"TOP STAR",MY:"TOP STAR",MU:"TOP STAR"},LB_STAR_DESC:{EN:"Top 10 weekly star collectors will receive 10,000Ks Emoney each",MY:"\u101a\u1001\u102f\u1021\u1015\u1010\u1039\u1021\u1010\u103c\u1000\u1039\u1011\u102d\u1015\u1039\u1010\u1014\u1039\u1038\u107e\u1000\u101a\u1039\u1021\u1019\u103a\u102c\u1038\u1005\u102f\u1006\u102f \u1041\u1040\u1031\u101a\u102c\u1000\u1039\n\u1005\u102c\u101b\u1004\u1039\u1038\u1010\u103c\u1004\u1039\u1015\u102b\u101d\u1004\u1039\u1015\u102b\u1000 Emoney \u1041\u1040,\u1040\u1040\u1040\u1000\u103a\u1015\u1039\u1005\u102e\u101b\u101b\u103d\u102d\u1015\u102b\u1019\u100a\u1039\u104b",MU:"\u101a\u1001\u102f\u1021\u1015\u1010\u103a\u1021\u1010\u103d\u1000\u103a\u1011\u102d\u1015\u103a\u1010\u1014\u103a\u1038\u1000\u103c\u101a\u103a\u1021\u1019\u103b\u102c\u1038\u1005\u102f\u1006\u102f \u1041\u1040\u101a\u1031\u102c\u1000\u103a\n\u1005\u102c\u101b\u1004\u103a\u1038\u1010\u103d\u1004\u103a\u1015\u102b\u101d\u1004\u103a\u1015\u102b\u1000 Emoney \u1041\u1040,\u1040\u1040\u1040\u1000\u103b\u1015\u103a\u1005\u102e\u101b\u101b\u103e\u102d\u1015\u102b\u1019\u100a\u103a\u104b"},LB_STAR_TIME:{EN:"Star Times",MY:"Star Times",MU:"Star Times"},LB_STARS:{EN:"Stars",MY:"Stars",MU:"Stars"},LB_SCORE_TITLE:{EN:"TOP SCORE",MY:"TOP SCORE",MU:"TOP SCORE"},LB_SCORE_TIMES:{EN:"Score time",MY:"Score time",MU:"Score time"},LB_SCORES:{EN:"Score",MY:"Score",MU:"Score"},LB_WINNER_TITLE:{EN:"WINNER LIST",MY:"\u1000\u1036\u1011\u1030\u1038\u101b\u103d\u1004\u1039\u1019\u103a\u102c\u1038",MU:"\u1000\u1036\u1011\u1030\u1038\u101b\u103e\u1004\u103a\u1019\u103b\u102c\u1038"},LB_WINNER_GRAND:{EN:"Grand Prizes",MY:"\u1011\u102d\u1015\u1039\u1010\u1014\u1039\u1038\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1011\u102d\u1015\u103a\u1010\u1014\u103a\u1038\u1006\u102f\u1019\u103b\u102c\u1038"},LB_WINNER_PREMIUM:{EN:"Premium Prizes",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103b\u102c\u1038"},LB_THIS_WEEK:{EN:"This Week",MY:"\u101a\u1001\u102f\u1021\u1015\u102b\u1010\u1039",MU:"\u101a\u1001\u102f\u1021\u1015\u102b\u1010\u103a"},LB_LAST_WEEK:{EN:"Last Week",MY:"\u101a\u1001\u1004\u1039\u1021\u1015\u102b\u1010\u1039",MU:"\u101a\u1001\u1004\u103a\u1021\u1015\u102b\u1010\u103a"},LB_PERIOD:{EN:"Period:",MY:"\u1021\u1001\u103a\u102d\u1014\u1039",MU:"\u1021\u1001\u103b\u102d\u1014\u103a"},GG_GIFT:{EN:"GIFTS",MY:"\u1006\u102f\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1019\u103a\u102c\u1038",MU:"\u1006\u102f\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1019\u103b\u102c\u1038"},GG_GIFT_SPECIAL:{EN:"SPECIAL PRIZES",MY:"\u1005\u1015\u102b\u101a\u1039\u101b\u103d\u101a\u1039\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1005\u1015\u102b\u101a\u103a\u101b\u103e\u101a\u103a\u1006\u102f\u1019\u103b\u102c\u1038"},GG_GUIDE:{EN:"GUIDE",MY:"\u101c\u1019\u1039\u1038\u106b\u108a\u1014\u1039\u1001\u103a\u1000\u1039",MU:"\u101c\u1019\u103a\u1038\u100a\u103d\u103e\u1014\u103a\u1001\u103b\u1000\u103a"},GG_GUIDE_01:{EN:"How to play game?",MY:"\u1002\u102d\u1019\u1039\u1038\u1018\u101a\u1039\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u101b\u1019\u101c\u1032",MU:"\u1002\u102d\u1019\u103a\u1038\u1018\u101a\u103a\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u101b\u1019\u101c\u1032"},GG_GUIDE_02:{EN:"How to view history?",MY:"History \u1000\u102d\u102f\u1018\u101a\u1039\u101c\u102d\u102f\u107e\u1000\u100a\u1037\u1039\u101b\u1019\u101c\u1032",MU:"History \u1000\u102d\u102f\u1018\u101a\u103a\u101c\u102d\u102f\u1000\u103c\u100a\u1037\u103a\u101b\u1019\u101c\u1032"},GG_GUIDE_03:{EN:"How to redeem gifts?",MY:"\u1006\u102f\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1031\u1010\u103c\u1018\u101a\u1039\u101c\u102d\u102f\u1011\u102f\u1010\u1039\u101a\u1030\u101b\u1019\u101c\u1032",MU:"\u1006\u102f\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1010\u103d\u1031\u1018\u101a\u103a\u101c\u102d\u102f\u1011\u102f\u1010\u103a\u101a\u1030\u101b\u1019\u101c\u1032"},GG_GUIDE_04:{EN:"How to to up sticks?",MY:"Stick \u101b\u1031\u1021\u102c\u1004\u1039\u1018\u101a\u1039\u101c\u102d\u102f\u101c\u102f\u1015\u1039\u101b\u1019\u101c\u1032",MU:"Stick \u101b\u1021\u1031\u102c\u1004\u103a\u1018\u101a\u103a\u101c\u102d\u102f\u101c\u102f\u1015\u103a\u101b\u1019\u101c\u1032"},HISTORY_DESC_1:{EN:"Get more turns after buying\nPackage/topup or buy at the Store!",MY:"\u1015\u1010\u1037\u1039\u1031\u1000\u1037\u1001\u1039\u103a\u101d\u101a\u1039\u101a\u1030\u107f\u1015\u102e\u1038\u104a\u1016\u102f\u1014\u1039\u1038\u1031\u1004\u103c\u103b\u1016\u100a\u1037\u1039\u107f\u1015\u102e\u1038\n(\u101e\u102d\u102f\u1094) \u1005\u1010\u102d\u102f\u1038\u1019\u103d\u101d\u101a\u1039\u101a\u1030\u107f\u1015\u102e\u1038\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1019\u103a\u102c\u1038\u1015\u102d\u102f\u1019\u102d\u102f\u101b\u101a\u1030\u1015\u102b",MU:"\u1015\u1010\u1037\u103a\u1000\u1031\u1037\u1001\u103a\u103b\u101d\u101a\u103a\u101a\u1030\u1015\u103c\u102e\u1038\u104a\u1016\u102f\u1014\u103a\u1038\u1004\u103d\u1031\u1016\u103c\u100a\u1037\u103a\u1015\u103c\u102e\u1038\n(\u101e\u102d\u102f\u1037) \u1005\u1010\u102d\u102f\u1038\u1019\u103e\u101d\u101a\u103a\u101a\u1030\u1015\u103c\u102e\u1038\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1019\u103b\u102c\u1038\u1015\u102d\u102f\u1019\u102d\u102f\u101b\u101a\u1030\u1015\u102b"},HISTORY_DESC_2:{EN:"Tap for details!",MY:"\u1021\u1031\u101e\u1038\u1005\u102d\u1010\u1039\u107e\u1000\u100a\u1037\u1039\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b",MU:"\u1021\u101e\u1031\u1038\u1005\u102d\u1010\u103a\u1000\u103c\u100a\u1037\u103a\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b"},HISTORY_DESC_3:{EN:"Check your received turns & prizes here!",MY:"\u101b\u101b\u103d\u102d\u1011\u102c\u1038\u101e\u100a\u1037\u1039\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1019\u103a\u102c\u1038\u108f\u103d\u1004\u1037\u1039\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u101b\u101b\u103e\u102d\u1011\u102c\u1038\u101e\u100a\u1037\u103a\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1019\u103b\u102c\u1038\u1014\u103e\u1004\u1037\u103a\u1006\u102f\u1019\u103b\u102c\u1038"},HISTORY_TURN:{EN:"TURN",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},HISTORY_TURNS:{EN:"Turn",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a"},HISTORY_PRIZE:{EN:"PRIZE",MY:"\u1006\u102f\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039",MU:"\u1006\u102f\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a"},HISTORY_GIFT:{EN:"Received Gifts",MY:"\u101b\u101b\u103d\u102d\u101e\u100a\u1037\u1039\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u101b\u101b\u103e\u102d\u101e\u100a\u1037\u103a\u1006\u102f\u1019\u103b\u102c\u1038"},HISTORY_LUCKY_CODE:{EN:"Lucky Code",MY:"\u101c\u1015\u1039\u1000\u102e\u1038\u1000\u102f\u1012\u1039",MU:"\u101c\u1015\u103a\u1000\u102e\u1038\u1000\u102f\u1012\u103a"},HISTORY_LUCKY_CODE_DESC:{EN:"Lucky Codes will be selected\nduring livestreams to win 20,000,000Ks",MY:"LiveStream \u1019\u103a\u102c\u1038\u1010\u103c\u1004\u1039 \u101c\u1015\u1039\u1000\u102e\u1038\u1000\u102f\u1012\u1039\u1019\u103a\u102c\u1038\u1019\u103d\n\u101e\u102d\u1014\u1039\u1038\u1042\u1040\u1040\u1000\u1036\u1011\u1030\u1038\u101b\u103d\u1004\u1039\u1031\u1090\u103c\u1038\u1001\u103a\u101a\u1039\u1015\u102b\u1019\u100a\u1039",MU:"LiveStream \u1019\u103b\u102c\u1038\u1010\u103d\u1004\u103a \u101c\u1015\u103a\u1000\u102e\u1038\u1000\u102f\u1012\u103a\u1019\u103b\u102c\u1038\u1019\u103e\n\u101e\u102d\u1014\u103a\u1038\u1042\u1040\u1040\u1000\u1036\u1011\u1030\u1038\u101b\u103e\u1004\u103a\u101b\u103d\u1031\u1038\u1001\u103b\u101a\u103a\u1015\u102b\u1019\u100a\u103a"},HISTORY_GIFT_CODE:{EN:"Emoney Gift Code",MY:"Emoney\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039",MU:"Emoney\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a"},HISTORY_GIFT_CODE_DESC_1:{EN:"Input Gift Code to claim\nyour emoney prize.",MY:"Emoney \u1006\u102f\u101a\u1030\u101b\u1014\u1039\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039\u1011\u100a\u1037\u1039\u1015\u102b",MU:"Emoney \u1006\u102f\u101a\u1030\u101b\u1014\u103a\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a\u1011\u100a\u1037\u103a\u1015\u102b"},HISTORY_GIFT_CODE_DESC_2:{EN:"Tap me to get MytelPay application!",MY:"MytelPay App \u101b\u101a\u1030\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b",MU:"MytelPay App \u101b\u101a\u1030\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b"},HISTORY_GIFT_CODE_DESC_3:{EN:"Gift code can be used one time only. You can claim\non MytelPay app and please do not share to anyone",MY:"\u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039\u1019\u103a\u102c\u1038\u1000\u102d\u102f\u1010\u1005\u1039\u1080\u1000\u102d\u1019\u1039\u101e\u102c\u1021\u101e\u102f\u1036\u1038\u103b\u1015\u1033\u108f\u102d\u102f\u1004\u1039\u1015\u102b\u101e\u100a\u1039\u104b MytelPay \u101c\u1000\u1039\u1031\u1006\u102c\u1004\u1039\u1000\u102f\u1012\u1039\n\u1010\u103c\u1004\u1039\u1011\u100a\u1037\u1039\u101e\u103c\u1004\u1039\u1038\u101b\u1019\u100a\u1039\u103b\u1016\u1005\u1039\u107f\u1015\u102e\u1038 \u1010\u1005\u1039\u103b\u1001\u102c\u1038\u101e\u1030\u1000\u102d\u102f\u1019\u103d\u103a\u1031\u101d\u103b\u1001\u1004\u1039\u1038\u1019\u103b\u1015\u1033\u101c\u102f\u1015\u1039\u1015\u102b\u108f\u103d\u1004\u1037\u1039\u104b",MU:"\u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a\u1019\u103b\u102c\u1038\u1000\u102d\u102f\u1010\u1005\u103a\u1000\u103c\u102d\u1019\u103a\u101e\u102c\u1021\u101e\u102f\u1036\u1038\u1015\u103c\u102f\u1014\u102d\u102f\u1004\u103a\u1015\u102b\u101e\u100a\u103a\u104b MytelPay \u101c\u1000\u103a\u1006\u1031\u102c\u1004\u103a\u1000\u102f\u1012\u103a\n\u1010\u103d\u1004\u103a\u1011\u100a\u1037\u103a\u101e\u103d\u1004\u103a\u1038\u101b\u1019\u100a\u103a\u1016\u103c\u1005\u103a\u1015\u103c\u102e\u1038 \u1010\u1005\u103a\u1001\u103c\u102c\u1038\u101e\u1030\u1000\u102d\u102f\u1019\u103b\u103e\u101d\u1031\u1001\u103c\u1004\u103a\u1038\u1019\u1015\u103c\u102f\u101c\u102f\u1015\u103a\u1015\u102b\u1014\u103e\u1004\u1037\u103a\u104b"},END_GAMEOVER:{EN:"Game Over",MY:"Game Over",MU:"Game Over"},END_BEST_SCORE:{EN:"BEST\nSCORE",MY:"\u1021\u1031\u1000\u102c\u1004\u1039\u1038\n\u1006\u102f\u1036\u1038\u101b\u1019\u103d\u1010\u1039",MU:"\u1021\u1000\u1031\u102c\u1004\u103a\u1038\n\u1006\u102f\u1036\u1038\u101b\u1019\u103e\u1010\u103a"},END_REPLAY:{EN:"PLAY AGAIN",MY:"\u1011\u1015\u1039\u200c\u1000\u1005\u102c\u1038",MU:"\u1011\u1015\u103a\u200c\u1000\u1005\u102c\u1038"},END_PRIZE:{EN:"YOU WON THESE AMAZING PRIZES",MY:"\u101e\u1004\u1039\u1031\u1021\u102c\u1000\u1039\u1015\u102b\u1006\u102f\u1080\u1000\u102e\u1038\u1019\u103a\u102c\u1038\u101b\u101b\u103d\u102d\u1015\u102b\u101e\u100a\u1039",MU:"\u101e\u1004\u103a\u1021\u1031\u102c\u1000\u103a\u1015\u102b\u1006\u102f\u1000\u103c\u102e\u1038\u1019\u103b\u102c\u1038\u101b\u101b\u103e\u102d\u1015\u102b\u101e\u100a\u103a"},TUTOR_TITLE:{EN:"How to play in 3 steps",MY:"\u1018\u101a\u1039\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u1019\u101c\u1032",MU:"\u1018\u101a\u103a\u101c\u102d\u102f\u1000\u1005\u102c\u1038\u1019\u101c\u1032"},TUTOR_DESC_1:{EN:"Keep MoMo running as\nfar as possible",MY:"\u1019\u102d\u102f\u1019\u102d\u102f\u1000\u102d\u102f \u103b\u1019\u1014\u1039\u103b\u1019\u1014\u1039\u1031\u103b\u1015\u1038\u1001\u102d\u102f\u1004\u1039\u1038\u1015\u102b",MU:"\u1019\u102d\u102f\u1019\u102d\u102f\u1000\u102d\u102f \u1019\u103c\u1014\u103a\u1019\u103c\u1014\u103a\u1015\u103c\u1031\u1038\u1001\u102d\u102f\u1004\u103a\u1038\u1015\u102b"},TUTOR_DESC_2:{EN:"Swipe to kill enemies",MY:"\u101b\u1014\u1039\u101e\u1030\u101e\u1010\u1039\u101b\u1014\u1039\u101b\u1014\u1039\u101e\u1030\u1031\u1015\u105a\u1000\u102d\u102f\u1015\u103c\u1010\u1039\u1006\u103c\u1032\u1015\u102b",MU:"\u101b\u1014\u103a\u101e\u1030\u101e\u1010\u103a\u101b\u1014\u103a\u101b\u1014\u103a\u101e\u1030\u1015\u1031\u102b\u103a\u1000\u102d\u102f\u1015\u103d\u1010\u103a\u1006\u103d\u1032\u1015\u102b"},TUTOR_DESC_3:{EN:"Jump over water!",MY:"\u1031\u101b\u1031\u1021\u102c\u1000\u1039\u1019\u1000\u103a\u1031\u1021\u102c\u1004\u1039\u1001\u102f\u1014\u1039\u1015\u102b",MU:"\u101b\u1031\u1021\u1031\u102c\u1000\u103a\u1019\u1000\u103b\u1021\u1031\u102c\u1004\u103a\u1001\u102f\u1014\u103a\u1015\u102b"},GAME_MODE:{EN:"CHOOSE GAME MODE",MY:"\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u1039\u1015\u102f\u1036\u1005\u1036\u1031\u1090\u103c\u1038\u1015\u102b",MU:"\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u103a\u1015\u102f\u1036\u1005\u1036\u101b\u103d\u1031\u1038\u1015\u102b"},GAME_MODE_VOICE:{EN:"Use voice",MY:"\u1021\u101e\u1036\u103b\u1016\u1004\u1037\u1039",MU:"\u1021\u101e\u1036\u1016\u103c\u1004\u1037\u103a"},GAME_MODE_VOICE_DESC_1:{EN:"SCREAM\n2 JUMP",MY:"\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u1021\u101e\u1036\n\u1011\u103c\u1000\u1039\u1015\u102b",MU:"\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1021\u101e\u1036\n\u1011\u103d\u1000\u103a\u1015\u102b"},GAME_MODE_VOICE_DESC_2:{EN:"To play with voice input, you need to:",MY:"\u1021\u101e\u1036\u103b\u1016\u1004\u1037\u1039\u1000\u1005\u102c\u1038\u101b\u1014\u1039 \u101e\u1004\u1039\u101e\u100a\u1039",MU:"\u1021\u101e\u1036\u1016\u103c\u1004\u1037\u103a\u1000\u1005\u102c\u1038\u101b\u1014\u103a \u101e\u1004\u103a\u101e\u100a\u103a"},GAME_MODE_VOICE_DESC_3:{EN:"1. Enable MyID to access microphone.",MY:"1.\u1019\u102d\u102f\u1000\u1039\u1001\u1090\u102d\u102f\u1016\u102f\u1014\u1039\u1038\u1021\u101e\u102f\u1036\u1038\u103b\u1015\u1033\u101b\u1014\u1039MyID\u1000\u102d\u102f\u1001\u103c\u1004\u1037\u1039\u103b\u1015\u1033\u1011\u102c\u1038\u1015\u102b",MU:"1.\u1019\u102d\u102f\u1000\u103a\u1001\u101b\u102d\u102f\u1016\u102f\u1014\u103a\u1038\u1021\u101e\u102f\u1036\u1038\u1015\u103c\u102f\u101b\u1014\u103aMyID\u1000\u102d\u102f\u1001\u103d\u1004\u1037\u103a\u1015\u103c\u102f\u1011\u102c\u1038\u1015\u102b"},GAME_MODE_HAND:{EN:"Use hand",MY:"\u101c\u1000\u1039\u103b\u1016\u1004\u1037\u1039",MU:"\u101c\u1000\u103a\u1016\u103c\u1004\u1037\u103a"},GAME_MODE_HAND_DESC:{EN:"SHAKE\n2 JUMP",MY:"\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u1016\u102f\u1014\u1039\u1038\u1000\u102d\u102f\n\u101c\u1088\u1015\u1039\u1001\u102b\u1015\u102b",MU:"\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1016\u102f\u1014\u103a\u1038\u1000\u102d\u102f\n\u101c\u103e\u102f\u1015\u103a\u1001\u102b\u1015\u102b"},WARNING_VOICE_1:{EN:"VOICE INPUT\nNOT DETECTED",MY:"\u1021\u101e\u1036\u1001\u103c\u1004\u1037\u1039\u103b\u1015\u1033\n\u1011\u102c\u1038\u103b\u1001\u1004\u1039\u1038\u1019\u101b\u103d\u102d\u1015\u102b",MU:"\u1021\u101e\u1036\u1001\u103d\u1004\u1037\u103a\u1015\u103c\u102f\n\u1011\u102c\u1038\u1001\u103c\u1004\u103a\u1038\u1019\u101b\u103e\u102d\u1015\u102b"},WARNING_VOICE_2:{EN:"PLEASE CHOOSE",MY:"\u1031\u1090\u103c\u1038\u1001\u103a\u101a\u1039\u1015\u102b",MU:"\u101b\u103d\u1031\u1038\u1001\u103b\u101a\u103a\u1015\u102b"},WARNING_VOICE_3:{EN:"\u201cSHAKE 2 JUMP MODE\u201d",MY:"\u201cSHAKE 2 JUMP MODE\u201d",MU:'"SHAKE 2 JUMP MODE"'},GAME_GO:{EN:"GO!",MY:"GO!",MU:"GO!"},GAME_WAVE:{EN:"Wave",MY:"Wave",MU:"Wave"},GAME_ENEMY_NOTICE:{EN:"Enemies incoming in",MY:"\u101b\u1014\u1039\u101e\u1030\u1031\u1010\u103c\u101c\u102c\u101b\u1014\u1039",MU:"\u101b\u1014\u103a\u101e\u1030\u1010\u103d\u1031\u101c\u102c\u101b\u1014\u103a"},GAME_WATER_NOTICE:{EN:"Water incoming in",MY:"\u1031\u101b\u1031\u1000\u103a\u102c\u1039\u103b\u1016\u1010\u1039\u101b\u1014\u1039",MU:"\u101b\u1031\u1000\u103b\u1031\u102c\u103a\u1016\u103c\u1010\u103a\u101b\u1014\u103a"},GAME_REVIVE_TITLE:{EN:"Oops\u2026 Revive now?",MY:"\u1021\u101e\u1000\u1039\u1006\u1000\u1039\u101c\u1000\u1039\u101b\u103d\u1004\u1039\u101e\u1014\u1039\u1031\u1005\u1019\u101c\u102c\u1038",MU:"\u1021\u101e\u1000\u103a\u1006\u1000\u103a\u101c\u1000\u103a\u101b\u103e\u1004\u103a\u101e\u1014\u103a\u1005\u1031\u1019\u101c\u102c\u1038"},GAME_REVIVE_DESC:{EN:"Get full health and move to next wave",MY:"Health \u1021\u103b\u1015\u100a\u1037\u1039\u103b\u1016\u1004\u1037\u1039 \u1031\u1014\u102c\u1000\u1039 wave \u101e\u102d\u102f\u1094\u101e\u103c\u102c\u1038\u1019\u100a\u1039",MU:"Health \u1021\u1015\u103c\u100a\u1037\u103a\u1016\u103c\u1004\u1037\u103a \u1014\u1031\u102c\u1000\u103a wave \u101e\u102d\u102f\u1037\u101e\u103d\u102c\u1038\u1019\u100a\u103a"},"GG_GRAND PRIZE":{EN:"GRAND PRIZE",MY:"\u1011\u102d\u1015\u1039\u1010\u1014\u1039\u1038\u1006\u102f",MU:"\u1011\u102d\u1015\u103a\u1010\u1014\u103a\u1038\u1006\u102f"},"GG_PREMIUM PRIZE":{EN:"PREMIUM PRIZES",MY:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103a\u102c\u1038",MU:"\u1021\u1011\u1030\u1038\u1006\u102f\u1019\u103b\u102c\u1038"},ENEMY_COMMING_TUT:{EN:"SWIPE TO\nKILL ENEMIES",MY:"\u101b\u1014\u1039\u101e\u1030\u101e\u1010\u1039\u101b\u1014\u1039 \u101b\u1014\u1039\u101e\u1030\n\u1031\u1015\u105a\u1000\u102d\u102f\u1015\u103c\u1010\u1039\u1006\u103c\u1032\u1015\u102b",MU:"\u101b\u1014\u103a\u101e\u1030\u101e\u1010\u103a\u101b\u1014\u103a \u101b\u1014\u103a\u101e\u1030\n\u1015\u1031\u102b\u103a\u1000\u102d\u102f\u1015\u103d\u1010\u103a\u1006\u103d\u1032\u1015\u102b"},TUTOR_DESC_3_IOS:{EN:"Shake to jump\nover water!",MY:"\u1031\u101b\u1021\u1031\u1015\u105a\u101e\u102d\u102f\u1094\u1031\u101b\u102c\u1000\u1039\u1031\u1021\u102c\u1004\u1039\n\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u1016\u102f\u1014\u1039\u1038\u1000\u102d\u102f\u101c\u1088\u1015\u1039\u1001\u102b\u1015\u102b\u104b",MU:"\u101b\u1031\u1021\u1015\u1031\u102b\u103a\u101e\u102d\u102f\u1037\u101b\u1031\u102c\u1000\u103a\u1021\u1031\u102c\u1004\u103a\n\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1016\u102f\u1014\u103a\u1038\u1000\u102d\u102f\u101c\u103e\u102f\u1015\u103a\u1001\u102b\u1015\u102b\u104b"},GAME_MODE_VOICE_DESC_4:{EN:'2. Tap "ALLOW" whenever you play Speak 2 Jump',MY:'2.\u1021\u101e\u1036\u103b\u1016\u1004\u1037\u1039\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u1039\u1021\u1001\u102b\u1010\u102d\u102f\u1004\u1039\u1038 "ALLOW" \u1000\u102d\u102f\u1031\u1090\u103c\u1038\u1015\u102b',MU:'2.\u1021\u101e\u1036\u1016\u103c\u1004\u1037\u103a\u1000\u1005\u102c\u1038\u1019\u100a\u1037\u103a\u1021\u1001\u102b\u1010\u102d\u102f\u1004\u103a\u1038 "ALLOW" \u1000\u102d\u102f\u101b\u103d\u1031\u1038\u1015\u102b'},STORE_BUY_WITH_500:{EN:"Buy with 500",MY:"\u1045\u1040\u1040 \u103b\u1016\u1004\u1037\u1039\u101d\u101a\u1039\u1019\u100a\u1039",MU:"\u1045\u1040\u1040 \u1016\u103c\u1004\u1037\u103a\u101d\u101a\u103a\u1019\u100a\u103a"},HISTORY_GIFT_CODE_DESC_4:{EN:"Tap me to to Follow Mytel fanpage!",MY:"Mytel Fanpage \u101e\u103c\u102c\u1038\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b\u104b",MU:"Mytel Fanpage \u101e\u103d\u102c\u1038\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b\u104b"},LB_WINNER_TITLE_2:{EN:"Collect all 10 sims to win 20,000,000 Kyats",MY:"\u1006\u1004\u1039\u1038\u1000\u1012\u1039\u1041\u1040\u1001\u102f\u1005\u102f\u1031\u1006\u102c\u1004\u1039\u1038\u107f\u1015\u102e\u1038 \u1031\u1004\u103c \u101e\u102d\u1014\u1039\u1038 \u1042\u1040\u1040\u101b\u101a\u1030\u1015\u102b\u104b",MU:"\u1006\u1004\u103a\u1038\u1000\u1012\u103a\u1041\u1040\u1001\u102f\u1005\u102f\u1006\u1031\u102c\u1004\u103a\u1038\u1015\u103c\u102e\u1038 \u1004\u103d\u1031 \u101e\u102d\u1014\u103a\u1038 \u1042\u1040\u1040\u101b\u101a\u1030\u1015\u102b\u104b"},WARNING_DESC:{EN:"Are you sure to quit this session?",MY:"\u101a\u1001\u102f\u1011\u103c\u1000\u1039\u1031\u1010\u102c\u1037\u1019\u103d\u102c\u1031\u101e\u1001\u103a\u102c\u1015\u102b\u101e\u101c\u102c\u1038\u104b",MU:"\u101a\u1001\u102f\u1011\u103d\u1000\u103a\u1010\u1031\u102c\u1037\u1019\u103e\u102c\u101e\u1031\u1001\u103b\u102c\u1015\u102b\u101e\u101c\u102c\u1038\u104b"},UI_ERROR:{EN:"Oops... Connection error!\nPlease try again later",MY:"\u1006\u1000\u1039\u101e\u103c\u101a\u1039\u1019\u1088\u103b\u1015\u1010\u1039\u1031\u1010\u102c\u1000\u1039\u1031\u1014\u1015\u102b\u101e\u103b\u1016\u1004\u1037\u1039\n\u103b\u1015\u1014\u1039\u101c\u100a\u1039\u1080\u1000\u102d\u1033\u1038\u1005\u102c\u1038\u1015\u102b\u104b",MU:"\u1006\u1000\u103a\u101e\u103d\u101a\u103a\u1019\u103e\u102f\u1015\u103c\u1010\u103a\u1010\u1031\u102c\u1000\u103a\u1014\u1031\u1015\u102b\u101e\u1016\u103c\u1004\u1037\u103a\n\u1015\u103c\u1014\u103a\u101c\u100a\u103a\u1000\u103c\u102d\u102f\u1038\u1005\u102c\u1038\u1015\u102b\u104b"},UI_CANCEL:{EN:"CANCEL",MY:"\u1011\u103c\u1000\u1039\u1019\u100a\u1039",MU:"\u1011\u103d\u1000\u103a\u1019\u100a\u103a"},UI_RETRY:{EN:"RETRY",MY:"\u103b\u1015\u1014\u1039\u101c\u102f\u1015\u1039\u1019\u100a\u1039",MU:"\u1015\u103c\u1014\u103a\u101c\u102f\u1015\u103a\u1019\u100a\u103a"},UI_QUIT:{EN:"QUIT",MY:"\u1011\u103c\u1000\u1039\u1001\u103c\u102c\u1019\u100a\u1039",MU:"\u1011\u103d\u1000\u103a\u1001\u103d\u102c\u1019\u100a\u103a"},UI_WRONG:{EN:"Oops\u2026\nSomething goes wrong!",MY:"\u1019\u103d\u102c\u1038\u101a\u103c\u1004\u1039\u1038\u1019\u1088\u103b\u1016\u1005\u1039\u1031\u1015\u105a\u1031\u1014\u1015\u102b\u101e\u100a\u1039\u104b",MU:"\u1019\u103e\u102c\u1038\u101a\u103d\u1004\u103a\u1038\u1019\u103e\u102f\u1016\u103c\u1005\u103a\u1015\u1031\u102b\u103a\u1014\u1031\u1015\u102b\u101e\u100a\u103a\u104b"},TUTOR_DESC_3_IOS_HAND:{EN:"Tap to jump\nover water!",MY:"\u1031\u101b\u1031\u1015\u105a\u1010\u103c\u1004\u1039\n\u1001\u102f\u1014\u1039\u101b\u1014\u1039\u108f\u103d\u102d\u1015\u1039\u1015\u102b\u104b",MU:"\u101b\u1031\u1015\u1031\u102b\u103a\u1010\u103d\u1004\u103a\n\u1001\u102f\u1014\u103a\u101b\u1014\u103a\u1014\u103e\u102d\u1015\u103a\u1015\u102b\u104b"},GAME_MODE_HAND_TAP_DESC:{EN:"TAP 2\nJUMP",MY:"\u1001\u102f\u1014\u1039\u101b\u1014\u1039\n\u108f\u103d\u102d\u1015\u1039\u1015\u102b\u104b",MU:"\u1001\u102f\u1014\u103a\u101b\u1014\u103a\n\u1014\u103e\u102d\u1015\u103a\u1015\u102b\u104b"},UI_NO_MORE_TURN:{EN:"OOPS... NO MORE PLAY TURNS.\nBUY AT STORE?",MY:"\u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u1000\u102f\u1014\u1039\u1006\u102f\u1036\u1038\u101e\u103c\u102c\u1038\u1015\u102b\u107f\u1015\u102e\u104b\n \u1000\u1005\u102c\u1038\u1001\u103c\u1004\u1037\u1039\u101d\u101a\u1039\u101c\u102d\u102f\u1015\u102b\u101e\u101c\u102c\u1038\u104b",MU:"\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u1000\u102f\u1014\u103a\u1006\u102f\u1036\u1038\u101e\u103d\u102c\u1038\u1015\u102b\u1015\u103c\u102e\u104b\n\u1000\u1005\u102c\u1038\u1001\u103d\u1004\u1037\u103a\u101d\u101a\u103a\u101c\u102d\u102f\u1015\u102b\u101e\u101c\u102c\u1038\u104b"},ENDGAME_ERROR_PRIZE:{EN:"Network unstable. \nPlease check History page\nlater for details.",MY:"\u1021\u1004\u103a\u1010\u102c\u1014\u1000\u103a\u1006\u1000\u103a\u101e\u103d\u101a\u103a\u1019\u103e\u102f \u1015\u103c\u1010\u103a\u1010\u1031\u102c\u1000\u103a\u1014\u1031\u1015\u102b\u101e\u1016\u103c\u1004\u1037\u103a \nHistory page \u1019\u103e \u1021\u1001\u103b\u1000\u103a\u1021\u101c\u1000\u103a \n\u1019\u103b\u102c\u1038\u1000\u102d\u102f \u1011\u1015\u103a\u1019\u1036\u1037 \u1005\u1005\u103a\u1006\u1031\u1038\u1015\u1031\u1038\u1015\u102b",MU:"\u1021\u1004\u103a\u1010\u102c\u1014\u1000\u103a\u1006\u1000\u103a\u101e\u103d\u101a\u103a\u1019\u103e\u102f \u1015\u103c\u1010\u103a\u1010\u1031\u102c\u1000\u103a\u1014\u1031\u1015\u102b\u101e\u1016\u103c\u1004\u1037\u103a \nHistory page \u1019\u103e \u1021\u1001\u103b\u1000\u103a\u1021\u101c\u1000\u103a \n\u1019\u103b\u102c\u1038\u1000\u102d\u102f \u1011\u1015\u103a\u1019\u1036\u1037 \u1005\u1005\u103a\u1006\u1031\u1038\u1015\u1031\u1038\u1015\u102b"}},cc._RF.pop()},{}]},{},["AudioController","Loader","PeerAction","PeerClientManager","PeerDefine","PeerManager","QRCodeGen","Popup","PopupManager","collisionReset","Events","Global","LoadingCover","LoadingIcon","Localization","SoundMgr","Spinner","cuboid","diamond","FrameMgr","GameDefine","Block","BlockSpawner","OtherBlockHitBox","Camera","ShakeEffect","GameManager","Ground","HelloWorld","OutOfBoundLine","ParticleManager","Pendulum","Spawn","LiveUI","ScoreUI","UIManager","Chain","Pen","Rope","playGround","playerBall","playerBallHitBox","Stage","StageGameEnd","StageInGame","StageLobby","StageMgr","StageQRscan","StageStartGame","StageTestGame","UIMgr","GameObject","Helper","LocalizedFrame","LocalizedText","ObjectMgr","Singleton","SingletonNode","Timer","levelDesign","strings"]); \ No newline at end of file diff --git a/assets/main/native/59/599e9beb-4ac3-4b3f-adf9-f2f1f97a8d40.d1456.plist b/assets/main/native/59/599e9beb-4ac3-4b3f-adf9-f2f1f97a8d40.d1456.plist new file mode 100644 index 0000000..d26c69b --- /dev/null +++ b/assets/main/native/59/599e9beb-4ac3-4b3f-adf9-f2f1f97a8d40.d1456.plist @@ -0,0 +1,116 @@ + + + + + angle + 0 + angleVariance + 360 + blendFuncDestination + 1 + blendFuncSource + 770 + duration + 0.1 + emitterType + 0 + finishColorAlpha + 0.8392156862745098 + finishColorBlue + 0 + finishColorGreen + 0 + finishColorRed + 1 + finishColorVarianceAlpha + 0.7372549019607844 + finishColorVarianceBlue + 0 + finishColorVarianceGreen + 0 + finishColorVarianceRed + 0 + finishParticleSize + 5 + finishParticleSizeVariance + 5 + gravityx + 30 + gravityy + -1000 + maxParticles + 200 + maxRadius + 0 + maxRadiusVariance + 0 + minRadius + 0 + particleLifespan + 0.20000000298023224 + particleLifespanVariance + 0.5 + radialAccelVariance + 65.79000091552734 + radialAcceleration + -671.0499877929688 + rotatePerSecond + 0 + rotatePerSecondVariance + 0 + rotationEnd + 0 + rotationEndVariance + 360 + rotationStart + 0 + rotationStartVariance + 360 + sourcePositionVariancex + 6 + sourcePositionVariancey + 6 + sourcePositionx + 373.7277526855469 + sourcePositiony + 478.40472412109375 + speed + 300 + speedVariance + 100 + startColorAlpha + 0.6392156862745098 + startColorBlue + 1 + startColorGreen + 1 + startColorRed + 1 + startColorVarianceAlpha + 0.7764705882352941 + startColorVarianceBlue + 0 + startColorVarianceGreen + 0 + startColorVarianceRed + 0 + startParticleSize + 20 + startParticleSizeVariance + 10 + tangentialAccelVariance + 65.79000091552734 + tangentialAcceleration + -92.11000061035156 + spriteFrameUuid + e2b0825b-7c94-4b9c-88c6-46b573ca8d14 + positionType + 1 + rotationIsDir + + minRadiusVariance + 0 + emissionRate + 999.999985098839 + + \ No newline at end of file diff --git a/assets/main/native/71/71561142-4c83-4933-afca-cb7a17f67053.c06a9.png b/assets/main/native/71/71561142-4c83-4933-afca-cb7a17f67053.c06a9.png deleted file mode 100644 index a3f2d16..0000000 Binary files a/assets/main/native/71/71561142-4c83-4933-afca-cb7a17f67053.c06a9.png and /dev/null differ diff --git a/assets/main/native/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.83fcc.png b/assets/main/native/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.83fcc.png deleted file mode 100644 index 3bb6159..0000000 Binary files a/assets/main/native/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.83fcc.png and /dev/null differ diff --git a/assets/main/native/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.90cf4.png b/assets/main/native/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.90cf4.png deleted file mode 100644 index dff9999..0000000 Binary files a/assets/main/native/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.90cf4.png and /dev/null differ diff --git a/cocos2d-js-min.2ba8b.js b/cocos2d-js-min.2ba8b.js deleted file mode 100644 index 210c39c..0000000 --- a/cocos2d-js-min.2ba8b.js +++ /dev/null @@ -1 +0,0 @@ -(function(t,e,i){function n(i){var r=e[i];if(!r){var s=t[i];if(!s)return;var a={};r=e[i]={exports:a},s[0]((function(t){return n(s[1][t]||t)}),r,a)}return r.exports}for(var r=0;r=0;i--)e.push(cc.v2(t[i].x,t[i].y));return e}function i(t){for(var e=[],i=0;i=this._duration},_cloneDecoration:function(t){t._repeatForever=this._repeatForever,t._speed=this._speed,t._timesForRepeat=this._timesForRepeat,t._easeList=this._easeList,t._speedMethod=this._speedMethod,t._repeatMethod=this._repeatMethod},_reverseEaseList:function(t){if(this._easeList){t._easeList=[];for(var e=0;e1.192092896e-7?this._duration:1.192092896e-7);e=1>e?e:1,this.update(e>0?e:0),this._repeatMethod&&this._timesForRepeat>1&&this.isDone()&&(this._repeatForever||this._timesForRepeat--,this.startWithTarget(this.target),this.step(this._elapsed-this._duration))},startWithTarget:function(t){cc.Action.prototype.startWithTarget.call(this,t),this._elapsed=0,this._firstTick=!0},reverse:function(){return cc.logID(1010),null},setAmplitudeRate:function(){cc.logID(1011)},getAmplitudeRate:function(){return cc.logID(1012),0},speed:function(t){return t<=0?(cc.logID(1013),this):(this._speedMethod=!0,this._speed*=t,this)},getSpeed:function(){return this._speed},setSpeed:function(t){return this._speed=t,this},repeat:function(t){return t=Math.round(t),isNaN(t)||t<1?(cc.logID(1014),this):(this._repeatMethod=!0,this._timesForRepeat*=t,this)},repeatForever:function(){return this._repeatMethod=!0,this._timesForRepeat=this.MAX_VALUE,this._repeatForever=!0,this}}),cc.actionInterval=function(t){return new cc.ActionInterval(t)},cc.Sequence=cc.Class({name:"cc.Sequence",extends:cc.ActionInterval,ctor:function(t){this._actions=[],this._split=null,this._last=0,this._reversed=!1;var e=t instanceof Array?t:arguments;if(1!==e.length){var i=e.length-1;if(i>=0&&null==e[i]&&cc.logID(1015),i>=0){for(var n,r=e[0],s=1;s1?e%1:e),this._last=n)},reverse:function(){var t=cc.Sequence._actionOneTwo(this._actions[1].reverse(),this._actions[0].reverse());return this._cloneDecoration(t),this._reverseEaseList(t),t._reversed=!0,t}}),cc.sequence=function(t){var e=t instanceof Array?t:arguments;if(1===e.length)return cc.errorID(1019),null;var i=e.length-1;i>=0&&null==e[i]&&cc.logID(1015);var n=null;if(i>=0){n=e[0];for(var r=1;r<=i;r++)e[r]&&(n=cc.Sequence._actionOneTwo(n,e[r]))}return n},cc.Sequence._actionOneTwo=function(t,e){var i=new cc.Sequence;return i.initWithTwoActions(t,e),i},cc.Repeat=cc.Class({name:"cc.Repeat",extends:cc.ActionInterval,ctor:function(t,e){this._times=0,this._total=0,this._nextDt=0,this._actionInstant=!1,this._innerAction=null,void 0!==e&&this.initWithAction(t,e)},initWithAction:function(t,e){var i=t._duration*e;return!!this.initWithDuration(i)&&(this._times=e,this._innerAction=t,t instanceof cc.ActionInstant&&(this._actionInstant=!0,this._times-=1),this._total=0,!0)},clone:function(){var t=new cc.Repeat;return this._cloneDecoration(t),t.initWithAction(this._innerAction.clone(),this._times),t},startWithTarget:function(t){this._total=0,this._nextDt=this._innerAction._duration/this._duration,cc.ActionInterval.prototype.startWithTarget.call(this,t),this._innerAction.startWithTarget(t)},stop:function(){this._innerAction.stop(),cc.Action.prototype.stop.call(this)},update:function(t){t=this._computeEaseTime(t);var e=this._innerAction,i=this._duration,n=this._times,r=this._nextDt;if(t>=r){for(;t>r&&this._total1?1:r;t>=1&&this._total=0&&null==e[i]&&cc.logID(1015),i>=0){for(var n,r=e[0],s=1;sr?this._two=cc.Sequence._actionOneTwo(e,cc.delayTime(n-r)):n0&&null==e[e.length-1]&&cc.logID(1015);for(var i=e[0],n=1;n180&&(i-=360),i<-180&&(i+=360),this._startAngle=e,this._angle=cc.RotateTo._reverse?i:-i},reverse:function(){cc.logID(1016)},update:function(t){t=this._computeEaseTime(t),this.target&&(this.target.angle=this._startAngle+this._angle*t)}}),cc.rotateTo=function(t,e){return new cc.RotateTo(t,e)},cc.RotateBy=cc.Class({name:"cc.RotateBy",extends:cc.ActionInterval,statics:{_reverse:!1},ctor:function(t,e){e*=cc.RotateBy._reverse?1:-1,this._deltaAngle=0,this._startAngle=0,void 0!==e&&this.initWithDuration(t,e)},initWithDuration:function(t,e){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._deltaAngle=e,!0)},clone:function(){var t=new cc.RotateBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._deltaAngle),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._startAngle=t.angle},update:function(t){t=this._computeEaseTime(t),this.target&&(this.target.angle=this._startAngle+this._deltaAngle*t)},reverse:function(){var t=new cc.RotateBy;return t.initWithDuration(this._duration,-this._deltaAngle),this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.rotateBy=function(t,e){return new cc.RotateBy(t,e)},cc.MoveBy=cc.Class({name:"cc.MoveBy",extends:cc.ActionInterval,ctor:function(t,e,i){this._positionDelta=cc.v2(0,0),this._startPosition=cc.v2(0,0),this._previousPosition=cc.v2(0,0),void 0!==e&&cc.MoveBy.prototype.initWithDuration.call(this,t,e,i)},initWithDuration:function(t,e,i){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(void 0!==e.x&&(i=e.y,e=e.x),this._positionDelta.x=e,this._positionDelta.y=i,!0)},clone:function(){var t=new cc.MoveBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._positionDelta),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t);var e=t.x,i=t.y;this._previousPosition.x=e,this._previousPosition.y=i,this._startPosition.x=e,this._startPosition.y=i},update:function(t){if(t=this._computeEaseTime(t),this.target){var e=this._positionDelta.x*t,i=this._positionDelta.y*t,n=this._startPosition;if(cc.macro.ENABLE_STACKABLE_ACTIONS){var r=this.target.x,s=this.target.y,a=this._previousPosition;n.x=n.x+r-a.x,n.y=n.y+s-a.y,e+=n.x,i+=n.y,a.x=e,a.y=i,this.target.setPosition(e,i)}else this.target.setPosition(n.x+e,n.y+i)}},reverse:function(){var t=new cc.MoveBy(this._duration,cc.v2(-this._positionDelta.x,-this._positionDelta.y));return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.moveBy=function(t,e,i){return new cc.MoveBy(t,e,i)},cc.MoveTo=cc.Class({name:"cc.MoveTo",extends:cc.MoveBy,ctor:function(t,e,i){this._endPosition=cc.v2(0,0),void 0!==e&&this.initWithDuration(t,e,i)},initWithDuration:function(t,e,i){return!!cc.MoveBy.prototype.initWithDuration.call(this,t,e,i)&&(void 0!==e.x&&(i=e.y,e=e.x),this._endPosition.x=e,this._endPosition.y=i,!0)},clone:function(){var t=new cc.MoveTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._endPosition),t},startWithTarget:function(t){cc.MoveBy.prototype.startWithTarget.call(this,t),this._positionDelta.x=this._endPosition.x-t.x,this._positionDelta.y=this._endPosition.y-t.y}}),cc.moveTo=function(t,e,i){return new cc.MoveTo(t,e,i)},cc.SkewTo=cc.Class({name:"cc.SkewTo",extends:cc.ActionInterval,ctor:function(t,e,i){this._skewX=0,this._skewY=0,this._startSkewX=0,this._startSkewY=0,this._endSkewX=0,this._endSkewY=0,this._deltaX=0,this._deltaY=0,void 0!==i&&cc.SkewTo.prototype.initWithDuration.call(this,t,e,i)},initWithDuration:function(t,e,i){var n=!1;return cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._endSkewX=e,this._endSkewY=i,n=!0),n},clone:function(){var t=new cc.SkewTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._endSkewX,this._endSkewY),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._startSkewX=t.skewX%180,this._deltaX=this._endSkewX-this._startSkewX,this._deltaX>180&&(this._deltaX-=360),this._deltaX<-180&&(this._deltaX+=360),this._startSkewY=t.skewY%360,this._deltaY=this._endSkewY-this._startSkewY,this._deltaY>180&&(this._deltaY-=360),this._deltaY<-180&&(this._deltaY+=360)},update:function(t){t=this._computeEaseTime(t),this.target.skewX=this._startSkewX+this._deltaX*t,this.target.skewY=this._startSkewY+this._deltaY*t}}),cc.skewTo=function(t,e,i){return new cc.SkewTo(t,e,i)},cc.SkewBy=cc.Class({name:"cc.SkewBy",extends:cc.SkewTo,ctor:function(t,e,i){void 0!==i&&this.initWithDuration(t,e,i)},initWithDuration:function(t,e,i){var n=!1;return cc.SkewTo.prototype.initWithDuration.call(this,t,e,i)&&(this._skewX=e,this._skewY=i,n=!0),n},clone:function(){var t=new cc.SkewBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._skewX,this._skewY),t},startWithTarget:function(t){cc.SkewTo.prototype.startWithTarget.call(this,t),this._deltaX=this._skewX,this._deltaY=this._skewY,this._endSkewX=this._startSkewX+this._deltaX,this._endSkewY=this._startSkewY+this._deltaY},reverse:function(){var t=new cc.SkewBy(this._duration,-this._skewX,-this._skewY);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.skewBy=function(t,e,i){return new cc.SkewBy(t,e,i)},cc.JumpBy=cc.Class({name:"cc.JumpBy",extends:cc.ActionInterval,ctor:function(t,e,i,n,r){this._startPosition=cc.v2(0,0),this._previousPosition=cc.v2(0,0),this._delta=cc.v2(0,0),this._height=0,this._jumps=0,void 0!==n&&cc.JumpBy.prototype.initWithDuration.call(this,t,e,i,n,r)},initWithDuration:function(t,e,i,n,r){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(void 0===r&&(r=n,n=i,i=e.y,e=e.x),this._delta.x=e,this._delta.y=i,this._height=n,this._jumps=r,!0)},clone:function(){var t=new cc.JumpBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._delta,this._height,this._jumps),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t);var e=t.x,i=t.y;this._previousPosition.x=e,this._previousPosition.y=i,this._startPosition.x=e,this._startPosition.y=i},update:function(t){if(t=this._computeEaseTime(t),this.target){var e=t*this._jumps%1,i=4*this._height*e*(1-e);i+=this._delta.y*t;var n=this._delta.x*t,r=this._startPosition;if(cc.macro.ENABLE_STACKABLE_ACTIONS){var s=this.target.x,a=this.target.y,o=this._previousPosition;r.x=r.x+s-o.x,r.y=r.y+a-o.y,n+=r.x,i+=r.y,o.x=n,o.y=i,this.target.setPosition(n,i)}else this.target.setPosition(r.x+n,r.y+i)}},reverse:function(){var t=new cc.JumpBy(this._duration,cc.v2(-this._delta.x,-this._delta.y),this._height,this._jumps);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.jumpBy=function(t,e,i,n,r){return new cc.JumpBy(t,e,i,n,r)},cc.JumpTo=cc.Class({name:"cc.JumpTo",extends:cc.JumpBy,ctor:function(t,e,i,n,r){this._endPosition=cc.v2(0,0),void 0!==n&&this.initWithDuration(t,e,i,n,r)},initWithDuration:function(t,e,i,n,r){return!!cc.JumpBy.prototype.initWithDuration.call(this,t,e,i,n,r)&&(void 0===r&&(i=e.y,e=e.x),this._endPosition.x=e,this._endPosition.y=i,!0)},startWithTarget:function(t){cc.JumpBy.prototype.startWithTarget.call(this,t),this._delta.x=this._endPosition.x-this._startPosition.x,this._delta.y=this._endPosition.y-this._startPosition.y},clone:function(){var t=new cc.JumpTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._endPosition,this._height,this._jumps),t}}),cc.jumpTo=function(t,e,i,n,r){return new cc.JumpTo(t,e,i,n,r)},cc.BezierBy=cc.Class({name:"cc.BezierBy",extends:cc.ActionInterval,ctor:function(t,e){this._config=[],this._startPosition=cc.v2(0,0),this._previousPosition=cc.v2(0,0),e&&cc.BezierBy.prototype.initWithDuration.call(this,t,e)},initWithDuration:function(t,e){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._config=e,!0)},clone:function(){var t=new cc.BezierBy;this._cloneDecoration(t);for(var e=[],i=0;ie/2?255:0}},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._originalState=t.opacity},stop:function(){this.target.opacity=this._originalState,cc.ActionInterval.prototype.stop.call(this)},reverse:function(){var t=new cc.Blink(this._duration,this._times);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.blink=function(t,e){return new cc.Blink(t,e)},cc.FadeTo=cc.Class({name:"cc.FadeTo",extends:cc.ActionInterval,ctor:function(t,e){this._toOpacity=0,this._fromOpacity=0,void 0!==e&&cc.FadeTo.prototype.initWithDuration.call(this,t,e)},initWithDuration:function(t,e){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._toOpacity=e,!0)},clone:function(){var t=new cc.FadeTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._toOpacity),t},update:function(t){t=this._computeEaseTime(t);var e=void 0!==this._fromOpacity?this._fromOpacity:255;this.target.opacity=e+(this._toOpacity-e)*t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._fromOpacity=t.opacity}}),cc.fadeTo=function(t,e){return new cc.FadeTo(t,e)},cc.FadeIn=cc.Class({name:"cc.FadeIn",extends:cc.FadeTo,ctor:function(t){null==t&&(t=0),this._reverseAction=null,this.initWithDuration(t,255)},reverse:function(){var t=new cc.FadeOut;return t.initWithDuration(this._duration,0),this._cloneDecoration(t),this._reverseEaseList(t),t},clone:function(){var t=new cc.FadeIn;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._toOpacity),t},startWithTarget:function(t){this._reverseAction&&(this._toOpacity=this._reverseAction._fromOpacity),cc.FadeTo.prototype.startWithTarget.call(this,t)}}),cc.fadeIn=function(t){return new cc.FadeIn(t)},cc.FadeOut=cc.Class({name:"cc.FadeOut",extends:cc.FadeTo,ctor:function(t){null==t&&(t=0),this._reverseAction=null,this.initWithDuration(t,0)},reverse:function(){var t=new cc.FadeIn;return t._reverseAction=this,t.initWithDuration(this._duration,255),this._cloneDecoration(t),this._reverseEaseList(t),t},clone:function(){var t=new cc.FadeOut;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._toOpacity),t}}),cc.fadeOut=function(t){return new cc.FadeOut(t)},cc.TintTo=cc.Class({name:"cc.TintTo",extends:cc.ActionInterval,ctor:function(t,e,i,n){this._to=cc.color(0,0,0),this._from=cc.color(0,0,0),e instanceof cc.Color&&(n=e.b,i=e.g,e=e.r),void 0!==n&&this.initWithDuration(t,e,i,n)},initWithDuration:function(t,e,i,n){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._to=cc.color(e,i,n),!0)},clone:function(){var t=new cc.TintTo;this._cloneDecoration(t);var e=this._to;return t.initWithDuration(this._duration,e.r,e.g,e.b),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._from=this.target.color},update:function(t){t=this._computeEaseTime(t);var e=this._from,i=this._to;e&&(this.target.color=cc.color(e.r+(i.r-e.r)*t,e.g+(i.g-e.g)*t,e.b+(i.b-e.b)*t))}}),cc.tintTo=function(t,e,i,n){return new cc.TintTo(t,e,i,n)},cc.TintBy=cc.Class({name:"cc.TintBy",extends:cc.ActionInterval,ctor:function(t,e,i,n){this._deltaR=0,this._deltaG=0,this._deltaB=0,this._fromR=0,this._fromG=0,this._fromB=0,void 0!==n&&this.initWithDuration(t,e,i,n)},initWithDuration:function(t,e,i,n){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._deltaR=e,this._deltaG=i,this._deltaB=n,!0)},clone:function(){var t=new cc.TintBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._deltaR,this._deltaG,this._deltaB),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t);var e=t.color;this._fromR=e.r,this._fromG=e.g,this._fromB=e.b},update:function(t){t=this._computeEaseTime(t),this.target.color=cc.color(this._fromR+this._deltaR*t,this._fromG+this._deltaG*t,this._fromB+this._deltaB*t)},reverse:function(){var t=new cc.TintBy(this._duration,-this._deltaR,-this._deltaG,-this._deltaB);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.tintBy=function(t,e,i,n){return new cc.TintBy(t,e,i,n)},cc.DelayTime=cc.Class({name:"cc.DelayTime",extends:cc.ActionInterval,update:function(){},reverse:function(){var t=new cc.DelayTime(this._duration);return this._cloneDecoration(t),this._reverseEaseList(t),t},clone:function(){var t=new cc.DelayTime;return this._cloneDecoration(t),t.initWithDuration(this._duration),t}}),cc.delayTime=function(t){return new cc.DelayTime(t)},cc.ReverseTime=cc.Class({name:"cc.ReverseTime",extends:cc.ActionInterval,ctor:function(t){this._other=null,t&&this.initWithAction(t)},initWithAction:function(t){return t?t===this._other?(cc.errorID(1029),!1):!!cc.ActionInterval.prototype.initWithDuration.call(this,t._duration)&&(this._other=t,!0):(cc.errorID(1028),!1)},clone:function(){var t=new cc.ReverseTime;return this._cloneDecoration(t),t.initWithAction(this._other.clone()),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._other.startWithTarget(t)},update:function(t){t=this._computeEaseTime(t),this._other&&this._other.update(1-t)},reverse:function(){return this._other.clone()},stop:function(){this._other.stop(),cc.Action.prototype.stop.call(this)}}),cc.reverseTime=function(t){return new cc.ReverseTime(t)},cc.TargetedAction=cc.Class({name:"cc.TargetedAction",extends:cc.ActionInterval,ctor:function(t,e){this._action=null,this._forcedTarget=null,e&&this.initWithTarget(t,e)},initWithTarget:function(t,e){return!!this.initWithDuration(e._duration)&&(this._forcedTarget=t,this._action=e,!0)},clone:function(){var t=new cc.TargetedAction;return this._cloneDecoration(t),t.initWithTarget(this._forcedTarget,this._action.clone()),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._action.startWithTarget(this._forcedTarget)},stop:function(){this._action.stop()},update:function(t){t=this._computeEaseTime(t),this._action.update(t)},getForcedTarget:function(){return this._forcedTarget},setForcedTarget:function(t){this._forcedTarget!==t&&(this._forcedTarget=t)}}),cc.targetedAction=function(t,e){return new cc.TargetedAction(t,e)}}),{}],6:[(function(t){"use strict";t("../core/platform/CCClass");var e=t("../core/platform/js"),i=function(){this.actions=[],this.target=null,this.actionIndex=0,this.currentAction=null,this.paused=!1,this.lock=!1};cc.ActionManager=function(){this._hashTargets=e.createMap(!0),this._arrayTargets=[],this._currentTarget=null,cc.director._scheduler&&cc.director._scheduler.enableForTarget(this)},cc.ActionManager.prototype={constructor:cc.ActionManager,_elementPool:[],_searchElementByTarget:function(t,e){for(var i=0;i=n&&i.actionIndex--;break}}},_removeActionByTag:function(t,e,i){for(var n=0,r=e.actions.length;n=t&&e.actionIndex--,0===e.actions.length&&this._deleteHashElement(e)},_deleteHashElement:function(t){var e=!1;if(t&&!t.lock&&this._hashTargets[t.target._id]){delete this._hashTargets[t.target._id];for(var i=this._arrayTargets,n=0,r=i.length;n=1?t:r%n>n/2?255:0},this.to(t,{opacity:1},i)}});var a=[];function o(t){return function(){a.length=0;for(var e=arguments.length,i=0;i=0?_=l.events[p]:(_=new a,l.ratios.push(d),l.events.push(_)),_.add(f.func,f.params)}}h.playState=function(t,e){t.clip&&(t.curveLoaded||u(this.target,t),t.animator=this,t.play(),"number"==typeof e&&t.setTime(e),this.play())},h.stopStatesExcept=function(t){var e=this._anims,i=e.array;for(e.i=0;e.i=0?(this._anims.fastRemoveAt(e),0===this._anims.array.length&&this.stop()):cc.errorID(3907),t.animator=null},h.sample=function(){var t=this._anims,e=t.array;for(t.i=0;t.i1e-6){y=!1;break}l._findFrameIndex=y?s:o;var A=l.values[0];return null==A||l._lerp||("number"==typeof A?l._lerp=r.prototype._lerpNumber:A instanceof cc.Quat?l._lerp=r.prototype._lerpQuat:A instanceof cc.Vec2?l._lerp=r.prototype._lerpVector2:A instanceof cc.Vec3?l._lerp=r.prototype._lerpVector3:A.lerp&&(l._lerp=r.prototype._lerpObject)),l},createTargetCurves:function(t,e,i){var n=e.props,r=e.comps;if(n)for(var s in n){var a=n[s],o=this.createPropCurve(t,s,a);i.push(o)}if(r)for(var c in r){var l=t.getComponent(c);if(l){var h=r[c];for(var u in h){var f=h[u],d=this.createPropCurve(l,u,f);i.push(d)}}}},createCurves:function(t,e){var i=this.curveData,n=i.paths,r=[];for(var s in this.createTargetCurves(e,i,r),n){var a=cc.find(s,e);if(a){var o=n[s];this.createTargetCurves(a,o,r)}}return r}});cc.AnimationClip=e.exports=c}),{"../core/utils/binary-search":215,"./animation-curves":11,"./motion-path-helper":17,"./types":19}],11:[(function(t,e){"use strict";var i=t("./bezier").bezierByTime,n=t("../core/utils/binary-search").binarySearchEpsilon,r=t("./types").WrapModeMask,s=t("./types").WrappedInfo;function a(t,e){if("string"==typeof e){var n=cc.easing[e];n?t=n(t):cc.errorID(3906,e)}else Array.isArray(e)&&(t=i(e,t));return t}var o=cc.Class({name:"cc.AnimCurve",sample:function(){},onTimeChangedManually:void 0});var c,l=cc.Class({name:"cc.DynamicAnimCurve",extends:o,ctor:function(){this._cachedIndex=0},properties:{target:null,prop:"",values:[],ratios:[],types:[]},_findFrameIndex:n,_lerp:void 0,_lerpNumber:function(t,e,i){return t+(e-t)*i},_lerpObject:function(t,e,i){return t.lerp(e,i)},_lerpQuat:(c=cc.quat(),function(t,e,i){return t.lerp(e,i,c)}),_lerpVector2:(function(){var t=cc.v2();return function(e,i,n){return e.lerp(i,n,t)}})(),_lerpVector3:(function(){var t=cc.v3();return function(e,i,n){return e.lerp(i,n,t)}})(),sample:function(t,e){var i=this.values,n=this.ratios,r=n.length;if(0!==r){var s,o=!0,c=this._cachedIndex;if(c<0&&(c=~c)>0&&cl&&e=r)s=i[r-1];else{var f=i[u-1];if(this._lerp){var d=n[u-1],_=n[u],p=this.types[u-1],v=(e-d)/(_-d);p&&(v=a(v,p));var g=i[u];s=this._lerp(f,g,v)}else s=f}else s=i[u];this.target[this.prop]=s}}});l.Linear=null,l.Bezier=function(t){return t};var h=function(){this.events=[]};h.prototype.add=function(t,e){this.events.push({func:t||"",params:e||[]})};var u=cc.Class({name:"cc.EventAnimCurve",extends:o,properties:{target:null,ratios:[],events:[],_wrappedInfo:{default:function(){return new s}},_lastWrappedInfo:null,_ignoreIndex:NaN},_wrapIterations:function(t){return t-(0|t)==0&&(t-=1),0|t},sample:function(t,e,i){var a=this.ratios.length,o=i.getWrappedInfo(i.time,this._wrappedInfo),c=o.direction,l=n(this.ratios,o.ratio);if(l<0&&(l=~l-1,c<0&&(l+=1)),this._ignoreIndex!==l&&(this._ignoreIndex=NaN),o.frameIndex=l,!this._lastWrappedInfo)return this._fireEvent(l),void(this._lastWrappedInfo=new s(o));var h=i.wrapMode,u=this._wrapIterations(o.iterations),f=this._lastWrappedInfo,d=this._wrapIterations(f.iterations),_=f.frameIndex,p=f.direction,v=-1!==d&&u!==d;if(_===l&&v&&1===a)this._fireEvent(0);else if(_!==l||v){c=p;do{if(_!==l){if(-1===c&&0===_&&l>0?((h&r.PingPong)===r.PingPong?c*=-1:_=a,d++):1===c&&_===a-1&&lu)break}_+=c,cc.director.getAnimationManager().pushDelayEvent(this,"_fireEvent",[_])}while(_!==l&&_>-1&&_=this.events.length||this._ignoreIndex===t)){var e=this.events[t].events;if(this.target.isValid)for(var i=this.target._components,n=0;nr)return~t.length;var s=(e=(e-n)/(r-n))/(1/i),a=0|s;return s-a<1e-6?a:a+1-s<1e-6?a+1:~(a+1)}}}),{"../core/utils/binary-search":215,"./bezier":14,"./types":19}],12:[(function(t,e){"use strict";var i=cc.js,n=cc.Class({ctor:function(){this._anims=new i.array.MutableForwardIterator([]),this._delayEvents=[],cc.director._scheduler&&cc.director._scheduler.enableForTarget(this)},update:function(t){var e=this._anims,i=e.array;for(e.i=0;e.i=0?this._anims.fastRemoveAt(e):cc.errorID(3907)},pushDelayEvent:function(t,e,i){this._delayEvents.push({target:t,func:e,args:i})}});cc.AnimationManager=e.exports=n}),{}],13:[(function(t,e){"use strict";var i=cc.js,n=t("./playable"),r=t("./types"),s=r.WrappedInfo,a=r.WrapMode,o=r.WrapModeMask;function c(t,e){n.call(this),this._currentFramePlayed=!1,this._delay=0,this._delayTime=0,this._wrappedInfo=new s,this._lastWrappedInfo=null,this._process=h,this._clip=t,this._name=e||t&&t.name,this.animator=null,this.curves=[],this.delay=0,this.repeatCount=1,this.duration=1,this.speed=1,this.wrapMode=a.Normal,this.time=0,this._target=null,this._lastframeEventOn=!1,this.emit=function(){for(var t=new Array(arguments.length),e=0,i=t.length;e1&&(0|e.iterations)>(0|t.iterations)&&this.emit("lastframe",this),t.set(e)),e.stopped&&(this.stop(),this.emit("finished",this))}function u(){var t=this.time,e=this.duration;t>e?0==(t%=e)&&(t=e):t<0&&0!=(t%=e)&&(t+=e);for(var i=t/e,n=this.curves,r=0,s=n.length;r0&&this._lastIterations>i||this.time<0&&this._lastIterations0&&(this._delayTime-=t,this._delayTime>0)||(this._currentFramePlayed?this.time+=t*this.speed:this._currentFramePlayed=!0,this._process())},l._needRevers=function(t){var e=this.wrapMode,i=!1;return(e&o.PingPong)===o.PingPong&&(t-(0|t)==0&&t>0&&(t-=1),1&t&&(i=!i)),(e&o.Reverse)===o.Reverse&&(i=!i),i},l.getWrappedInfo=function(t,e){e=e||new s;var i=!1,n=this.duration,r=this.repeatCount,a=t>0?t/n:-t/n;if(a>=r){a=r,i=!0;var c=r-(0|r);0===c&&(c=1),t=c*n*(t>0?1:-1)}if(t>n){var l=t%n;t=0===l?n:l}else t<0&&0!=(t%=n)&&(t+=n);var h=!1,u=this._wrapMode&o.ShouldWrap;u&&(h=this._needRevers(a));var f=h?-1:1;return this.speed<0&&(f*=-1),u&&h&&(t=n-t),e.ratio=t/n,e.time=t,e.direction=f,e.stopped=i,e.iterations=a,e},l.sample=function(){for(var t=this.getWrappedInfo(this.time,this._wrappedInfo),e=this.curves,i=0,n=e.length;i0}),(function(){this.curves.length=0})),i.getset(l,"wrapMode",(function(){return this._wrapMode}),(function(t){this._wrapMode=t,this.time=0,t&o.Loop?this.repeatCount=1/0:this.repeatCount=1})),i.getset(l,"repeatCount",(function(){return this._repeatCount}),(function(t){this._repeatCount=t;var e=this._wrapMode&o.ShouldWrap,i=(this.wrapMode&o.Reverse)===o.Reverse;this._process=t!==1/0||e||i?h:u})),i.getset(l,"delay",(function(){return this._delay}),(function(t){this._delayTime=this._delay=t})),cc.AnimationState=e.exports=c}),{"./playable":18,"./types":19}],14:[(function(t,e){"use strict";var i=Math.cos,n=Math.acos,r=Math.max,s=2*Math.PI,a=Math.sqrt;function o(t){return t<0?-Math.pow(-t,1/3):Math.pow(t,1/3)}function c(t,e){var c,l,h,u,f=e-0,d=e-t[0],_=3*f,p=3*d,v=3*(e-t[2]),g=1/(-f+p-v+(e-1)),m=(_-6*d+v)*g,y=m*(1/3),E=(-_+p)*g,T=1/3*(3*E-m*m),A=T*(1/3),x=(2*m*m*m-9*m*E+f*g*27)/27,C=x/2,b=C*C+A*A*A;if(b<0){var S=1/3*-T,w=a(S*S*S),R=-x/(2*w),M=n(R<-1?-1:R>1?1:R),I=2*o(w);return l=I*i(M*(1/3))-y,h=I*i((M+s)*(1/3))-y,u=I*i((M+2*s)*(1/3))-y,0<=l&&l<=1?0<=h&&h<=1?0<=u&&u<=1?r(l,h,u):r(l,h):0<=u&&u<=1?r(l,u):l:0<=h&&h<=1?0<=u&&u<=1?r(h,u):h:u}if(0===b)return h=-(c=C<0?o(-C):-o(C))-y,0<=(l=2*c-y)&&l<=1?0<=h&&h<=1?r(l,h):l:h;var D=a(b);return(c=o(-C+D))-o(C+D)-y}e.exports={bezier:function(t,e,i,n,r){var s=1-r;return s*(s*(t+(3*e-t)*r)+3*i*r*r)+n*r*r*r},bezierByTime:function(t,e){var i=c(t,e),n=t[1];return((1-i)*(n+(t[3]-n)*i)*3+i*i)*i}}}),{}],15:[(function(t,e){"use strict";var i={constant:function(){return 0},linear:function(t){return t},quadIn:function(t){return t*t},quadOut:function(t){return t*(2-t)},quadInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quartIn:function(t){return t*t*t*t},quartOut:function(t){return 1- --t*t*t*t},quartInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quintIn:function(t){return t*t*t*t*t},quintOut:function(t){return--t*t*t*t*t+1},quintInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sineIn:function(t){return 1-Math.cos(t*Math.PI/2)},sineOut:function(t){return Math.sin(t*Math.PI/2)},sineInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},expoIn:function(t){return 0===t?0:Math.pow(1024,t-1)},expoOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},expoInOut: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)))},circIn:function(t){return 1-Math.sqrt(1-t*t)},circOut:function(t){return Math.sqrt(1- --t*t)},circInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut: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)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut: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},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5},smooth:function(t){return t<=0?0:t>=1?1:t*t*(3-2*t)},fade:function(t){return t<=0?0:t>=1?1:t*t*t*(t*(6*t-15)+10)}};function n(t,e){return function(i){return i<.5?e(2*i)/2:t(2*i-1)/2+.5}}i.quadOutIn=n(i.quadIn,i.quadOut),i.cubicOutIn=n(i.cubicIn,i.cubicOut),i.quartOutIn=n(i.quartIn,i.quartOut),i.quintOutIn=n(i.quintIn,i.quintOut),i.sineOutIn=n(i.sineIn,i.sineOut),i.expoOutIn=n(i.expoIn,i.expoOut),i.circOutIn=n(i.circIn,i.circOut),i.backOutIn=n(i.backIn,i.backOut),i.bounceIn=function(t){return 1-i.bounceOut(1-t)},i.bounceInOut=function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5},i.bounceOutIn=n(i.bounceIn,i.bounceOut),cc.easing=e.exports=i}),{}],16:[(function(t){"use strict";t("./bezier"),t("./easing"),t("./types"),t("./motion-path-helper"),t("./animation-curves"),t("./animation-clip"),t("./animation-manager"),t("./animation-state"),t("./animation-animator")}),{"./animation-animator":9,"./animation-clip":10,"./animation-curves":11,"./animation-manager":12,"./animation-state":13,"./bezier":14,"./easing":15,"./motion-path-helper":17,"./types":19}],17:[(function(t,e){"use strict";var i=t("./animation-curves").DynamicAnimCurve,n=t("./animation-curves").computeRatioByType,r=t("./bezier").bezier,s=t("../core/utils/binary-search").binarySearchEpsilon,a=cc.v2;function o(t){this.points=t||[],this.beziers=[],this.ratios=[],this.progresses=[],this.length=0,this.computeBeziers()}function c(){this.start=a(),this.end=a(),this.startCtrlPoint=a(),this.endCtrlPoint=a()}function l(t){if(!Array.isArray(t))return!1;for(var e=0,i=t.length;e0)){c=r;break}c=r-1}if(n[r=c]===i)return r/(s-1);var l=n[r];return(r+(i-l)/(n[r+1]-l))/(s-1)},e.exports={sampleMotionPaths:function(t,e,r,c,h){function u(t){return t instanceof cc.Vec2?{in:t,pos:t,out:t}:Array.isArray(t)&&6===t.length?{in:a(t[2],t[3]),pos:a(t[0],t[1]),out:a(t[4],t[5])}:{in:cc.Vec2.ZERO,pos:cc.Vec2.ZERO,out:cc.Vec2.ZERO}}var f=e.values=e.values.map((function(t){return Array.isArray(t)&&(t=2===t.length?cc.v2(t[0],t[1]):cc.v3(t[0],t[1],t[2])),t}));if(0!==t.length&&0!==f.length){for(var d=!1,_=0;_0){d=!0;break}}if(d&&1!==f.length){for(var v=e.types,g=e.ratios,m=e.values=[],y=e.types=[],E=e.ratios=[],T=0,A=i.Linear,x=0,C=t.length;x0){var N=[];N.push(u(M));for(var F=0,B=S.length;F1e-6;){var z,W,H,G;if((b=n(b=O,D))<0)G=(0-b)*(W=k.beziers[0]).getLength(),H=W.start.sub(W.endCtrlPoint).normalize(),z=W.start.add(H.mul(G));else if(b>1)G=(b-1)*(W=k.beziers[k.beziers.length-1]).getLength(),H=W.end.sub(W.startCtrlPoint).normalize(),z=W.end.add(H.mul(G));else{var Y=s(U,b);Y<0&&(Y=~Y),b-=Y>0?U[Y-1]:0,b/=k.ratios[Y],z=k.beziers[Y].getPointAt(b)}P.push(z),O+=L}}else for(;1-O>1e-6;)b=n(b=O,D),P.push(M.lerp(I,b)),O+=L;for(A="constant"===D?D:i.Linear,F=0,B=P.length;F1e-6?(O-1)*R:0}g[g.length-1]!==E[E.length-1]&&j(f[f.length-1],A,g[g.length-1])}}function j(t,e,i){m.push(t),y.push(e),E.push(i)}},Curve:o,Bezier:c}}),{"../core/utils/binary-search":215,"./animation-curves":11,"./bezier":14}],18:[(function(t,e){"use strict";var i=cc.js,n=t("../core/CCDebug");function r(){this._isPlaying=!1,this._isPaused=!1,this._stepOnce=!1}var s=r.prototype;i.get(s,"isPlaying",(function(){return this._isPlaying}),!0),i.get(s,"isPaused",(function(){return this._isPaused}),!0);var a=function(){};s.onPlay=a,s.onPause=a,s.onResume=a,s.onStop=a,s.onError=a,s.play=function(){this._isPlaying?this._isPaused?(this._isPaused=!1,this.onResume()):this.onError(n.getError(3912)):(this._isPlaying=!0,this.onPlay())},s.stop=function(){this._isPlaying&&(this._isPlaying=!1,this.onStop(),this._isPaused=!1)},s.pause=function(){this._isPlaying&&!this._isPaused&&(this._isPaused=!0,this.onPause())},s.resume=function(){this._isPlaying&&this._isPaused&&(this._isPaused=!1,this.onResume())},s.step=function(){this.pause(),this._stepOnce=!0,this._isPlaying||this.play()},e.exports=r}),{"../core/CCDebug":26}],19:[(function(t,e){"use strict";var i={Loop:2,ShouldWrap:4,PingPong:22,Reverse:36},n=cc.Enum({Default:0,Normal:1,Reverse:i.Reverse,Loop:i.Loop,LoopReverse:i.Loop|i.Reverse,PingPong:i.PingPong,PingPongReverse:i.PingPong|i.Reverse});function r(t){t?this.set(t):(this.ratio=0,this.time=0,this.direction=1,this.stopped=!0,this.iterations=0,this.frameIndex=void 0)}cc.WrapMode=n,r.prototype.set=function(t){this.ratio=t.ratio,this.time=t.time,this.direction=t.direction,this.stopped=t.stopped,this.iterations=t.iterations,this.frameIndex=t.frameIndex},e.exports={WrapModeMask:i,WrapMode:n,WrappedInfo:r}}),{}],20:[(function(t,e){"use strict";var i,n,r=t("../core/event/event-target"),s=t("../core/platform/CCSys"),a=t("../core/assets/CCAudioClip").LoadMode,o=!1,c=[],l=function t(e){r.call(this),this._shouldRecycleOnEnded=!1,this._src=e,this._element=null,this.id=0,this._state=t.State.INITIALZING;var i=this;this._onended=function(){i._state=t.State.STOPPED,i.emit("ended")},this._onendedSecond=function(){i._unbindEnded(i._onendedSecond),i._bindEnded()}};cc.js.extend(l,r),l.State={ERROR:-1,INITIALZING:0,PLAYING:1,PAUSED:2,STOPPED:3},(i=l.prototype)._bindEnded=function(t){if(!(t=t||this._onended)._binded){t._binded=!0;var e=this._element;this._src&&e instanceof HTMLAudioElement?e.addEventListener("ended",t):e.onended=t}},i._unbindEnded=function(t){if((t=t||this._onended)._binded){t._binded=!1;var e=this._element;e instanceof HTMLAudioElement?e.removeEventListener("ended",t):e&&(e.onended=null)}},i._onLoaded=function(){this._createElement(),this._state=l.State.INITIALZING,this.setVolume(1),this.setLoop(!1)},i._createElement=function(){var t=this._src._nativeAsset;t instanceof HTMLAudioElement?(this._element||(this._element=document.createElement("audio")),this._element.src=t.src):this._element=new h(t,this)},i.play=function(){var t=this;this._src&&this._src._ensureLoaded((function(){t._state=l.State.PLAYING,t._bindEnded();var e=t._element.play();window.Promise&&e instanceof Promise&&e.catch((function(){})),t._touchToPlay()}))},i._touchToPlay=function(){if(this._src&&this._src.loadMode===a.DOM_AUDIO&&this._element.paused&&c.push({instance:this,offset:0,audio:this._element}),!o){o=!0;var t="ontouchend"in window?"touchend":"mousedown";cc.game.canvas.addEventListener(t,(function(){for(var t;t=c.pop();)t.audio.play(t.offset)}))}},i.destroy=function(){this._element=null},i.pause=function(){if(this.getState()===l.State.PLAYING){var t=this;this._src&&this._src._ensureLoaded((function(){t._unbindEnded(),t._element.pause(),t._state=l.State.PAUSED}))}},i.resume=function(){if(this.getState()===l.State.PAUSED){var t=this;this._src&&this._src._ensureLoaded((function(){t._bindEnded(),t._element.play(),t._state=l.State.PLAYING}))}},i.stop=function(){var t=this;this._src&&this._src._ensureLoaded((function(){t._element.pause(),t._element.currentTime=0;for(var e=0;ethis._buffer.duration)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"loop",{get:function(){return this._loop},set:function(t){return this._currentSource&&(this._currentSource.loop=t),this._loop=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"volume",{get:function(){return this._volume},set:function(t){if(this._volume=t,this._gainObj.gain.setTargetAtTime)try{this._gainObj.gain.setTargetAtTime(t,this._context.currentTime,n)}catch(e){this._gainObj.gain.setTargetAtTime(t,this._context.currentTime,.01)}else this._gainObj.gain.value=t;s.os===s.OS_IOS&&!this.paused&&this._currentSource&&(this._currentSource.onended=null,this.pause(),this.play())},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTime",{get:function(){return this.paused?this.playedLength:(this.playedLength=this._context.currentTime-this._startTime,this.playedLength%=this._buffer.duration,this.playedLength)},set:function(t){return this.paused?this.playedLength=t:(this.pause(),this.playedLength=t,this.play()),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"duration",{get:function(){return this._buffer.duration},enumerable:!0,configurable:!0})})(h.prototype),e.exports=cc._Audio=l}),{"../core/assets/CCAudioClip":63,"../core/event/event-target":128,"../core/platform/CCSys":159}],21:[(function(t,e){"use strict";var i=t("./CCAudio"),n=t("../core/assets/CCAudioClip"),r=cc.js,s=0,a=r.createMap(!0),o={},c=[],l=function(t){t._shouldRecycleOnEnded&&(t._finishCallback=null,t.off("ended"),t.off("stop"),t.src=null,c.includes(t)||(c.length<32?c.push(t):t.destroy()),t._shouldRecycleOnEnded=!1)},h=function(t){var e=s++,n=o[t];if(n||(n=o[t]=[]),d._maxAudioInstance<=n.length){var r=n.shift();u(r).stop()}var h=c.pop()||new i,f=function(){if(u(this.id)){delete a[this.id];var t=n.indexOf(this.id);cc.js.array.fastRemoveAt(n,t)}l(this)};return h.on("ended",(function(){this._finishCallback&&this._finishCallback(),this.getLoop()||f.call(this)}),h),h.on("stop",f,h),h.id=e,a[e]=h,n.push(e),h},u=function(t){return a[t]},f=function(t){return void 0===t?t=1:"string"==typeof t&&(t=Number.parseFloat(t)),t},d={AudioState:i.State,_maxAudioInstance:24,_id2audio:a,play:function(t,e,i){if(!(t instanceof n))return cc.error("Wrong type of AudioClip.");var r=t.nativeUrl,s=h(r);return s.src=t,t._ensureLoaded(),s._shouldRecycleOnEnded=!0,s.setLoop(e||!1),i=f(i),s.setVolume(i),s.play(),s.id},setLoop:function(t,e){var i=u(t);i&&i.setLoop&&i.setLoop(e)},isLoop:function(t){var e=u(t);return!(!e||!e.getLoop)&&e.getLoop()},setVolume:function(t,e){var i=u(t);i&&i.setVolume(e)},getVolume:function(t){var e=u(t);return e?e.getVolume():1},setCurrentTime:function(t,e){var i=u(t);return!!i&&(i.setCurrentTime(e),!0)},getCurrentTime:function(t){var e=u(t);return e?e.getCurrentTime():0},getDuration:function(t){var e=u(t);return e?e.getDuration():0},getState:function(t){var e=u(t);return e?e.getState():this.AudioState.ERROR},setFinishCallback:function(t,e){var i=u(t);i&&(i._finishCallback=e)},pause:function(t){var e=u(t);return!!e&&(e.pause(),!0)},_pauseIDCache:[],pauseAll:function(){for(var t in a){var e=a[t];e.getState()===i.State.PLAYING&&(this._pauseIDCache.push(t),e.pause())}},resume:function(t){var e=u(t);e&&e.resume()},resumeAll:function(){for(var t=0;t0;){var n=i.pop(),r=a[n];r&&(r.stop(),delete a[n])}},uncacheAll:function(){var t;for(var e in this.stopAll(),a)(t=a[e])&&t.destroy();for(;t=c.pop();)t.destroy();a=r.createMap(!0),o={}},_breakCache:null,_break:function(){for(var t in this._breakCache=[],a){var e=a[t];e.getState()===i.State.PLAYING&&(this._breakCache.push(t),e.pause())}},_restore:function(){if(this._breakCache){for(;this._breakCache.length>0;){var t=this._breakCache.pop(),e=u(t);e&&e.resume&&e.resume()}this._breakCache=null}},_music:{id:-1,loop:!1,volume:1},_effect:{volume:1,pauseCache:[]},playMusic:function(t,e){var i=this._music;return this.stop(i.id),i.id=this.play(t,e,i.volume),i.loop=e,i.id},stopMusic:function(){this.stop(this._music.id)},pauseMusic:function(){return this.pause(this._music.id),this._music.id},resumeMusic:function(){return this.resume(this._music.id),this._music.id},getMusicVolume:function(){return this._music.volume},setMusicVolume:function(t){t=f(t);var e=this._music;return e.volume=t,this.setVolume(e.id,e.volume),e.volume},isMusicPlaying:function(){return this.getState(this._music.id)===this.AudioState.PLAYING},playEffect:function(t,e){return this.play(t,e||!1,this._effect.volume)},setEffectsVolume:function(t){t=f(t);var e=this._music.id;for(var i in this._effect.volume=t,a){var n=a[i];n&&n.id!==e&&d.setVolume(i,t)}},getEffectsVolume:function(){return this._effect.volume},pauseEffect:function(t){return this.pause(t)},pauseAllEffects:function(){var t=this._music.id,e=this._effect;for(var i in e.pauseCache.length=0,a){var n=a[i];n&&n.id!==t&&n.getState()===this.AudioState.PLAYING&&(e.pauseCache.push(i),n.pause())}},resumeEffect:function(t){this.resume(t)},resumeAllEffects:function(){for(var t=this._effect.pauseCache,e=0;e=0;--n)a[i]+=s.charCodeAt(i*e+n)<<8*n;return a},i.unzipAsArray=function(t,e){e=e||1;var i,n,r,s=this.unzip(t),a=[];for(i=0,r=s.length/e;i=0;--n)a[i]+=s.charCodeAt(i*e+n)<<8*n;return a},cc.codec=e.exports=i}),{"./base64":23,"./gzip":24}],23:[(function(t,e){"use strict";var i=t("../core/utils/misc").BASE64_VALUES,n={name:"Jacob__Codec__Base64",decode:function(t){var e,n,r,s,a,o,c=[],l=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,n=(15&s)<<4|(a=i[t.charCodeAt(l++)])>>2,r=(3&a)<<6|(o=i[t.charCodeAt(l++)]),c.push(String.fromCharCode(e)),64!==a&&c.push(String.fromCharCode(n)),64!==o&&c.push(String.fromCharCode(r));return c.join("")},decodeAsArray:function(t,e){var i,n,r,s=this.decode(t),a=[];for(i=0,r=s.length/e;i=0;--n)a[i]+=s.charCodeAt(i*e+n)<<8*n;return a}};e.exports=n}),{"../core/utils/misc":221}],24:[(function(t,e){"use strict";var i=function(t){this.data=t,this.debug=!1,this.gpflags=void 0,this.files=0,this.unzipped=[],this.buf32k=new Array(32768),this.bIdx=0,this.modeZIP=!1,this.bytepos=0,this.bb=1,this.bits=0,this.nameBuf=[],this.fileout=void 0,this.literalTree=new Array(i.LITERALS),this.distanceTree=new Array(32),this.treepos=0,this.Places=null,this.len=0,this.fpos=new Array(17),this.fpos[0]=0,this.flens=void 0,this.fmax=void 0};i.gunzip=function(t){return t.constructor===Array||(t.constructor,String),new i(t).gunzip()[0][0]},i.HufNode=function(){this.b0=0,this.b1=0,this.jump=null,this.jumppos=-1},i.LITERALS=288,i.NAMEMAX=256,i.bitReverse=[0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,8,136,72,200,40,168,104,232,24,152,88,216,56,184,120,248,4,132,68,196,36,164,100,228,20,148,84,212,52,180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,3,131,67,195,35,163,99,227,19,147,83,211,51,179,115,243,11,139,75,203,43,171,107,235,27,155,91,219,59,187,123,251,7,135,71,199,39,167,103,231,23,151,87,215,55,183,119,247,15,143,79,207,47,175,111,239,31,159,95,223,63,191,127,255],i.cplens=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i.cplext=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],i.cpdist=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],i.cpdext=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],i.border=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],i.prototype.gunzip=function(){return this.outputArr=[],this.nextFile(),this.unzipped},i.prototype.readByte=function(){return this.bits+=8,this.bytepos>=1,0===this.bb&&(this.bb=this.readByte(),t=1&this.bb,this.bb=this.bb>>1|128),t},i.prototype.readBits=function(t){for(var e=0,n=t;n--;)e=e<<1|this.readBit();return t&&(e=i.bitReverse[e]>>8-t),e},i.prototype.flushBuffer=function(){this.bIdx=0},i.prototype.addBuffer=function(t){this.buf32k[this.bIdx++]=t,this.outputArr.push(String.fromCharCode(t)),32768===this.bIdx&&(this.bIdx=0)},i.prototype.IsPat=function(){for(;;){if(this.fpos[this.len]>=this.fmax)return-1;if(this.flens[this.fpos[this.len]]===this.len)return this.fpos[this.len]++;this.fpos[this.len]++}},i.prototype.Rec=function(){var t,e=this.Places[this.treepos];if(17===this.len)return-1;if(this.treepos++,this.len++,(t=this.IsPat())>=0)e.b0=t;else if(e.b0=32768,this.Rec())return-1;if((t=this.IsPat())>=0)e.b1=t,e.jump=null;else if(e.b1=32768,e.jump=this.Places[this.treepos],e.jumppos=this.treepos,this.Rec())return-1;return this.len--,0},i.prototype.CreateTree=function(t,e,i){var n;for(this.Places=t,this.treepos=0,this.flens=i,this.fmax=e,n=0;n<17;n++)this.fpos[n]=0;return this.len=0,this.Rec()?-1:0},i.prototype.DecodeValue=function(t){for(var e,i,n=0,r=t[n];;)if(this.readBit()){if(!(32768&r.b1))return r.b1;for(r=r.jump,e=t.length,i=0;i>1)>23?(o=o<<1|this.readBit())>199?o=(o-=128)<<1|this.readBit():(o-=48)>143&&(o+=136):o+=256,o<256)this.addBuffer(o);else{if(256===o)break;for(o-=257,p=this.readBits(i.cplext[o])+i.cplens[o],o=i.bitReverse[this.readBits(5)]>>3,i.cpdext[o]>8?(v=this.readBits(8),v|=this.readBits(i.cpdext[o]-8)<<8):v=this.readBits(i.cpdext[o]),v+=i.cpdist[o],o=0;oc)return this.flushBuffer(),1;for(d=n?f[n-1]:0;o--;)f[n++]=d}else{if(n+(o=17===o?3+this.readBits(3):11+this.readBits(7))>c)return this.flushBuffer(),1;for(;o--;)f[n++]=0}for(p=this.literalTree.length,n=0;n=256){var p,v;if(0==(o-=256))break;for(o--,p=this.readBits(i.cplext[o])+i.cplens[o],o=this.DecodeValue(this.distanceTree),i.cpdext[o]>8?(v=this.readBits(8),v|=this.readBits(i.cpdext[o]-8)<<8):v=this.readBits(i.cpdext[o]),v+=i.cpdist[o];p--;)a=this.buf32k[this.bIdx-v&32767],this.addBuffer(a)}else this.addBuffer(o)}}while(!t);return this.flushBuffer(),this.byteAlign(),0},i.prototype.unzipFile=function(t){var e;for(this.gunzip(),e=0;e>>0;t=n}for(var r,s=1,a=0,o=t.length,c=0;0>>0}function o(e,i){this.index="number"==typeof i?i:0,this.i=0,this.buffer=e instanceof(s?Uint8Array:Array)?e:new(s?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&t(Error("invalid index")),this.buffer.length<=this.index&&this.f()}o.prototype.f=function(){var t,e=this.buffer,i=e.length,n=new(s?Uint8Array:Array)(i<<1);if(s)n.set(e);else for(t=0;t>>8&255]<<16|d[t>>>16&255]<<8|d[t>>>24&255])>>32-e:d[t]>>8-e),8>e+a)o=o<>e-n-1&1,8==++a&&(a=0,r[s++]=d[o],o=0,s===r.length&&(r=this.f()));r[s]=o,this.buffer=r,this.i=a,this.index=s},o.prototype.finish=function(){var t,e=this.buffer,i=this.index;return 0c;++c){for(var h=f=c,u=7,f=f>>>1;f;f>>>=1)h<<=1,h|=1&f,--u;l[c]=(h<>>0}var d=l;function _(t){this.buffer=new(s?Uint16Array:Array)(2*t),this.length=0}function p(t){var e,i,n,r,a,o,c,l,h,u=t.length,f=0,d=Number.POSITIVE_INFINITY;for(l=0;lf&&(f=t[l]),t[l]>=1;for(h=o;hs[n]);)r=s[i],s[i]=s[n],s[n]=r,r=s[i+1],s[i+1]=s[n+1],s[n+1]=r,i=n;return this.length},_.prototype.pop=function(){var t,e,i,n,r,s=this.buffer;for(e=s[0],t=s[1],this.length-=2,s[0]=s[this.length],s[1]=s[this.length+1],r=0;!((n=2*r+2)>=this.length)&&(n+2s[n]&&(n+=2),s[n]>s[r]);)i=s[r],s[r]=s[n],s[n]=i,i=s[r+1],s[r+1]=s[n+1],s[n+1]=i,r=n;return{index:t,value:e,length:this.length}};var g,m=2,y={NONE:0,r:1,j:m,N:3},E=[];for(g=0;288>g;g++)switch(i){case 143>=g:E.push([g+48,8]);break;case 255>=g:E.push([g-144+400,9]);break;case 279>=g:E.push([g-256+0,7]);break;case 287>=g:E.push([g-280+192,8]);break;default:t("invalid literal: "+g)}function T(t,e){this.length=t,this.G=e}function A(){var e=x;switch(i){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:t("invalid length: "+e)}}v.prototype.n=function(){var n,r,a,c,l=this.input;switch(this.h){case 0:for(a=0,c=l.length;a>>8&255,g[y++]=255&f,g[y++]=f>>>8&255,s)g.set(d,y),y+=d.length,g=g.subarray(0,y);else{for(p=0,v=d.length;pZ)for(;0Z?Z:138)>Z-3&&J=J?(it[Q++]=17,it[Q++]=J-3,nt[17]++):(it[Q++]=18,it[Q++]=J-11,nt[18]++),Z-=J;else if(it[Q++]=et[j],nt[et[j]]++,3>--Z)for(;0Z?Z:6)>Z-3&&JW;W++)X[W]=V[Y[W]];for(O=19;4=x;x++)C=A(),b[x]=C[2]<<24|C[1]<<16|C[0];var S=s?new Uint32Array(b):b;function w(n,r){function a(e,n){var r,s,a,o,c=e.G,l=[],h=0;switch(r=S[e.length],l[h++]=65535&r,l[h++]=r>>16&255,l[h++]=r>>24,i){case 1===c:s=[0,c-1,0];break;case 2===c:s=[1,c-2,0];break;case 3===c:s=[2,c-3,0];break;case 4===c:s=[3,c-4,0];break;case 6>=c:s=[4,c-5,1];break;case 8>=c:s=[5,c-7,1];break;case 12>=c:s=[6,c-9,2];break;case 16>=c:s=[7,c-13,2];break;case 24>=c:s=[8,c-17,3];break;case 32>=c:s=[9,c-25,3];break;case 48>=c:s=[10,c-33,4];break;case 64>=c:s=[11,c-49,4];break;case 96>=c:s=[12,c-65,5];break;case 128>=c:s=[13,c-97,5];break;case 192>=c:s=[14,c-129,6];break;case 256>=c:s=[15,c-193,6];break;case 384>=c:s=[16,c-257,7];break;case 512>=c:s=[17,c-385,7];break;case 768>=c:s=[18,c-513,8];break;case 1024>=c:s=[19,c-769,8];break;case 1536>=c:s=[20,c-1025,9];break;case 2048>=c:s=[21,c-1537,9];break;case 3072>=c:s=[22,c-2049,10];break;case 4096>=c:s=[23,c-3073,10];break;case 6144>=c:s=[24,c-4097,11];break;case 8192>=c:s=[25,c-6145,11];break;case 12288>=c:s=[26,c-8193,12];break;case 16384>=c:s=[27,c-12289,12];break;case 24576>=c:s=[28,c-16385,13];break;case 32768>=c:s=[29,c-24577,13];break;default:t("invalid distance")}for(r=s,l[h++]=r[0],l[h++]=r[1],l[h++]=r[2],a=0,o=l.length;a=l;)E[l++]=0;for(l=0;29>=l;)A[l++]=0}for(E[256]=1,o=0,c=r.length;o=c){for(_&&a(_,-1),l=0,h=c-o;lR&&o+Rw&&(b=C,w=R),258===R)break}d=new T(w,o-b),_?_.length2*y[d-1]+E[d]&&(y[d]=2*y[d-1]+E[d]),A[d]=Array(y[d]),x[d]=Array(y[d]);for(f=0;fr[f]?(A[d][p]=v,x[d][p]=m,g+=2):(A[d][p]=r[f],x[d][p]=f,++f);C[d]=0,1===E[d]&&i(d)}for(a=T,o=0,c=n.length;o1<h&&t("undercommitted"),i=0,n=e.length;i>>=1;return o}function I(t,e){this.input=t,this.a=new(s?Uint8Array:Array)(32768),this.h=D.j;var i,n={};for(i in!e&&(e={})||"number"!=typeof e.compressionType||(this.h=e.compressionType),e)n[i]=e[i];n.outputBuffer=this.a,this.z=new v(this.input,n)}var D=y;function P(e,i){switch(this.k=[],this.l=32768,this.e=this.g=this.c=this.q=0,this.input=s?new Uint8Array(e):e,this.s=!1,this.m=L,this.B=!1,!i&&(i={})||(i.index&&(this.c=i.index),i.bufferSize&&(this.l=i.bufferSize),i.bufferType&&(this.m=i.bufferType),i.resize&&(this.B=i.resize)),this.m){case O:this.b=32768,this.a=new(s?Uint8Array:Array)(32768+this.l+258);break;case L:this.b=0,this.a=new(s?Uint8Array:Array)(this.l),this.f=this.J,this.t=this.H,this.o=this.I;break;default:t(Error("invalid inflate mode"))}}I.prototype.n=function(){var e,i,n,r,o,c,l,h=0;switch(l=this.a,e=ht){case ht:i=Math.LOG2E*Math.log(32768)-8;break;default:t(Error("invalid compression method"))}switch(n=i<<4|e,l[h++]=n,e){case ht:switch(this.h){case D.NONE:o=0;break;case D.r:o=1;break;case D.j:o=2;break;default:t(Error("unsupported compression type"))}break;default:t(Error("invalid compression method"))}return r=o<<6|0,l[h++]=r|31-(256*n+r)%31,c=a(this.input),this.z.b=h,h=(l=this.z.n()).length,s&&((l=new Uint8Array(l.buffer)).length<=h+4&&(this.a=new Uint8Array(l.length+4),this.a.set(l),l=this.a),l=l.subarray(0,h+4)),l[h++]=c>>24&255,l[h++]=c>>16&255,l[h++]=c>>8&255,l[h++]=255&c,l},r("Zlib.Deflate",I),r("Zlib.Deflate.compress",(function(t,e){return new I(t,e).n()})),r("Zlib.Deflate.CompressionType",D),r("Zlib.Deflate.CompressionType.NONE",D.NONE),r("Zlib.Deflate.CompressionType.FIXED",D.r),r("Zlib.Deflate.CompressionType.DYNAMIC",D.j);var O=0,L=1,N={D:O,C:L};P.prototype.p=function(){for(;!this.s;){var n=tt(this,3);switch(1&n&&(this.s=i),n>>>=1){case 0:var r=this.input,a=this.c,o=this.a,c=this.b,l=e,h=e,u=e,f=o.length,d=e;switch(this.e=this.g=0,(l=r[a++])===e&&t(Error("invalid uncompressed block header: LEN (first byte)")),h=l,(l=r[a++])===e&&t(Error("invalid uncompressed block header: LEN (second byte)")),h|=l<<8,(l=r[a++])===e&&t(Error("invalid uncompressed block header: NLEN (first byte)")),u=l,(l=r[a++])===e&&t(Error("invalid uncompressed block header: NLEN (second byte)")),h===~(u|=l<<8)&&t(Error("invalid uncompressed block header: length verify")),a+h>r.length&&t(Error("input buffer is broken")),this.m){case O:for(;c+h>o.length;){if(h-=d=f-c,s)o.set(r.subarray(a,a+d),c),c+=d,a+=d;else for(;d--;)o[c++]=r[a++];this.b=c,o=this.f(),c=this.b}break;case L:for(;c+h>o.length;)o=this.f({v:2});break;default:t(Error("invalid inflate mode"))}if(s)o.set(r.subarray(a,a+h),c),c+=h,a+=h;else for(;h--;)o[c++]=r[a++];this.c=a,this.b=c,this.a=o;break;case 1:this.o(Q,$);break;case 2:it(this);break;default:t(Error("unknown BTYPE: "+n))}}return this.t()};var F,B,V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=s?new Uint16Array(V):V,U=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],z=s?new Uint16Array(U):U,W=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],H=s?new Uint8Array(W):W,G=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Y=s?new Uint16Array(G):G,X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],j=s?new Uint8Array(X):X,q=new(s?Uint8Array:Array)(288);for(F=0,B=q.length;F=F?8:255>=F?9:279>=F?7:8;var Z,K,Q=p(q),J=new(s?Uint8Array:Array)(30);for(Z=0,K=J.length;Z>>n,i.e=a-n,i.c=c,r}function et(i,n){for(var r,s,a,o=i.g,c=i.e,l=i.input,h=i.c,u=n[0],f=n[1];c>>16,i.g=o>>a,i.e=c-a,i.c=h,65535&s}function it(t){function e(t,e,i){var n,r,s,a;for(a=0;ar)n>=c&&(this.b=n,i=this.f(),n=this.b),i[n++]=r;else for(o=z[s=r-257],0=c&&(this.b=n,i=this.f(),n=this.b);o--;)i[n]=i[n++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},P.prototype.I=function(t,e){var i=this.a,n=this.b;this.u=t;for(var r,s,a,o,c=i.length;256!==(r=et(this,t));)if(256>r)n>=c&&(c=(i=this.f()).length),i[n++]=r;else for(o=z[s=r-257],0c&&(c=(i=this.f()).length);o--;)i[n]=i[n++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},P.prototype.f=function(){var t,e,i=new(s?Uint8Array:Array)(this.b-32768),n=this.b-32768,r=this.a;if(s)i.set(r.subarray(32768,i.length));else for(t=0,e=i.length;tt;++t)r[t]=r[n+t];return this.b=32768,r},P.prototype.J=function(t){var e,i,n,r=this.input.length/this.c+1|0,a=this.input,o=this.a;return t&&("number"==typeof t.v&&(r=t.v),"number"==typeof t.F&&(r+=t.F)),i=2>r?(n=(a.length-this.c)/this.u[2]/2*258|0)e&&(this.a.length=e),t=this.a),this.buffer=t},nt.prototype.p=function(){var e,i=this.input;return e=this.A.p(),this.c=this.A.c,this.M&&(i[this.c++]<<24|i[this.c++]<<16|i[this.c++]<<8|i[this.c++])>>>0!==a(e)&&t(Error("invalid adler-32 checksum")),e},r("Zlib.Inflate",nt),r("Zlib.Inflate.BufferType",N),N.ADAPTIVE=N.C,N.BLOCK=N.D,r("Zlib.Inflate.prototype.decompress",nt.prototype.p),s&&new Uint16Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s&&new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258]),s&&new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0]),s&&new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577]),s&&new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);var rt,st,at=new(s?Uint8Array:Array)(288);for(rt=0,st=at.length;rt=rt?8:255>=rt?9:279>=rt?7:8;p(at);var ot,ct,lt=new(s?Uint8Array:Array)(30);for(ot=0,ct=lt.length;oth.ERROR){var e=function(t){if(cc.game.canvas){if(!i){var e=document.createElement("Div");e.setAttribute("id","logInfoDiv"),e.setAttribute("width","200"),e.setAttribute("height",cc.game.canvas.height);var n=e.style;n.zIndex="99999",n.position="absolute",n.top=n.left="0",(i=document.createElement("textarea")).setAttribute("rows","20"),i.setAttribute("cols","30"),i.setAttribute("disabled","true");var r=i.style;r.backgroundColor="transparent",r.borderBottom="1px solid #cccccc",r.borderTopWidth=r.borderLeftWidth=r.borderRightWidth="0px",r.borderTopStyle=r.borderLeftStyle=r.borderRightStyle="none",r.padding="0px",r.margin=0,e.appendChild(i),cc.game.canvas.parentNode.appendChild(e)}i.value=i.value+t+"\r\n",i.scrollTop=i.scrollHeight}};cc.error=function(){e("ERROR : "+cc.js.formatStr.apply(null,arguments))},cc.assert=function(t,i){!t&&i&&(i=cc.js.formatStr.apply(null,cc.js.shiftArguments.apply(null,arguments)),e("ASSERT: "+i))},t!==h.ERROR_FOR_WEB_PAGE&&(cc.warn=function(){e("WARN : "+cc.js.formatStr.apply(null,arguments))}),t===h.INFO_FOR_WEB_PAGE&&(cc.log=function(){e(cc.js.formatStr.apply(null,arguments))})}else console&&console.log.apply&&(console.error||(console.error=console.log),console.warn||(console.warn=console.log),console.error.bind?cc.error=console.error.bind(console):cc.error=function(){return console.error.apply(console,arguments)},cc.assert=function(t,e){if(!t)throw e&&(e=cc.js.formatStr.apply(null,cc.js.shiftArguments.apply(null,arguments))),new Error(e)});t!==h.ERROR&&(console.warn.bind?cc.warn=console.warn.bind(console):cc.warn=function(){return console.warn.apply(console,arguments)}),t===h.INFO&&(console.log.bind?cc.log=console.log.bind(console):cc.log=function(){return console.log.apply(console,arguments)})}},getError:s("ERROR"),isDisplayStats:function(){return!!cc.profiler&&cc.profiler.isShowingStats()},setDisplayStats:function(t){cc.profiler&&cc.game.renderType!==cc.game.RENDER_TYPE_CANVAS&&(t?cc.profiler.showStats():cc.profiler.hideStats(),cc.game.config.showFPS=!!t)}}}),{"../../DebugInfos":void 0,"./platform/utils":174}],27:[(function(t,e){"use strict";var i=t("./event/event-target"),n=t("./component-scheduler"),r=t("./node-activator"),s=t("./platform/CCObject"),a=t("./CCGame"),o=t("./renderer"),c=t("./event-manager"),l=t("./CCScheduler");cc.Director=function(){i.call(this),this._paused=!1,this._purgeDirectorInNextLoop=!1,this._winSizeInPoints=null,this._scene=null,this._loadingScene="",this._totalFrames=0,this._lastUpdate=0,this._deltaTime=0,this._startTime=0,this._maxParticleDeltaTime=0,this._scheduler=null,this._compScheduler=null,this._nodeActivator=null,this._actionManager=null;var t=this;a.on(a.EVENT_SHOW,(function(){t._lastUpdate=performance.now()})),a.once(a.EVENT_ENGINE_INITED,this.init,this)},cc.Director.prototype={constructor:cc.Director,init:function(){return this._totalFrames=0,this._lastUpdate=performance.now(),this._startTime=this._lastUpdate,this._paused=!1,this._purgeDirectorInNextLoop=!1,this._winSizeInPoints=cc.size(0,0),this._scheduler=new l,cc.ActionManager?(this._actionManager=new cc.ActionManager,this._scheduler.scheduleUpdate(this._actionManager,l.PRIORITY_SYSTEM,!1)):this._actionManager=null,this.sharedInit(),!0},sharedInit:function(){this._compScheduler=new n,this._nodeActivator=new r,c&&c.setEnabled(!0),cc.AnimationManager?(this._animationManager=new cc.AnimationManager,this._scheduler.scheduleUpdate(this._animationManager,l.PRIORITY_SYSTEM,!1)):this._animationManager=null,cc.CollisionManager?(this._collisionManager=new cc.CollisionManager,this._scheduler.scheduleUpdate(this._collisionManager,l.PRIORITY_SYSTEM,!1)):this._collisionManager=null,cc.PhysicsManager?(this._physicsManager=new cc.PhysicsManager,this._scheduler.scheduleUpdate(this._physicsManager,l.PRIORITY_SYSTEM,!1)):this._physicsManager=null,cc.Physics3DManager,this._physics3DManager=null,cc._widgetManager&&cc._widgetManager.init(this)},calculateDeltaTime:function(t){t||(t=performance.now()),this._deltaTime=t>this._lastUpdate?(t-this._lastUpdate)/1e3:0,this._lastUpdate=t},convertToGL:function(t){var e=a.container,i=cc.view,n=e.getBoundingClientRect(),r=n.left+window.pageXOffset-e.clientLeft,s=n.top+window.pageYOffset-e.clientTop,o=i._devicePixelRatio*(t.x-r),c=i._devicePixelRatio*(s+n.height-t.y);return i._isRotated?cc.v2(i._viewportRect.width-c,o):cc.v2(o,c)},convertToUI:function(t){var e=a.container,i=cc.view,n=e.getBoundingClientRect(),r=n.left+window.pageXOffset-e.clientLeft,s=n.top+window.pageYOffset-e.clientTop,o=cc.v2(0,0);return i._isRotated?(o.x=r+t.y/i._devicePixelRatio,o.y=s+n.height-(i._viewportRect.width-t.x)/i._devicePixelRatio):(o.x=r+t.x*i._devicePixelRatio,o.y=s+n.height-t.y*i._devicePixelRatio),o},end:function(){this._purgeDirectorInNextLoop=!0},getWinSize:function(){return cc.size(cc.winSize)},getWinSizeInPixels:function(){return cc.size(cc.winSize)},pause:function(){this._paused||(this._paused=!0)},purgeCachedData:function(){cc.assetManager.releaseAll()},purgeDirector:function(){this._scheduler.unscheduleAll(),this._compScheduler.unscheduleAll(),this._nodeActivator.reset(),c&&c.setEnabled(!1),cc.isValid(this._scene)&&this._scene.destroy(),this._scene=null,cc.renderer.clear(),cc.assetManager.builtins.clear(),cc.game.pause(),cc.assetManager.releaseAll()},reset:function(){this.purgeDirector(),c&&c.setEnabled(!0),this._actionManager&&this._scheduler.scheduleUpdate(this._actionManager,cc.Scheduler.PRIORITY_SYSTEM,!1),this._animationManager&&this._scheduler.scheduleUpdate(this._animationManager,cc.Scheduler.PRIORITY_SYSTEM,!1),this._collisionManager&&this._scheduler.scheduleUpdate(this._collisionManager,cc.Scheduler.PRIORITY_SYSTEM,!1),this._physicsManager&&this._scheduler.scheduleUpdate(this._physicsManager,cc.Scheduler.PRIORITY_SYSTEM,!1),cc.game.resume()},runSceneImmediate:function(t,e,i){cc.assertID(t instanceof cc.Scene||t instanceof cc.SceneAsset,1216),t instanceof cc.SceneAsset&&(t=t.scene),t._load();for(var n=Object.keys(a._persistRootNodes).map((function(t){return a._persistRootNodes[t]})),r=0;r2||e<0)&&(t.renderMode=0),"boolean"!=typeof t.registerSystemEvent&&(t.registerSystemEvent=!0),t.showFPS=1!==e&&!!t.showFPS,this.collisionMatrix=t.collisionMatrix||[],this.groupList=t.groupList||[],n._resetDebugSetting(t.debugMode),this.config=t,this._configLoaded=!0},_determineRenderType:function(){var t=this.config,e=parseInt(t.renderMode)||0;this.renderType=this.RENDER_TYPE_CANVAS;var i=!1;if(0===e?cc.sys.capabilities.opengl?(this.renderType=this.RENDER_TYPE_WEBGL,i=!0):cc.sys.capabilities.canvas&&(this.renderType=this.RENDER_TYPE_CANVAS,i=!0):1===e&&cc.sys.capabilities.canvas?(this.renderType=this.RENDER_TYPE_CANVAS,i=!0):2===e&&cc.sys.capabilities.opengl&&(this.renderType=this.RENDER_TYPE_WEBGL,i=!0),!i)throw new Error(n.getError(3820,e))},_initRenderer:function(){if(!this._rendererInitialized){var t,e,i,n,a=this.config.id,o=a instanceof HTMLElement?a:document.querySelector(a)||document.querySelector("#"+a);if("CANVAS"===o.tagName?(t=o.width,e=o.height,this.canvas=i=o,this.container=n=document.createElement("DIV"),i.parentNode&&i.parentNode.insertBefore(n,i)):("DIV"!==o.tagName&&cc.warnID(3819),t=o.clientWidth,e=o.clientHeight,this.canvas=i=document.createElement("CANVAS"),this.container=n=document.createElement("DIV"),o.appendChild(n)),n.setAttribute("id","Cocos2dGameContainer"),n.appendChild(i),this.frame=n.parentNode===document.body?document.documentElement:n.parentNode,(function(t){(" "+t.className+" ").indexOf(" gameCanvas ")>-1||(t.className&&(t.className+=" "),t.className+="gameCanvas")})(i),i.setAttribute("width",t||480),i.setAttribute("height",e||320),i.setAttribute("tabindex",99),this._determineRenderType(),this.renderType===this.RENDER_TYPE_WEBGL){var c={stencil:!0,antialias:cc.macro.ENABLE_WEBGL_ANTIALIAS,alpha:cc.macro.ENABLE_TRANSPARENT_CANVAS};r.initWebGL(i,c),this._renderContext=r.device._gl,!cc.macro.CLEANUP_IMAGE_CACHE&&s&&(s.enabled=!0)}this._renderContext||(this.renderType=this.RENDER_TYPE_CANVAS,r.initCanvas(i),this._renderContext=r.device._ctx),this.canvas.oncontextmenu=function(){if(!cc._isContextMenuEnable)return!1},this._rendererInitialized=!0}},_initEvents:function(){var t,e=window;this.config.registerSystemEvent&&cc.internal.inputManager.registerSystemEvent(this.canvas),void 0!==document.hidden?t="hidden":void 0!==document.mozHidden?t="mozHidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden");var i=!1;function n(){i||(i=!0,a.emit(a.EVENT_HIDE))}function r(t,e,n,r,s){i&&(i=!1,a.emit(a.EVENT_SHOW,t,e,n,r,s))}if(t)for(var s=["visibilitychange","mozvisibilitychange","msvisibilitychange","webkitvisibilitychange","qbrowserVisibilityChange"],o=0;o-1&&(e.onfocus=r),"onpageshow"in window&&"onpagehide"in window&&(e.addEventListener("pagehide",n),e.addEventListener("pageshow",r),document.addEventListener("pagehide",n),document.addEventListener("pageshow",r)),this.on(a.EVENT_HIDE,(function(){a.pause()})),this.on(a.EVENT_SHOW,(function(){a.resume()}))}};i.call(a),cc.js.addon(a,i.prototype),cc.game=e.exports=a}),{"../audio/CCAudioEngine":21,"../core/renderer/utils/dynamic-atlas/manager":void 0,"./CCDebug":26,"./event/event-target":128,"./renderer/index.js":181}],29:[(function(t,e){"use strict";var i=t("./value-types"),n=t("./utils/base-node"),r=t("./utils/prefab-helper"),s=t("./utils/trans-pool").NodeMemPool,a=t("./utils/affine-transform"),o=t("./event-manager"),c=t("./platform/CCMacro"),l=t("./platform/js"),h=(t("./event/event"),t("./event/event-target")),u=t("./renderer/render-flow"),f=cc.Object.Flags.Destroying,d=Math.PI/180,_=!!cc.ActionManager,p=function(){},v=new i.Vec3,g=new i.Quat,m=new i.Vec3,y=new i.Vec3,E=new i.Quat,T=new i.Quat,A=new i.Vec3,x=new i.Vec3,C=new i.Vec3,b=new i.Vec3,S=new i.Vec3,w=new i.Quat,R=new i.Quat,M=new i.Vec3,I=new i.Quat,D=new i.Vec3,P=new i.Quat,O=new i.Vec3,L=new i.Vec3,N=new i.Quat,F=new i.Quat,B=(new i.Quat,cc.mat4()),V=new i.Vec3,k=new Array(16);k.length=0;var U=cc.Enum({DEBUG:31}),z=cc.Enum({POSITION:1,SCALE:2,ROTATION:4,SKEW:8,TRS:7,RS:6,TRSS:15,PHYSICS_POSITION:16,PHYSICS_SCALE:32,PHYSICS_ROTATION:64,PHYSICS_TRS:112,PHYSICS_RS:96,ALL_POSITION:17,ALL_SCALE:34,ALL_ROTATION:68,ALL_TRS:119,ALL:65535}),W=cc.Enum({TOUCH_START:"touchstart",TOUCH_MOVE:"touchmove",TOUCH_END:"touchend",TOUCH_CANCEL:"touchcancel",MOUSE_DOWN:"mousedown",MOUSE_MOVE:"mousemove",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_UP:"mouseup",MOUSE_WHEEL:"mousewheel",POSITION_CHANGED:"position-changed",ROTATION_CHANGED:"rotation-changed",SCALE_CHANGED:"scale-changed",SIZE_CHANGED:"size-changed",ANCHOR_CHANGED:"anchor-changed",COLOR_CHANGED:"color-changed",CHILD_ADDED:"child-added",CHILD_REMOVED:"child-removed",CHILD_REORDER:"child-reorder",GROUP_CHANGED:"group-changed",SIBLING_ORDER_CHANGED:"sibling-order-changed"}),H=[W.TOUCH_START,W.TOUCH_MOVE,W.TOUCH_END,W.TOUCH_CANCEL],G=[W.MOUSE_DOWN,W.MOUSE_ENTER,W.MOUSE_MOVE,W.MOUSE_LEAVE,W.MOUSE_UP,W.MOUSE_WHEEL],Y=!0,X=function(t){if(0!==t){Y&&cc.warn("`cc.Node.skewX/Y` is deprecated since v2.2.1, please use 3D node instead.",""),Y=!1}},j=null,q=function(t,e){var i=t.getLocation(),n=this.owner;return!!n._hitTest(i,this)&&(e.type=W.TOUCH_START,e.touch=t,e.bubbles=!0,n.dispatchEvent(e),!0)},Z=function(t,e){var i=this.owner;e.type=W.TOUCH_MOVE,e.touch=t,e.bubbles=!0,i.dispatchEvent(e)},K=function(t,e){var i=t.getLocation(),n=this.owner;n._hitTest(i,this)?e.type=W.TOUCH_END:e.type=W.TOUCH_CANCEL,e.touch=t,e.bubbles=!0,n.dispatchEvent(e)},Q=function(t,e){t.getLocation();var i=this.owner;e.type=W.TOUCH_CANCEL,e.touch=t,e.bubbles=!0,i.dispatchEvent(e)},J=function(t){var e=t.getLocation(),i=this.owner;i._hitTest(e,this)&&(t.type=W.MOUSE_DOWN,t.bubbles=!0,i.dispatchEvent(t))},$=function(t){var e=t.getLocation(),i=this.owner;if(i._hitTest(e,this))this._previousIn||(j&&j._mouseListener&&(t.type=W.MOUSE_LEAVE,j.dispatchEvent(t),j._mouseListener._previousIn=!1),j=this.owner,t.type=W.MOUSE_ENTER,i.dispatchEvent(t),this._previousIn=!0),t.type=W.MOUSE_MOVE,t.bubbles=!0,i.dispatchEvent(t);else{if(!this._previousIn)return;t.type=W.MOUSE_LEAVE,i.dispatchEvent(t),this._previousIn=!1,j=null}t.stopPropagation()},tt=function(t){var e=t.getLocation(),i=this.owner;i._hitTest(e,this)&&(t.type=W.MOUSE_UP,t.bubbles=!0,i.dispatchEvent(t),t.stopPropagation())},et=function(t){var e=t.getLocation(),i=this.owner;i._hitTest(e,this)&&(t.type=W.MOUSE_WHEEL,t.bubbles=!0,i.dispatchEvent(t),t.stopPropagation())};function it(t,e){if(e){for(var i=0,n=null,r=t;r&&cc.Node.isNode(r);r=r._parent,++i)if(r.getComponent(e)){var s={index:i,node:r};n?n.push(s):n=[s]}return n}return null}function nt(t,e){if(!(t._objFlags&f)){if(t._bubblingListeners)for(var i=0,n=e.length;i=0;--n)if((i=k[n])._capturingListeners&&(e.currentTarget=i,i._capturingListeners.emit(e.type,e,k),e._propagationStopped))return void(k.length=0);if(k.length=0,e.eventPhase=2,e.currentTarget=t,t._capturingListeners&&t._capturingListeners.emit(e.type,e),!e._propagationImmediateStopped&&t._bubblingListeners&&t._bubblingListeners.emit(e.type,e),!e._propagationStopped&&e.bubbles)for(t._getBubblingTargets(e.type,k),e.eventPhase=3,n=0;n>16},set:function(t){t>c.MAX_ZINDEX?(cc.warnID(1636),t=c.MAX_ZINDEX):t0&&(this._renderFlag|=u.FLAG_CHILDREN)},_checkListenerMask:function(){if(this._touchListener){var t=this._touchListener.mask=it(this,cc.Mask);this._mouseListener&&(this._mouseListener.mask=t)}else this._mouseListener&&(this._mouseListener.mask=it(this,cc.Mask))},_checknSetupSysEvent:function(t){var e=!1,i=!1;return-1!==H.indexOf(t)?(this._touchListener||(this._touchListener=cc.EventListener.create({event:cc.EventListener.TOUCH_ONE_BY_ONE,swallowTouches:!0,owner:this,mask:it(this,cc.Mask),onTouchBegan:q,onTouchMoved:Z,onTouchEnded:K,onTouchCancelled:Q}),o.addListener(this._touchListener,this),e=!0),i=!0):-1!==G.indexOf(t)&&(this._mouseListener||(this._mouseListener=cc.EventListener.create({event:cc.EventListener.MOUSE,_previousIn:!1,owner:this,mask:it(this,cc.Mask),onMouseDown:J,onMouseMove:$,onMouseUp:tt,onMouseScroll:et}),o.addListener(this._mouseListener,this),e=!0),i=!0),e&&!this._activeInHierarchy&&cc.director.getScheduler().schedule((function(){this._activeInHierarchy||o.pauseTarget(this)}),this,0,0,0,!1),i},on:function(t,e,i,n){if(this._checknSetupSysEvent(t))return this._onDispatch(t,e,i,n);switch(t){case W.POSITION_CHANGED:this._eventMask|=1;break;case W.SCALE_CHANGED:this._eventMask|=2;break;case W.ROTATION_CHANGED:this._eventMask|=4;break;case W.SIZE_CHANGED:this._eventMask|=8;break;case W.ANCHOR_CHANGED:this._eventMask|=16;break;case W.COLOR_CHANGED:this._eventMask|=32}return this._bubblingListeners||(this._bubblingListeners=new h),this._bubblingListeners.on(t,e,i)},once:function(t,e,i,n){var r=this,s=null;(s=this._checknSetupSysEvent(t)&&n?this._capturingListeners=this._capturingListeners||new h:this._bubblingListeners=this._bubblingListeners||new h).once(t,e,i),s.once(t,(function(){r.off(t,e,i)}),void 0)},_onDispatch:function(t,e,i,n){if("boolean"==typeof i?(n=i,i=void 0):n=!!n,e){var r=null;return(r=n?this._capturingListeners=this._capturingListeners||new h:this._bubblingListeners=this._bubblingListeners||new h).hasEventListener(t,e,i)||(r.on(t,e,i),i&&i.__eventTargets&&i.__eventTargets.push(this)),e}cc.errorID(6800)},off:function(t,e,i,n){var r=-1!==H.indexOf(t),s=!r&&-1!==G.indexOf(t);if(r||s)this._offDispatch(t,e,i,n),r?this._touchListener&&!nt(this,H)&&(o.removeListener(this._touchListener),this._touchListener=null):s&&this._mouseListener&&!nt(this,G)&&(o.removeListener(this._mouseListener),this._mouseListener=null);else if(this._bubblingListeners&&(this._bubblingListeners.off(t,e,i),!this._bubblingListeners.hasEventListener(t)))switch(t){case W.POSITION_CHANGED:this._eventMask&=-2;break;case W.SCALE_CHANGED:this._eventMask&=-3;break;case W.ROTATION_CHANGED:this._eventMask&=-5;break;case W.SIZE_CHANGED:this._eventMask&=-9;break;case W.ANCHOR_CHANGED:this._eventMask&=-17;break;case W.COLOR_CHANGED:this._eventMask&=-33}},_offDispatch:function(t,e,i,n){if("boolean"==typeof i?(n=i,i=void 0):n=!!n,e){var r=n?this._capturingListeners:this._bubblingListeners;r&&(r.off(t,e,i),i&&i.__eventTargets&&l.array.fastRemove(i.__eventTargets,this))}else this._capturingListeners&&this._capturingListeners.removeAll(t),this._bubblingListeners&&this._bubblingListeners.removeAll(t)},targetOff:function(t){var e=this._bubblingListeners;e&&(e.targetOff(t),1&this._eventMask&&!e.hasEventListener(W.POSITION_CHANGED)&&(this._eventMask&=-2),2&this._eventMask&&!e.hasEventListener(W.SCALE_CHANGED)&&(this._eventMask&=-3),4&this._eventMask&&!e.hasEventListener(W.ROTATION_CHANGED)&&(this._eventMask&=-5),8&this._eventMask&&!e.hasEventListener(W.SIZE_CHANGED)&&(this._eventMask&=-9),16&this._eventMask&&!e.hasEventListener(W.ANCHOR_CHANGED)&&(this._eventMask&=-17),32&this._eventMask&&!e.hasEventListener(W.COLOR_CHANGED)&&(this._eventMask&=-33)),this._capturingListeners&&this._capturingListeners.targetOff(t),t&&t.__eventTargets&&l.array.fastRemove(t.__eventTargets,this),this._touchListener&&!nt(this,H)&&(o.removeListener(this._touchListener),this._touchListener=null),this._mouseListener&&!nt(this,G)&&(o.removeListener(this._mouseListener),this._mouseListener=null)},hasEventListener:function(t){var e=!1;return this._bubblingListeners&&(e=this._bubblingListeners.hasEventListener(t)),!e&&this._capturingListeners&&(e=this._capturingListeners.hasEventListener(t)),e},emit:function(t,e,i,n,r,s){this._bubblingListeners&&this._bubblingListeners.emit(t,e,i,n,r,s)},dispatchEvent:function(t){rt(this,t),k.length=0},pauseSystemEvents:function(t){o.pauseTarget(this,t)},resumeSystemEvents:function(t){o.resumeTarget(this,t)},_hitTest:function(t,e){var n=this._contentSize.width,r=this._contentSize.height,s=O,a=L,o=cc.Camera.findCamera(this);if(o?o.getScreenToWorldPoint(t,s):s.set(t),this._updateWorldMatrix(),!i.Mat4.invert(B,this._worldMatrix))return!1;i.Vec2.transformMat4(a,s,B),a.x+=this._anchorPoint.x*n,a.y+=this._anchorPoint.y*r;var c=!1;if(a.x>=0&&a.y>=0&&a.x<=n&&a.y<=r&&(c=!0,e&&e.mask))for(var l=e.mask,h=this,u=l?l.length:0,f=0,d=0;h&&d_.index){l.length=d;break}}return c},_getCapturingTargets:function(t,e){for(var i=this.parent;i;)i._capturingListeners&&i._capturingListeners.hasEventListener(t)&&e.push(i),i=i.parent},_getBubblingTargets:function(t,e){for(var i=this.parent;i;)i._bubblingListeners&&i._bubblingListeners.hasEventListener(t)&&e.push(i),i=i.parent},runAction:_?function(t){if(this.active){cc.assertID(t,1618);var e=cc.director.getActionManager();return e._suppressDeprecation||(e._suppressDeprecation=!0,cc.warnID(1639)),e.addAction(t,this,!1),t}}:p,pauseAllActions:_?function(){cc.director.getActionManager().pauseTarget(this)}:p,resumeAllActions:_?function(){cc.director.getActionManager().resumeTarget(this)}:p,stopAllActions:_?function(){cc.director.getActionManager().removeAllActionsFromTarget(this)}:p,stopAction:_?function(t){cc.director.getActionManager().removeAction(t)}:p,stopActionByTag:_?function(t){t!==cc.Action.TAG_INVALID?cc.director.getActionManager().removeActionByTag(t,this):cc.logID(1612)}:p,getActionByTag:_?function(t){return t===cc.Action.TAG_INVALID?(cc.logID(1613),null):cc.director.getActionManager().getActionByTag(t,this)}:function(){return null},getNumberOfRunningActions:_?function(){return cc.director.getActionManager().getNumberOfRunningActionsInTarget(this)}:function(){return 0},getPosition:function(t){return t=t||new i.Vec3,i.Trs.toPosition(t,this._trs)},setPosition:function(t,e,i){var n;void 0===e?(n=t.x,e=t.y,i=t.z):n=t;var r=this._trs;void 0===i&&(i=r[2]),(r[0]!==n||r[1]!==e||r[2]!==i)&&(r[0]=n,r[1]=e,r[2]=i,this.setLocalDirty(z.ALL_POSITION),this._renderFlag|=u.FLAG_WORLD_TRANSFORM,1&this._eventMask&&this.emit(W.POSITION_CHANGED))},getScale:function(t){return void 0!==t?i.Trs.toScale(t,this._trs):(cc.errorID(1400,"cc.Node.getScale","cc.Node.scale or cc.Node.getScale(cc.Vec3)"),this._trs[7])},setScale:function(t,e,i){var n;t&&"number"!=typeof t?(n=t.x,e=t.y,i=t.z):void 0!==t&&void 0===e?(n=t,e=t,i=t):n=t;var r=this._trs;void 0===i&&(i=r[9]),r[7]===n&&r[8]===e&&r[9]===i||(r[7]=n,r[8]=e,r[9]=i,this.setLocalDirty(z.ALL_SCALE),this._renderFlag|=u.FLAG_TRANSFORM,2&this._eventMask&&this.emit(W.SCALE_CHANGED))},getRotation:function(t){return t instanceof i.Quat?i.Trs.toRotation(t,this._trs):-this.angle},setRotation:function(t,e,i,n){if("number"==typeof t&&void 0===e)this.angle=-t;else{var r=t;void 0===e&&(r=t.x,e=t.y,i=t.z,n=t.w);var s=this._trs;s[3]===r&&s[4]===e&&s[5]===i&&s[6]===n||(s[3]=r,s[4]=e,s[5]=i,s[6]=n,this.setLocalDirty(z.ALL_ROTATION),4&this._eventMask&&this.emit(W.ROTATION_CHANGED))}},getContentSize:function(){return cc.size(this._contentSize.width,this._contentSize.height)},setContentSize:function(t,e){var i=this._contentSize;if(void 0===e){if(t.width===i.width&&t.height===i.height)return;i.width=t.width,i.height=t.height}else{if(t===i.width&&e===i.height)return;i.width=t,i.height=e}8&this._eventMask&&this.emit(W.SIZE_CHANGED)},getAnchorPoint:function(){return cc.v2(this._anchorPoint)},setAnchorPoint:function(t,e){var i=this._anchorPoint;if(void 0===e){if(t.x===i.x&&t.y===i.y)return;i.x=t.x,i.y=t.y}else{if(t===i.x&&e===i.y)return;i.x=t,i.y=e}this.setLocalDirty(z.ALL_POSITION),16&this._eventMask&&this.emit(W.ANCHOR_CHANGED)},_invTransformPoint:function(t,e){this._parent?this._parent._invTransformPoint(t,e):i.Vec3.copy(t,e);var n=this._trs;return i.Trs.toPosition(m,n),i.Vec3.sub(t,t,m),i.Trs.toRotation(E,n),i.Quat.conjugate(T,E),i.Vec3.transformQuat(t,t,T),i.Trs.toScale(m,n),i.Vec3.inverseSafe(y,m),i.Vec3.mul(t,t,y),t},getWorldPosition:function(t){i.Trs.toPosition(t,this._trs);for(var e,n=this._parent;n;)e=n._trs,i.Trs.toScale(v,e),i.Vec3.mul(t,t,v),i.Trs.toRotation(g,e),i.Vec3.transformQuat(t,t,g),i.Trs.toPosition(v,e),i.Vec3.add(t,t,v),n=n._parent;return t},setWorldPosition:function(t){var e=this._trs;this._parent?this._parent._invTransformPoint(A,t):i.Vec3.copy(A,t),i.Trs.fromPosition(e,A),this.setLocalDirty(z.ALL_POSITION),1&this._eventMask&&this.emit(W.POSITION_CHANGED)},getWorldRotation:function(t){i.Trs.toRotation(N,this._trs),i.Quat.copy(t,N);for(var e=this._parent;e;)i.Trs.toRotation(N,e._trs),i.Quat.mul(t,N,t),e=e._parent;return t},setWorldRotation:function(t){this._parent?(this._parent.getWorldRotation(F),i.Quat.conjugate(F,F),i.Quat.mul(F,F,t)):i.Quat.copy(F,t),i.Trs.fromRotation(this._trs,F),this.setLocalDirty(z.ALL_ROTATION)},getWorldScale:function(t){i.Trs.toScale(x,this._trs),i.Vec3.copy(t,x);for(var e=this._parent;e;)i.Trs.toScale(x,e._trs),i.Vec3.mul(t,t,x),e=e._parent;return t},setWorldScale:function(t){this._parent?(this._parent.getWorldScale(C),i.Vec3.div(C,t,C)):i.Vec3.copy(C,t),i.Trs.fromScale(this._trs,C),this.setLocalDirty(z.ALL_SCALE)},getWorldRT:function(t){var e=b,n=w,r=this._trs;i.Trs.toPosition(e,r),i.Trs.toRotation(n,r);for(var s=this._parent;s;)r=s._trs,i.Trs.toScale(S,r),i.Vec3.mul(e,e,S),i.Trs.toRotation(R,r),i.Vec3.transformQuat(e,e,R),i.Trs.toPosition(S,r),i.Vec3.add(e,e,S),i.Quat.mul(n,R,n),s=s._parent;return i.Mat4.fromRT(t,n,e),t},lookAt:function(t,e){this.getWorldPosition(M),i.Vec3.sub(M,M,t),i.Vec3.normalize(M,M),i.Quat.fromViewUp(I,M,e),this.setWorldRotation(I)},_updateLocalMatrix:ct,_calculWorldMatrix:function(){this._localMatDirty&z.TRSS&&this._updateLocalMatrix();var t=this._parent;t?this._mulMat(this._worldMatrix,t._worldMatrix,this._matrix):i.Mat4.copy(this._worldMatrix,this._matrix),this._worldMatDirty=!1},_mulMat:ut,_updateWorldMatrix:function(){if(this._parent&&this._parent._updateWorldMatrix(),this._worldMatDirty){this._calculWorldMatrix();for(var t=this._children,e=0,i=t.length;e1){for(var n,r,s=1,a=t.length;s0&&(r=t[c-1])._localZOrder>n._localZOrder;c--)t[c]=r;t[c]=n}this.emit(W.CHILD_REORDER,this)}cc.director.__fastOff(cc.Director.EVENT_AFTER_UPDATE,this.sortAllChildren,this)}},_delaySort:function(){this._reorderChildDirty||(this._reorderChildDirty=!0,cc.director.__fastOn(cc.Director.EVENT_AFTER_UPDATE,this.sortAllChildren,this))},_restoreProperties:!1,onRestore:!1},_t=cc.Class(dt),pt=_t.prototype;l.getset(pt,"position",pt.getPosition,pt.setPosition,!1,!0),cc.Node=e.exports=_t}),{"./event-manager":126,"./event/event":129,"./event/event-target":128,"./platform/CCMacro":155,"./platform/js":171,"./renderer/render-flow":182,"./utils/affine-transform":213,"./utils/base-node":214,"./utils/prefab-helper":224,"./utils/trans-pool":230,"./value-types":236}],30:[(function(t,e){"use strict";var i=t("./CCNode"),n=t("./renderer/render-flow"),r=(cc.Object.Flags.HideInHierarchy,i._LocalDirtyFlag),s=cc.Class({name:"cc.PrivateNode",extends:i,properties:{x:{get:function(){return this._originPos.x},set:function(t){var e=this._originPos;t!==e.x&&(e.x=t,this._posDirty(!0))},override:!0},y:{get:function(){return this._originPos.y},set:function(t){var e=this._originPos;t!==e.y&&(e.y=t,this._posDirty(!0))},override:!0},zIndex:{get:function(){return cc.macro.MIN_ZINDEX},set:function(){},override:!0},showInEditor:{default:!1,editorOnly:!0,override:!0}},ctor:function(){this._localZOrder=cc.macro.MIN_ZINDEX<<16,this._originPos=cc.v2()},_posDirty:function(t){this.setLocalDirty(r.POSITION),this._renderFlag|=n.FLAG_TRANSFORM,!0===t&&1&this._eventMask&&this.emit(i.EventType.POSITION_CHANGED)},_updateLocalMatrix:function(){if(this._localMatDirty){var t=this.parent;t&&(this._trs[0]=this._originPos.x-(t._anchorPoint.x-.5)*t._contentSize.width,this._trs[1]=this._originPos.y-(t._anchorPoint.y-.5)*t._contentSize.height),this._super()}},getPosition:function(){return new cc.Vec2(this._originPos)},setPosition:function(t,e){void 0===e&&(e=(t=t.x).y);var i=this._originPos;i.x===t&&i.y===e||(i.x=t,i.y=e,this._posDirty(!0))},setParent:function(t){var e=this._parent;this._super(t),e!==t&&(e&&e.off(i.EventType.ANCHOR_CHANGED,this._posDirty,this),t&&t.on(i.EventType.ANCHOR_CHANGED,this._posDirty,this))},_updateOrderOfArrival:function(){}}),a=s.prototype;cc.js.getset(a,"parent",a.getParent,a.setParent),cc.js.getset(a,"position",a.getPosition,a.setPosition),cc.PrivateNode=e.exports=s}),{"./CCNode":29,"./renderer/render-flow":182}],31:[(function(t,e){"use strict";cc.Scene=cc.Class({name:"cc.Scene",extends:t("./CCNode"),properties:{_is3DNode:{default:!0,override:!0},autoReleaseAssets:!1},ctor:function(){this._anchorPoint.x=0,this._anchorPoint.y=0,this._activeInHierarchy=!1,this._inited=!cc.game._isCloning,this.dependAssets=null},destroy:function(){if(cc.Object.prototype.destroy.call(this))for(var t=this._children,e=0;e0,this._repeat=r,this._runForever=this._repeat===cc.macro.REPEAT_FOREVER,!0},u.getInterval=function(){return this._interval},u.setInterval=function(t){this._interval=t},u.update=function(t){-1===this._elapsed?(this._elapsed=0,this._timesExecuted=0):(this._elapsed+=t,this._runForever&&!this._useDelay?this._elapsed>=this._interval&&(this.trigger(),this._elapsed=0):(this._useDelay?this._elapsed>=this._delay&&(this.trigger(),this._elapsed-=this._delay,this._timesExecuted+=1,this._useDelay=!1):this._elapsed>=this._interval&&(this.trigger(),this._elapsed=0,this._timesExecuted+=1),this._callback&&!this._runForever&&this._timesExecuted>this._repeat&&this.cancel()))},u.getCallback=function(){return this._callback},u.trigger=function(){this._target&&this._callback&&(this._lock=!0,this._callback.call(this._target,this._elapsed),this._lock=!1)},u.cancel=function(){this._scheduler.unschedule(this._callback,this._target)};var f=[];h.get=function(){return f.pop()||new h},h.put=function(t){f.length<20&&!t._lock&&(t._scheduler=t._target=t._callback=null,f.push(t))},cc.Scheduler=function(){this._timeScale=1,this._updatesNegList=[],this._updates0List=[],this._updatesPosList=[],this._hashForUpdates=i.createMap(!0),this._hashForTimers=i.createMap(!0),this._currentTarget=null,this._currentTargetSalvaged=!1,this._updateHashLocked=!1,this._arrayForTimers=[]},cc.Scheduler.prototype={constructor:cc.Scheduler,_removeHashElement:function(t){delete this._hashForTimers[t.target._id];for(var e=this._arrayForTimers,i=0,n=e.length;i=s&&n.timerIndex--,void(0===r.length&&(this._currentTarget===n?this._currentTargetSalvaged=!0:this._removeHashElement(n)))}}},unscheduleUpdate:function(t){if(t){var e=t._id;e||(t.__instanceId?(cc.warnID(1513),e=t._id=t.__instanceId):cc.errorID(1510));var i=this._hashForUpdates[e];i&&(this._updateHashLocked?i.entry.markedForDeletion=!0:this._removeUpdateFromHash(i.entry))}},unscheduleAllForTarget:function(t){if(t){var e=t._id;e||(t.__instanceId?(cc.warnID(1513),e=t._id=t.__instanceId):cc.errorID(1510));var i=this._hashForTimers[e];if(i){var n=i.timers;n.indexOf(i.currentTimer)>-1&&!i.currentTimerSalvaged&&(i.currentTimerSalvaged=!0);for(var r=0,s=n.length;r=0;e--)i=r[e],this.unscheduleAllForTarget(i.target);var s=0;if(t<0)for(e=0;e=t&&this.unscheduleUpdate(n.target),s==this._updatesNegList.length&&e++;if(t<=0)for(e=0;e=t&&this.unscheduleUpdate(n.target),s==this._updatesPosList.length&&e++},isScheduled:function(t,e){cc.assertID(t,1508),cc.assertID(e,1509);var i=e._id;i||(e.__instanceId?(cc.warnID(1513),i=e._id=e.__instanceId):cc.errorID(1510));var n=this._hashForTimers[i];if(!n)return!1;if(null==n.timers)return!1;for(var r=n.timers,s=0;s=t&&(r.paused=!0,s.push(r.target));if(t<=0)for(i=0;i=t&&(r.paused=!0,s.push(r.target));return s},resumeTargets:function(t){if(t)for(var e=0;e1?n:n[0]}},cc.AssetManager=L,cc.assetManager=new L,Object.defineProperty(cc,"resources",{get:function(){return P.get(O.RESOURCES)}}),e.exports=cc.assetManager}),{"./builtins":34,"./bundle":35,"./cache":36,"./depend-util":38,"./downloader":45,"./factory":46,"./fetch":47,"./helper":49,"./load":51,"./pack-manager":52,"./parser":53,"./pipeline":54,"./preprocess":55,"./releaseManager":56,"./request-item":57,"./shared":58,"./task":59,"./urlTransformer":60,"./utilities":61}],34:[(function(t,e){"use strict";var i=t("./cache"),n=t("./releaseManager"),r=t("./shared").BuiltinBundleName,s={_assets:new i({material:new i,effect:new i}),_loadBuiltins:function(t,e){var i=t+"s",n=this._assets.get(t);return cc.assetManager.internal.loadDir(i,null,null,(function(t,i){if(t)cc.error(t.message,t.stack);else for(var r=0;re.length)||47===t.charCodeAt(e.length)}return this.paths.forEach((function(n,r){if(r.startsWith(t)&&a(r,t)||!t)for(var o=0,c=n.length;o1){var d=Object.create(null);n.forEach((function(t){d[t._uuid]=t})),r={isCompleted:h,_map:d}}else r=n[0]}i&&i(e,r)}))},getXMLHttpRequest:function(){return new XMLHttpRequest},_parseLoadResArgs:i.parseLoadResArgs,getItem:function(t){return cc.assetManager.assets.has(t)?{content:cc.assetManager.assets.get(t)}:null},loadRes:function(t,e,i,n){var r=this._parseLoadResArgs(e,i,n),s=(e=r.type,r.onProgress),a=r.onComplete,o=cc.path.extname(t);o&&(t=t.slice(0,-o.length)),cc.resources.load(t,e,s,a)},loadResArray:function(t,e,i,n){var r=this._parseLoadResArgs(e,i,n),s=(e=r.type,r.onProgress),a=r.onComplete;t.forEach((function(e,i){var n=cc.path.extname(e);n&&(t[i]=e.slice(0,-n.length))})),cc.resources.load(t,e,s,a)},loadResDir:function(t,e,i,n){var r=this._parseLoadResArgs(e,i,n),s=(e=r.type,r.onProgress),a=r.onComplete;cc.resources.loadDir(t,e,s,(function(i,n){var r=[];i||(r=cc.resources.getDirWithPath(t,e).map((function(t){return t.path}))),a&&a(i,n,r)}))},getRes:function(t,e){return cc.assetManager.assets.has(t)?cc.assetManager.assets.get(t):cc.resources.get(t,e)},getResCount:function(){return cc.assetManager.assets.count},getDependsRecursively:function(t){return t?n.getDepsRecursively("string"==typeof t?t:t._uuid).concat([t._uuid]):[]},get assetLoader(){},get md5Pipe(){return u},get downloader(){return cc.assetManager.downloader},get loader(){return cc.assetManager.parser},addDownloadHandlers:function(t){var e=Object.create(null);for(var i in t){var n=t[i];e["."+i]=function(t,e,i){n({url:t},i)}}cc.assetManager.downloader.register(e)},addLoadHandlers:function(t){var e=Object.create(null);for(var i in t){var n=t[i];e["."+i]=function(t,e,i){n({content:t},i)}}cc.assetManager.parser.register(e)},flowInDeps:function(){},release:function(t){if(Array.isArray(t))for(var e=0;eN._maxInterval?N._maxInterval:cc.director._deltaTime;t-D>1e3*e&&(I=0,D=t)},L=function t(e,i){for(P=!1,O();w.length>0&&M0&&M0&&(s(L,m,y),P=!0),a.apply(this,arguments)}))}O(),M0){var i=n.create({name:t.name+" dependencies",input:c,progress:d,options:s,onProgress:t.onProgress,onError:n.prototype.recycle,onComplete:function(n){n||(t.output.push.apply(t.output,this.output),i.recycle()),r&&u(t),e(n)}});h.async(i)}else r&&u(t),e()}))}}),{"./pack-manager":52,"./shared":58,"./task":59,"./utilities":61}],48:[(function(t,e){"use strict";var i,n=t("../utils/text-utils"),r=null,s="BES bswy:->@123\u4e01\u3041\u1101",a=Object.create(null),o=-1,c=[],l=3e3,h=(i=void 0,function(){if(void 0===i)if(window.FontFace){var t=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),e=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);i=t?parseInt(t[1],10)>42:!e}else i=!1;return i});function u(){for(var t=!0,e=Date.now(),i=c.length-1;i>=0;i--){var a=c[i],h=a.fontFamilyName;if(e-a.startTime>l)cc.warnID(4933,h),a.onComplete(null,h),c.splice(i,1);else{var u=a.refWidth,f="40px "+h;r.font=f,u!==n.safeMeasureText(r,s,f)?(c.splice(i,1),a.onComplete(null,h)):t=!1}}t&&(clearInterval(o),o=-1)}var f={loadFont:function(t,e,i){var d=f._getFontFamily(t);if(a[d])return i(null,d);if(!r){var _=document.createElement("canvas");_.width=100,_.height=100,r=_.getContext("2d")}var p="40px "+d;r.font=p;var v=n.safeMeasureText(r,s,p),g=document.createElement("style");g.type="text/css";var m="";isNaN(d-0)?m+="@font-face { font-family:"+d+"; src:":m+="@font-face { font-family:'"+d+"'; src:",m+="url('"+t+"');",g.textContent=m+"}",document.body.appendChild(g);var y,E,T,A,x,C,b=document.createElement("div"),S=b.style;if(S.fontFamily=d,b.innerHTML=".",S.position="absolute",S.left="-100px",S.top="-100px",document.body.appendChild(b),h())y=Date.now(),E=d,T=i,A=new Promise(function(t,e){(function i(){Date.now()-y>=l?e():document.fonts.load("40px "+E).then((function(e){e.length>=1?t():setTimeout(i,100)}),(function(){e()}))})()}),x=null,C=new Promise(function(t,e){x=setTimeout(e,l)}),Promise.race([C,A]).then((function(){x&&(clearTimeout(x),x=null),T(null,E)}),(function(){cc.warnID(4933,E),T(null,E)}));else{var w={fontFamilyName:d,refWidth:v,onComplete:i,startTime:Date.now()};c.push(w),-1===o&&(o=setInterval(u,100))}a[d]=g},_getFontFamily:function(t){var e=t.lastIndexOf(".ttf");if(-1===e)return t;var i,n=t.lastIndexOf("/");return-1!==(i=-1===n?t.substring(0,e)+"_LABEL":t.substring(n+1,e)+"_LABEL").indexOf(" ")&&(i='"'+i+'"'),i}};e.exports=f}),{"../utils/text-utils":228}],49:[(function(t,e){"use strict";var i,n=t("./shared").bundles,r={decodeUuid:t("../utils/decode-uuid"),getUuidFromURL:(i=/.*[\/\\][0-9a-fA-F]{2}[\/\\]([0-9a-fA-F-]{8,})/,function(t){var e=t.match(i);return e?e[1]:""}),getUrlWithUuid:function(t,e){(e=e||Object.create(null)).__isNative__=e.isNative,e.ext=e.nativeExt;var i=n.find((function(e){return e.getAssetInfo(t)}));return i&&(e.bundle=i.name),cc.assetManager._transform(t,e)},isScene:function(t){return t&&(t.constructor===cc.SceneAsset||t instanceof cc.Scene)},normalize:function(t){return t&&(46===t.charCodeAt(0)&&47===t.charCodeAt(1)?t=t.slice(2):47===t.charCodeAt(0)&&(t=t.slice(1))),t}};e.exports=r}),{"../utils/decode-uuid":217,"./shared":58}],50:[(function(t){"use strict";t("./deprecated"),t("./CCAssetManager")}),{"./CCAssetManager":33,"./deprecated":39}],51:[(function(t,e){"use strict";var i=t("./pack-manager"),n=t("./pipeline"),r=t("./parser"),s=t("./utilities"),a=s.getDepends,o=s.cache,c=s.gatherAsset,l=s.setProperties,h=s.forEach,u=s.clear,f=s.checkCircleReference,d=t("./shared"),_=d.assets,p=d.files,v=d.parsed,g=d.pipeline,m=t("./task"),y=new n("loadOneAsset",[function(t,e){var n=t.output=t.input,r=n.options,s=n.isNative,a=n.uuid,o=n.file,c=r.reload;if(o||!c&&!s&&_.has(a))return e();i.load(n,t.options,(function(t,i){n.file=i,e(t)}))},function(t,e){var i=t.output=t.input,n=t.progress,s=t.options.__exclude__,a=i.id,o=i.file,c=i.options;if(i.isNative)r.parse(a,o,i.ext,c,(function(r,s){if(r)return e(r);i.content=s,n.canInvoke&&t.dispatch("progress",++n.finish,n.total,i),p.remove(a),v.remove(a),e()}));else{var l=i.uuid;if(l in s){var h=s[l],u=h.finish,d=h.content,g=h.err,m=h.callbacks;n.canInvoke&&t.dispatch("progress",++n.finish,n.total,i),u||f(l,l,s)?(d&&d.addRef&&d.addRef(),i.content=d,e(g)):m.push({done:e,item:i})}else if(!c.reload&&_.has(l)){var y=_.get(l);c.__asyncLoadAssets__||!y.__asyncLoadAssets__?(i.content=y.addRef(),n.canInvoke&&t.dispatch("progress",++n.finish,n.total,i),e()):E(t,y,e,!1)}else r.parse(a,o,"import",c,(function(i,n){if(i)return e(i);n._uuid=l,E(t,n,e,!0)}))}}]);function E(t,e,i,n){var r=t.input,s=t.progress,c=r.uuid,h=r.id,u=r.options,f=r.config,d=u.__asyncLoadAssets__,_=u.cacheAsset,y=[];e.addRef&&e.addRef(),a(c,e,Object.create(null),y,!1,d,f),s.canInvoke&&t.dispatch("progress",++s.finish,s.total+=y.length,r);var E=t.options.__exclude__[c]={content:e,finish:!1,callbacks:[{done:i,item:r}]},T=m.create({input:y,options:t.options,onProgress:t.onProgress,onError:m.prototype.recycle,progress:s,onComplete:function(t){if(e.decRef&&e.decRef(!1),e.__asyncLoadAssets__=d,E.finish=!0,E.err=t,!t){for(var i=Array.isArray(T.output)?T.output:[T.output],r=Object.create(null),s=0,a=i.length;sthis.pipes.length))return this.pipes.splice(e,0,t),this;cc.warnID(4921)},append:function(t){if("function"==typeof t)return this.pipes.push(t),this},remove:function(t){if("number"==typeof t)return this.pipes.splice(t,1),this},sync:function(t){var e=this.pipes;if(t instanceof i&&0!==e.length){null!=t.output&&(t.input=t.output,t.output=null),t._isFinish=!1;for(var n=0,r=e.length;n0&&u(t)>0)){r.remove(t._uuid);for(var n=i.getDeps(t._uuid),s=0,a=n.length;s0&&this._ref--,!1!==t&&cc.assetManager._releaseManager.tryRelease(this),this}}),e.exports=cc.Asset}),{"../platform/CCObject":156}],63:[(function(t,e){"use strict";var i=t("./CCAsset"),n=t("../event/event-target"),r=cc.Enum({WEB_AUDIO:0,DOM_AUDIO:1}),s=cc.Class({name:"cc.AudioClip",extends:i,mixins:[n],ctor:function(){this._loading=!1,this.loaded=!1,this._audio=null},properties:{duration:0,loadMode:{default:r.WEB_AUDIO,type:r},_nativeAsset:{get:function(){return this._audio},set:function(t){t instanceof cc.AudioClip?this._audio=t._nativeAsset:this._audio=t,this._audio&&(this.loaded=!0,this.emit("load"))},override:!0},_nativeDep:{get:function(){return{uuid:this._uuid,audioLoadMode:this.loadMode,ext:cc.path.extname(this._native),__isNative__:!0}},override:!0}},statics:{LoadMode:r,_loadByUrl:function(t,e){var i=cc.assetManager.assets.get(t);i?e(null,i):cc.assetManager.loadRemote(t,(function(t,i){if(t)return e(t);e(null,i)}))}},_ensureLoaded:function(t){if(this.loaded)return t&&t();if(t&&this.once("load",t),!this._loading){this._loading=!0;var e=this;cc.assetManager.postLoadNative(this,(function(){e._loading=!1}))}},destroy:function(){cc.audioEngine.uncache(this),this._super()}});cc.AudioClip=s,e.exports=s}),{"../event/event-target":128,"./CCAsset":62}],64:[(function(t,e){"use strict";var i=function(){this.u=0,this.v=0,this.w=0,this.h=0,this.offsetX=0,this.offsetY=0,this.textureID=0,this.valid=!1,this.xAdvance=0},n=function(t){this._letterDefinitions={},this._texture=t};n.prototype={constructor:n,addLetterDefinitions:function(t,e){this._letterDefinitions[t]=e},cloneLetterDefinition:function(){var t={};for(var e in this._letterDefinitions){var n=new i;cc.js.mixin(n,this._letterDefinitions[e]),t[e]=n}return t},getTexture:function(){return this._texture},getLetter:function(t){return this._letterDefinitions[t]},getLetterDefinitionForChar:function(t){var e=t.charCodeAt(0);return this._letterDefinitions.hasOwnProperty(e)?this._letterDefinitions[e]:null},clear:function(){this._letterDefinitions={}}};var r=cc.Class({name:"cc.BitmapFont",extends:cc.Font,properties:{fntDataStr:{default:""},spriteFrame:{default:null,type:cc.SpriteFrame},fontSize:{default:-1},_fntConfig:null,_fontDefDictionary:null},onLoad:function(){var t=this.spriteFrame;this._fontDefDictionary||(this._fontDefDictionary=new n,t&&(this._fontDefDictionary._texture=t._texture));var e=this._fntConfig;if(e){var r=e.fontDefDictionary;for(var s in r){var a=new i,o=r[s].rect;a.offsetX=r[s].xOffset,a.offsetY=r[s].yOffset,a.w=o.width,a.h=o.height,a.u=o.x,a.v=o.y,a.textureID=0,a.valid=!0,a.xAdvance=r[s].xAdvance,this._fontDefDictionary.addLetterDefinitions(s,a)}}}});cc.BitmapFont=r,cc.BitmapFont.FontLetterDefinition=i,cc.BitmapFont.FontAtlas=n,e.exports=r}),{}],65:[(function(t,e){"use strict";var i=cc.Class({name:"cc.BufferAsset",extends:cc.Asset,ctor:function(){this._buffer=null},properties:{_nativeAsset:{get:function(){return this._buffer},set:function(t){this._buffer=t.buffer||t},override:!0},buffer:function(){return this._buffer}}});cc.BufferAsset=e.exports=i}),{}],66:[(function(t,e){"use strict";var i=cc.Class({name:"cc.Font",extends:cc.Asset});cc.Font=e.exports=i}),{}],67:[(function(t,e){"use strict";var i=cc.Class({name:"cc.JsonAsset",extends:cc.Asset,properties:{json:null}});e.exports=cc.JsonAsset=i}),{}],68:[(function(t,e){"use strict";var i=cc.Class({name:"cc.LabelAtlas",extends:cc.BitmapFont,onLoad:function(){this.spriteFrame?this._fntConfig?this._super():cc.warnID(9101,this.name):cc.warnID(9100,this.name)}});cc.LabelAtlas=i,e.exports=i}),{}],69:[(function(t,e){"use strict";var i=cc.Enum({AUTO:0,SINGLE_INSTANCE:1,MULTI_INSTANCE:2}),n=cc.Class({name:"cc.Prefab",extends:cc.Asset,ctor:function(){this._createFunction=null,this._instantiatedTimes=0},properties:{data:null,optimizationPolicy:i.AUTO,asyncLoadAssets:!1,readonly:{default:!1,editorOnly:!0}},statics:{OptimizationPolicy:i,OptimizationPolicyThreshold:3},createNode:!1,compileCreateFunction:function(){var e=t("../platform/instantiate-jit");this._createFunction=e.compile(this.data)},_doInstantiate:function(t){return this.data._prefab||cc.warnID(3700),this._createFunction||this.compileCreateFunction(),this._createFunction(t)},_instantiate:function(){var t;return this.optimizationPolicy!==i.SINGLE_INSTANCE&&(this.optimizationPolicy===i.MULTI_INSTANCE||this._instantiatedTimes+1>=n.OptimizationPolicyThreshold)?(t=this._doInstantiate(),this.data._instantiate(t)):t=this.data._instantiate(),++this._instantiatedTimes,t},destroy:function(){this.data&&this.data.destroy(),this._super()}});cc.Prefab=e.exports=n,cc.js.obsolete(cc,"cc._Prefab","Prefab")}),{"../platform/instantiate-jit":169}],70:[(function(t,e){"use strict";var i,n=(i=t("../../renderer/gfx"))&&i.__esModule?i:{default:i},r=t("../renderer"),s=t("./CCTexture2D"),a=cc.Enum({RB_FMT_D24S8:n.default.RB_FMT_D24S8,RB_FMT_S8:n.default.RB_FMT_S8,RB_FMT_D16:n.default.RB_FMT_D16}),o=cc.Class({name:"cc.RenderTexture",extends:s,statics:{DepthStencilFormat:a},ctor:function(){this._framebuffer=null},initWithSize:function(t,e,i){this.width=Math.floor(t||cc.visibleRect.width),this.height=Math.floor(e||cc.visibleRect.height),this._resetUnderlyingMipmaps();var s,a={colors:[this._texture]};this._depthStencilBuffer&&this._depthStencilBuffer.destroy(),i&&(s=new n.default.RenderBuffer(r.device,i,t,e),i===n.default.RB_FMT_D24S8?a.depthStencil=s:i===n.default.RB_FMT_S8?a.stencil=s:i===n.default.RB_FMT_D16&&(a.depth=s)),this._depthStencilBuffer=s,this._framebuffer&&this._framebuffer.destroy(),this._framebuffer=new n.default.FrameBuffer(r.device,t,e,a),this._packable=!1,this.loaded=!0,this.emit("load")},updateSize:function(t,e){this.width=Math.floor(t||cc.visibleRect.width),this.height=Math.floor(e||cc.visibleRect.height),this._resetUnderlyingMipmaps();var i=this._depthStencilBuffer;i&&i.update(this.width,this.height),this._framebuffer._width=t,this._framebuffer._height=e},drawTextureAt:function(t,e,i){t._image&&0!==t._image.width&&this._texture.updateSubImage({x:e,y:i,image:t._image,width:t.width,height:t.height,level:0,flipY:!1,premultiplyAlpha:t._premultiplyAlpha})},readPixels:function(t,e,i,n,r){if(!this._framebuffer||!this._texture)return t;e=e||0,i=i||0;var s=n||this.width,a=r||this.height;t=t||new Uint8Array(s*a*4);var o=cc.game._renderContext,c=o.getParameter(o.FRAMEBUFFER_BINDING);return o.bindFramebuffer(o.FRAMEBUFFER,this._framebuffer.getHandle()),o.readPixels(e,i,s,a,o.RGBA,o.UNSIGNED_BYTE,t),o.bindFramebuffer(o.FRAMEBUFFER,c),t},destroy:function(){this._super(),this._framebuffer&&(this._framebuffer.destroy(),this._framebuffer=null)}});cc.RenderTexture=e.exports=o}),{"../../renderer/gfx":269,"../renderer":181,"./CCTexture2D":77}],71:[(function(t,e){"use strict";var i=cc.Class({name:"cc.SceneAsset",extends:cc.Asset,properties:{scene:null,asyncLoadAssets:void 0}});cc.SceneAsset=i,e.exports=i}),{}],72:[(function(){"use strict";var t=cc.Class({name:"cc.Script",extends:cc.Asset});cc._Script=t;var e=cc.Class({name:"cc.JavaScript",extends:t});cc._JavaScript=e;var i=cc.Class({name:"cc.TypeScript",extends:t});cc._TypeScript=i}),{}],73:[(function(t,e){"use strict";var i=cc.Class({name:"cc.SpriteAtlas",extends:cc.Asset,properties:{_spriteFrames:{default:{}}},getTexture:function(){var t=Object.keys(this._spriteFrames);if(t.length>0){var e=this._spriteFrames[t[0]];return e?e.getTexture():null}return null},getSpriteFrame:function(t){var e=this._spriteFrames[t];return e?(e.name||(e.name=t),e):null},getSpriteFrames:function(){var t=[],e=this._spriteFrames;for(var i in e)t.push(this.getSpriteFrame(i));return t}});cc.SpriteAtlas=i,e.exports=i}),{}],74:[(function(t,e){"use strict";var i=t("../event/event-target"),n=[{u:0,v:0},{u:0,v:0},{u:0,v:0},{u:0,v:0}],r=cc.Class({name:"cc.SpriteFrame",extends:t("../assets/CCAsset"),mixins:[i],properties:{_textureSetter:{set:function(t){t&&this._texture!==t&&this._refreshTexture(t)}},insetTop:{get:function(){return this._capInsets[1]},set:function(t){this._capInsets[1]=t,this._texture&&this._calculateSlicedUV()}},insetBottom:{get:function(){return this._capInsets[3]},set:function(t){this._capInsets[3]=t,this._texture&&this._calculateSlicedUV()}},insetLeft:{get:function(){return this._capInsets[0]},set:function(t){this._capInsets[0]=t,this._texture&&this._calculateSlicedUV()}},insetRight:{get:function(){return this._capInsets[2]},set:function(t){this._capInsets[2]=t,this._texture&&this._calculateSlicedUV()}}},ctor:function(){i.call(this);var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3],s=arguments[4];this._rect=null,this.uv=[],this._texture=null,this._original=null,this._offset=null,this._originalSize=null,this._rotated=!1,this._flipX=!1,this._flipY=!1,this.vertices=null,this._capInsets=[0,0,0,0],this.uvSliced=[],void 0!==t&&this.setTexture(t,e,n,r,s)},textureLoaded:function(){return this._texture&&this._texture.loaded},onTextureLoaded:function(t,e){return this.textureLoaded()?(t.call(e),!0):(this.once("load",t,e),this.ensureLoadTexture(),!1)},isRotated:function(){return this._rotated},setRotated:function(t){this._rotated=t,this._texture&&this._calculateUV()},isFlipX:function(){return this._flipX},isFlipY:function(){return this._flipY},setFlipX:function(t){this._flipX=t,this._texture&&this._calculateUV()},setFlipY:function(t){this._flipY=t,this._texture&&this._calculateUV()},getRect:function(){return cc.rect(this._rect)},setRect:function(t){this._rect=t,this._texture&&this._calculateUV()},getOriginalSize:function(){return cc.size(this._originalSize)},setOriginalSize:function(t){this._originalSize?(this._originalSize.width=t.width,this._originalSize.height=t.height):this._originalSize=cc.size(t)},getTexture:function(){return this._texture},_textureLoadedCallback:function(){var t=this._texture;if(t){var e=t.width,i=t.height;this._rect?this._checkRect(this._texture):this._rect=cc.rect(0,0,e,i),this._originalSize||this.setOriginalSize(cc.size(e,i)),this._offset||this.setOffset(cc.v2(0,0)),this._calculateUV(),this.emit("load")}},_refreshTexture:function(t){this._texture=t,t.loaded?this._textureLoadedCallback():t.once("load",this._textureLoadedCallback,this)},getOffset:function(){return cc.v2(this._offset)},setOffset:function(t){this._offset=cc.v2(t)},clone:function(){return new r(this._texture,this.getRect(),this._rotated,this.getOffset(),this.getOriginalSize())},setTexture:function(t,e,i,n,r){if(1!==arguments.length||t!==this._texture){if(this._rect=e||null,n?this.setOffset(n):this._offset=null,r?this.setOriginalSize(r):this._originalSize=null,this._rotated=i||!1,"string"!=typeof t)return t instanceof cc.Texture2D&&this._refreshTexture(t),!0;cc.errorID(3401)}},ensureLoadTexture:function(){this._texture&&(this._texture.loaded||(this._refreshTexture(this._texture),cc.assetManager.postLoadNative(this._texture)))},_checkRect:function(t){var e=this._rect,i=e.x,n=e.y;this._rotated?(i+=e.height,n+=e.width):(i+=e.width,n+=e.height),i>t.width&&cc.errorID(3300,t.nativeUrl+"/"+this.name,i,t.width),n>t.height&&cc.errorID(3400,t.nativeUrl+"/"+this.name,n,t.height)},_flipXY:function(t){if(this._flipX){var e=t[0];t[0]=t[1],t[1]=e,e=t[2],t[2]=t[3],t[3]=e}if(this._flipY){var i=t[0];t[0]=t[2],t[2]=i,i=t[1],t[1]=t[3],t[3]=i}},_calculateSlicedUV:function(){var t=this._rect,e=this._texture.width,i=this._texture.height,r=this._capInsets[0],s=this._capInsets[2],a=t.width-r-s,o=this._capInsets[1],c=this._capInsets[3],l=t.height-o-c,h=this.uvSliced;if(h.length=0,this._rotated){n[0].u=t.x/e,n[1].u=(t.x+c)/e,n[2].u=(t.x+c+l)/e,n[3].u=(t.x+t.height)/e,n[3].v=t.y/i,n[2].v=(t.y+r)/i,n[1].v=(t.y+r+a)/i,n[0].v=(t.y+t.width)/i,this._flipXY(n);for(var u=0;u<4;++u)for(var f=n[u],d=0;d<4;++d){var _=n[3-d];h.push({u:f.u,v:_.v})}}else{n[0].u=t.x/e,n[1].u=(t.x+r)/e,n[2].u=(t.x+r+a)/e,n[3].u=(t.x+t.width)/e,n[3].v=t.y/i,n[2].v=(t.y+o)/i,n[1].v=(t.y+o+l)/i,n[0].v=(t.y+t.height)/i,this._flipXY(n);for(var p=0;p<4;++p)for(var v=n[p],g=0;g<4;++g){var m=n[g];h.push({u:m.u,v:v.v})}}},_setDynamicAtlasFrame:function(t){t&&(this._original={_texture:this._texture,_x:this._rect.x,_y:this._rect.y},this._texture=t.texture,this._rect.x=t.x,this._rect.y=t.y,this._calculateUV())},_resetDynamicAtlasFrame:function(){this._original&&(this._rect.x=this._original._x,this._rect.y=this._original._y,this._texture=this._original._texture,this._original=null,this._calculateUV())},_calculateUV:function(){var t=this._rect,e=this._texture,i=this.uv,n=e.width,r=e.height;if(this._rotated){var s=0===n?0:t.x/n,a=0===n?0:(t.x+t.height)/n,o=0===r?0:(t.y+t.width)/r,c=0===r?0:t.y/r;i[0]=s,i[1]=c,i[2]=s,i[3]=o,i[4]=a,i[5]=c,i[6]=a,i[7]=o}else{var l=0===n?0:t.x/n,h=0===n?0:(t.x+t.width)/n,u=0===r?0:(t.y+t.height)/r,f=0===r?0:t.y/r;i[0]=l,i[1]=u,i[2]=h,i[3]=u,i[4]=l,i[5]=f,i[6]=h,i[7]=f}if(this._flipX){var d=i[0];i[0]=i[2],i[2]=d,d=i[1],i[1]=i[3],i[3]=d,d=i[4],i[4]=i[6],i[6]=d,d=i[5],i[5]=i[7],i[7]=d}if(this._flipY){var _=i[0];i[0]=i[4],i[4]=_,_=i[1],i[1]=i[5],i[5]=_,_=i[2],i[2]=i[6],i[6]=_,_=i[3],i[3]=i[7],i[7]=_}var p=this.vertices;if(p){p.nu.length=0,p.nv.length=0;for(var v=0;v0?this._image=t.images[0]:void 0!==t.image&&(this._image=t.image,t.images||(f.length=0,t.images=f),t.images.push(t.image)),this._texture&&this._texture.update(t),this._hashDirty=!0},initWithElement:function(t){if(t)if(this._image=t,t.complete||t instanceof HTMLCanvasElement)this.handleLoadedTexture();else if(cc.sys.capabilities.imageBitmap&&t instanceof ImageBitmap)this._checkImageBitmap(this.handleLoadedTexture.bind(this));else{var e=this;t.addEventListener("load",(function(){e.handleLoadedTexture()})),t.addEventListener("error",(function(t){cc.warnID(3119,t.message)}))}},initWithData:function(t,e,i,n){var r=_();return r.image=t,r.images=[r.image],r.genMipmaps=this._genMipmaps,r.premultiplyAlpha=this._premultiplyAlpha,r.flipY=this._flipY,r.minFilter=u[this._minFilter],r.magFilter=u[this._magFilter],r.wrapS=this._wrapS,r.wrapT=this._wrapT,r.format=this._getGFXPixelFormat(e),r.width=i,r.height=n,this._texture?this._texture.update(r):this._texture=new s.Texture2D(s.device,r),this.width=i,this.height=n,this._updateFormat(),this._checkPackable(),this.loaded=!0,this.emit("load"),!0},getHtmlElementObj:function(){return this._image},destroy:function(){cc.sys.capabilities.imageBitmap&&this._image instanceof ImageBitmap&&this._image.close&&this._image.close(),this._packable&&cc.dynamicAtlasManager&&cc.dynamicAtlasManager.deleteAtlasTexture(this),this._image=null,this._texture&&this._texture.destroy(),this._super()},getPixelFormat:function(){return this._format},hasPremultipliedAlpha:function(){return this._premultiplyAlpha||!1},isAlphaAtlas:function(){return this._isAlphaAtlas},handleLoadedTexture:function(){if(this._image&&this._image.width&&this._image.height){this.width=this._image.width,this.height=this._image.height;var t=_();t.image=this._image,t.images=[t.image],t.width=this.width,t.height=this.height,t.genMipmaps=this._genMipmaps,t.format=this._getGFXPixelFormat(this._format),t.premultiplyAlpha=this._premultiplyAlpha,t.flipY=this._flipY,t.minFilter=u[this._minFilter],t.magFilter=u[this._magFilter],t.wrapS=this._wrapS,t.wrapT=this._wrapT,this._texture?this._texture.update(t):this._texture=new s.Texture2D(s.device,t),this._updateFormat(),this._checkPackable(),this.loaded=!0,this.emit("load"),cc.macro.CLEANUP_IMAGE_CACHE&&(this._image instanceof HTMLImageElement?this._clearImage():cc.sys.capabilities.imageBitmap&&this._image instanceof ImageBitmap&&this._image.close&&this._image.close())}},description:function(){return""},releaseTexture:function(){this._image=null,this._texture&&this._texture.destroy()},setWrapMode:function(t,e){if(this._wrapS!==t||this._wrapT!==e){var i=_();i.wrapS=t,i.wrapT=e,this.update(i)}},setFilters:function(t,e){if(this._minFilter!==t||this._magFilter!==e){var i=_();i.minFilter=t,i.magFilter=e,this.update(i)}},setFlipY:function(t){if(this._flipY!==t){var e=_();e.flipY=t,e.premultiplyAlpha=this._premultiplyAlpha,this.update(e)}},setPremultiplyAlpha:function(t){if(this._premultiplyAlpha!==t){var e=_();e.flipY=this._flipY,e.premultiplyAlpha=t,this.update(e)}},_updateFormat:function(){this._isAlphaAtlas=this._format===c.RGBA_ETC1||this._format===c.RGB_A_PVRTC_4BPPV1||this._format===c.RGB_A_PVRTC_2BPPV1},_checkPackable:function(){var t=cc.dynamicAtlasManager;if(t)if(this._isCompressed())this._packable=!1;else{var e=this.width,i=this.height;!this._image||e>t.maxFrameSize||i>t.maxFrameSize||this._getHash()!==t.Atlas.DEFAULT_HASH?this._packable=!1:this._image&&this._image instanceof HTMLCanvasElement&&(this._packable=!0)}},_getOpts:function(){var t=_();return t.width=this.width,t.height=this.height,t.genMipmaps=this._genMipmaps,t.format=this._format,t.premultiplyAlpha=this._premultiplyAlpha,t.anisotropy=this._anisotropy,t.flipY=this._flipY,t.minFilter=u[this._minFilter],t.magFilter=u[this._magFilter],t.mipFilter=u[this._mipFilter],t.wrapS=this._wrapS,t.wrapT=this._wrapT,t},_getGFXPixelFormat:function(t){return t===c.RGBA_ETC1?t=c.RGB_ETC1:t===c.RGB_A_PVRTC_4BPPV1?t=c.RGB_PVRTC_4BPPV1:t===c.RGB_A_PVRTC_2BPPV1&&(t=c.RGB_PVRTC_2BPPV1),t},_resetUnderlyingMipmaps:function(t){var e=this._getOpts();e.images=t||[null],this._texture?this._texture.update(e):this._texture=new s.Texture2D(s.device,e)},_serialize:!1,_deserialize:function(t){var e=t.split(","),i=e[0];if(i){var n=p._parseExt(i,this._format);if(n.bestExt)this._setRawAsset(n.bestExt),this._format=n.bestFormat;else{if(!n.defaultExt)throw new Error(cc.debug.getError(3121));this._setRawAsset(n.defaultExt),cc.warnID(3120,n.defaultExt,n.defaultExt)}}8===e.length&&(this._minFilter=parseInt(e[1]),this._magFilter=parseInt(e[2]),this._wrapS=parseInt(e[3]),this._wrapT=parseInt(e[4]),this._premultiplyAlpha=49===e[5].charCodeAt(0),this._genMipmaps=49===e[6].charCodeAt(0),this._packable=49===e[7].charCodeAt(0))},_getHash:function(){if(!this._hashDirty)return this._hash;var t=this._genMipmaps?1:0,e=this._premultiplyAlpha?1:0,i=this._flipY?1:0,n=this._minFilter===h.LINEAR?1:2,r=this._magFilter===h.LINEAR?1:2,s=this._wrapS===l.REPEAT?1:this._wrapS===l.CLAMP_TO_EDGE?2:3,a=this._wrapT===l.REPEAT?1:this._wrapT===l.CLAMP_TO_EDGE?2:3,o=this._format;return this._image,this._hash=Number(""+n+r+o+s+a+t+e+i),this._hashDirty=!1,this._hash},_isCompressed:function(){return this._formatc.RGBA32F},_clearImage:function(){this._image.src=""},_checkImageBitmap:function(t){var e=this,i=this._image,n=this._flipY,r=this._premultiplyAlpha;this._flipY!==i.flipY||this._premultiplyAlpha!==i.premultiplyAlpha?createImageBitmap(i,{imageOrientation:n!==i.flipY?"flipY":"none",premultiplyAlpha:r?"premultiply":"none"}).then((function(s){i.close&&i.close(),s.flipY=n,s.premultiplyAlpha=r,e._image=s,t()}),(function(t){cc.error(t.message)})):t()}});cc.Texture2D=e.exports=p}),{"../../renderer/gfx":269,"../assets/CCAsset":62,"../event/event-target":128,"../platform/CCClass":150,"../platform/id-generater":167,"../renderer":181}],78:[(function(t){"use strict";t("./CCAsset"),t("./CCFont"),t("./CCPrefab"),t("./CCAudioClip"),t("./CCScripts"),t("./CCSceneAsset"),t("./CCSpriteFrame"),t("./CCTexture2D"),t("./CCRenderTexture"),t("./CCTTFFont"),t("./CCSpriteAtlas"),t("./CCBitmapFont"),t("./CCLabelAtlas"),t("./CCTextAsset"),t("./CCJsonAsset"),t("./CCBufferAsset"),t("./material")}),{"./CCAsset":62,"./CCAudioClip":63,"./CCBitmapFont":64,"./CCBufferAsset":65,"./CCFont":66,"./CCJsonAsset":67,"./CCLabelAtlas":68,"./CCPrefab":69,"./CCRenderTexture":70,"./CCSceneAsset":71,"./CCScripts":72,"./CCSpriteAtlas":73,"./CCSpriteFrame":74,"./CCTTFFont":75,"./CCTextAsset":76,"./CCTexture2D":77,"./material":85}],79:[(function(t,e){"use strict";var i,n=(i=t("../CCAsset"))&&i.__esModule?i:{default:i},r=t("./effect-parser"),s=cc.Class({name:"cc.EffectAsset",extends:n.default,ctor:function(){this._effect=null},properties:{properties:Object,techniques:[],shaders:[]},onLoad:function(){if(cc.game.renderType!==cc.game.RENDER_TYPE_CANVAS){for(var t=cc.renderer._forward._programLib,e=0;e=i.length)){var n=0,r=i.length;void 0!==e&&(n=e,r=e+1);for(var s=n;s=i.length)){var n=0,r=i.length;void 0!==e&&(n=e,r=e+1);for(var s=n;s=this._techniques.length?cc.warn("Can not switch to technique with index ["+t+"]"):this._technique=this._techniques[t]},o.clear=function(){this._techniques=[]},o.clone=function(){for(var t=[],e=0;ethis.maxSize||(this._clean(t),e[i][r].push(t),this.count++)}},s.clear=function(){this._pool={},this.count=0},s._clean=function(t){t._owner=null},r}(r.default));r.default.register("material",a);var o=a;i.default=o,e.exports=i.default}),{"../../utils/pool":223,"./utils":88}],87:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=o(t("./CCMaterial")),s=o(t("./effect-variant")),a=o(t("./material-pool"));function o(t){return t&&t.__esModule?t:{default:t}}function c(t,e){for(var i=0;i0},render:function(t){if(!(t=t||cc.director.getScene()))return null;this.node.getWorldMatrix(l),this.beforeDraw(),a.renderCamera(this._camera,t)},_onAlignWithScreen:function(){var t=cc.game.canvas.height/cc.view._scaleY;this._targetTexture&&(t=cc.visibleRect.height);var e=this._fov*cc.macro.RAD;this.node.z=t/(2*Math.tan(e/2)),e=2*Math.atan(Math.tan(e/2)/this.zoomRatio),this._camera.setFov(e),this._camera.setOrthoHeight(t/2/this.zoomRatio),this.node.setRotation(0,0,0,1)},beforeDraw:function(){if(this._camera){if(this._alignWithScreen)this._onAlignWithScreen();else{var t=this._fov*cc.macro.RAD;t=2*Math.atan(Math.tan(t/2)/this.zoomRatio),this._camera.setFov(t),this._camera.setOrthoHeight(this._orthoSize/this.zoomRatio)}this._camera.dirty=!0}}});cc.js.mixin(E.prototype,{getNodeToCameraTransform:function(t){var e=r.identity();return t.getWorldMatrix(h),this.containsNode(t)&&(this.getWorldToCameraMatrix(l),i.Mat4.mul(h,h,l)),r.fromMat4(e,h),e},getCameraToWorldPoint:function(t,e){return this.getScreenToWorldPoint(t,e)},getWorldToCameraPoint:function(t,e){return this.getWorldToScreenPoint(t,e)},getCameraToWorldMatrix:function(t){return this.getScreenToWorldMatrix2D(t)},getWorldToCameraMatrix:function(t){return this.getWorldToScreenMatrix2D(t)}}),e.exports=cc.Camera=E}),{"../../renderer/scene/camera":289,"../CCGame":28,"../geom-utils":136,"../renderer/index":181,"../renderer/render-flow":182,"../utils/affine-transform":213,"../value-types":236}],91:[(function(t,e){"use strict";cc.Collider.Box=cc.Class({properties:{_offset:cc.v2(0,0),_size:cc.size(100,100),offset:{tooltip:!1,get:function(){return this._offset},set:function(t){this._offset=t},type:cc.Vec2},size:{tooltip:!1,get:function(){return this._size},set:function(t){this._size.width=t.width<0?0:t.width,this._size.height=t.height<0?0:t.height},type:cc.Size}},resetInEditor:!1});var i=cc.Class({name:"cc.BoxCollider",extends:cc.Collider,mixins:[cc.Collider.Box],editor:!1});cc.BoxCollider=e.exports=i}),{}],92:[(function(t,e){"use strict";cc.Collider.Circle=cc.Class({properties:{_offset:cc.v2(0,0),_radius:50,offset:{tooltip:!1,get:function(){return this._offset},set:function(t){this._offset=t},type:cc.Vec2},radius:{tooltip:!1,get:function(){return this._radius},set:function(t){this._radius=t<0?0:t}}},resetInEditor:!1});var i=cc.Class({name:"cc.CircleCollider",extends:cc.Collider,mixins:[cc.Collider.Circle],editor:!1});cc.CircleCollider=e.exports=i}),{}],93:[(function(t,e){"use strict";var i=cc.Class({name:"cc.Collider",extends:cc.Component,properties:{editing:{default:!1,serializable:!1,tooltip:!1},tag:{tooltip:!1,default:0,range:[0,1e7],type:cc.Integer}},onDisable:function(){cc.director.getCollisionManager().removeCollider(this)},onEnable:function(){cc.director.getCollisionManager().addCollider(this)}});cc.Collider=e.exports=i}),{}],94:[(function(t,e){"use strict";var i,n=(i=t("../value-types/vec2"))&&i.__esModule?i:{default:i},r=t("./CCContact"),s=r.CollisionType,a=t("../CCNode").EventType,o=new n.default;function c(t,e,i,n,r,s){var a=t.x,o=t.y,c=t.width,l=t.height,h=e.m,u=h[0],f=h[1],d=h[4],_=h[5],p=u*a+d*o+h[12],v=f*a+_*o+h[13],g=u*c,m=f*c,y=d*l,E=_*l;n.x=p,n.y=v,r.x=g+p,r.y=m+v,i.x=y+p,i.y=E+v,s.x=g+y+p,s.y=m+E+v}var l=cc.Class({mixins:[cc.EventTarget],properties:{enabled:!1,enabledDrawBoundingBox:!1},ctor:function(){this._contacts=[],this._colliders=[],this._debugDrawer=null,this._enabledDebugDraw=!1,cc.director._scheduler&&cc.director._scheduler.enableForTarget(this)},update:function(){if(this.enabled){var t,e,i=this._colliders;for(t=0,e=i.length;tw&&(w=D),DR&&(R=P),P=0){e.splice(i,1);for(var n=this._contacts,r=n.length-1;r>=0;r--){var o=n[r];o.collider1!==t&&o.collider2!==t||(o.touching&&this._doCollide(s.CollisionExit,o),n.splice(r,1))}t.node.off(a.GROUP_CHANGED,this.onNodeGroupChanged,this)}else cc.errorID(6600)},onNodeGroupChanged:function(t){for(var e=t.getComponents(cc.Collider),i=0,n=e.length;i0){t.moveTo(s[0].x,s[0].y);for(var a=1;ar!=u>r&&n<(h-c)*(r-l)/(u-l)+c&&(i=!i)}return i}function a(t,e,i,n){var r,s=i.x-e.x,a=i.y-e.y,o=s*s+a*a,c=((t.x-e.x)*s+(t.y-e.y)*a)/o;return r=n?o?c<0?e:c>1?i:cc.v2(e.x+c*s,e.y+c*a):e:cc.v2(e.x+c*s,e.y+c*a),s=t.x-r.x,a=t.y-r.y,Math.sqrt(s*s+a*a)}i.lineLine=n,i.lineRect=function(t,e,i){var r=new cc.Vec2(i.x,i.y),s=new cc.Vec2(i.x,i.yMax),a=new cc.Vec2(i.xMax,i.yMax),o=new cc.Vec2(i.xMax,i.y);return!!(n(t,e,r,s)||n(t,e,s,a)||n(t,e,a,o)||n(t,e,o,r))},i.linePolygon=r,i.rectRect=function(t,e){var i=t.x,n=t.y,r=t.x+t.width,s=t.y+t.height,a=e.x,o=e.y,c=e.x+e.width,l=e.y+e.height;return i<=c&&r>=a&&n<=l&&s>=o},i.rectPolygon=function(t,e){var i,n,a=new cc.Vec2(t.x,t.y),o=new cc.Vec2(t.x,t.yMax),c=new cc.Vec2(t.xMax,t.yMax),l=new cc.Vec2(t.xMax,t.y);if(r(a,o,e))return!0;if(r(o,c,e))return!0;if(r(c,l,e))return!0;if(r(l,a,e))return!0;for(i=0,n=e.length;i>>1;r<=s;a=r+s>>>1){var o=t[a],c=o.constructor._executionOrder;if(c>i)s=a-1;else if(cn)s=a-1;else{if(!(l0&&(t.array.sort(l),this._invoke(t),t.array.length=0),this._invoke(this._zero),this._zero.array.length=0;var e=this._pos;e.array.length>0&&(e.array.sort(l),this._invoke(e),e.array.length=0)}}),u=cc.Class({extends:c,add:function(t){var e=t.constructor._executionOrder;if(0===e)this._zero.array.push(t);else{var i=e<0?this._neg.array:this._pos.array,n=a(i,t);n<0&&i.splice(~n,0,t)}},remove:function(t){var e=t.constructor._executionOrder;if(0===e)this._zero.fastRemove(t);else{var i=e<0?this._neg:this._pos,n=a(i.array,t);n>=0&&i.removeAt(n)}},invoke:function(t){this._neg.array.length>0&&this._invoke(this._neg,t),this._invoke(this._zero,t),this._pos.array.length>0&&this._invoke(this._pos,t)}});function f(t,e,i,n){var r="var a=it.array;for(it.i=0;it.i=0?n.fastRemoveAt(this._deferredComps,e):(!t.start||t._objFlags&r||this.startInvoker.remove(t),t.update&&this.updateInvoker.remove(t),t.lateUpdate&&this.lateUpdateInvoker.remove(t))},enableComp:function(t,e){if(!(t._objFlags&s)){if(t.onEnable){if(e)return void e.add(t);if(t.onEnable(),!t.node._activeInHierarchy)return}this._onEnabled(t)}},disableComp:function(t){t._objFlags&s&&(t.onDisable&&t.onDisable(),this._onDisabled(t))},_scheduleImmediate:function(t){"function"!=typeof t.start||t._objFlags&r||this.startInvoker.add(t),"function"==typeof t.update&&this.updateInvoker.add(t),"function"==typeof t.lateUpdate&&this.lateUpdateInvoker.add(t)},_deferredSchedule:function(){for(var t=this._deferredComps,e=0,i=t.length;e0&&(this._deferredSchedule(),this.startInvoker.invoke())},startPhase:function(){this._updating=!0,this.startInvoker.invoke(),this._startForNewComps()},updatePhase:function(t){this.updateInvoker.invoke(t)},lateUpdatePhase:function(t){this.lateUpdateInvoker.invoke(t),this._updating=!1,this._startForNewComps()}});e.exports=g}),{"./platform/CCClass":150,"./platform/CCObject":156,"./platform/js":171,"./utils/misc":221}],100:[(function(t,e){"use strict";var i=t("../../animation/animation-animator"),n=t("../../animation/animation-clip"),r=t("../event/event-target"),s=t("../platform/js"),a=function(t,e){return t===e},o=cc.Enum({PLAY:"play",STOP:"stop",PAUSE:"pause",RESUME:"resume",LASTFRAME:"lastframe",FINISHED:"finished"}),c=cc.Class({name:"cc.Animation",extends:t("./CCComponent"),mixins:[r],editor:!1,statics:{EventType:o},ctor:function(){cc.EventTarget.call(this),this._animator=null,this._nameToState=s.createMap(!0),this._didInit=!1,this._currentClip=null},properties:{_defaultClip:{default:null,type:n},defaultClip:{type:n,get:function(){return this._defaultClip},set:function(){},tooltip:!1},currentClip:{get:function(){return this._currentClip},set:function(t){this._currentClip=t},type:n,visible:!1},_writableClips:{get:function(){return this._clips},set:function(t){this._didInit=!1,this._clips=t,this._init()},type:[n]},_clips:{default:[],type:[n],tooltip:!1,visible:!0},playOnLoad:{default:!1,tooltip:!1}},start:function(){if(this.playOnLoad&&this._defaultClip&&(!this._animator||!this._animator.isPlaying)){var t=this.getAnimationState(this._defaultClip.name);this._animator.playState(t)}},onEnable:function(){this._animator&&this._animator.resume()},onDisable:function(){this._animator&&this._animator.pause()},onDestroy:function(){this.stop()},getClips:function(){return this._clips},play:function(t,e){var i=this.playAdditive(t,e);return this._animator.stopStatesExcept(i),i},playAdditive:function(t,e){this._init();var i=this.getAnimationState(t||this._defaultClip&&this._defaultClip.name);if(i){this.enabled=!0;var n=this._animator;n.isPlaying&&i.isPlaying?i.isPaused?n.resumeState(i):(n.stopState(i),n.playState(i,e)):n.playState(i,e),this.enabledInHierarchy||n.pause(),this.currentClip=i.clip}return i},stop:function(t){if(this._didInit)if(t){var e=this._nameToState[t];e&&this._animator.stopState(e)}else this._animator.stop()},pause:function(t){if(this._didInit)if(t){var e=this._nameToState[t];e&&this._animator.pauseState(e)}else this.enabled=!1},resume:function(t){if(this._didInit)if(t){var e=this.getAnimationState(t);e&&this._animator.resumeState(e)}else this.enabled=!0},setCurrentTime:function(t,e){if(this._init(),e){var i=this.getAnimationState(e);i&&this._animator.setStateTime(i,t)}else this._animator.setStateTime(t)},getAnimationState:function(t){this._init();var e=this._nameToState[t];return e&&!e.curveLoaded&&this._animator._reloadClip(e),e||null},addClip:function(t,e){if(t){this._init(),cc.js.array.contains(this._clips,t)||this._clips.push(t),e=e||t.name;var i=this._nameToState[e];if(i){if(i.clip===t)return i;var n=this._clips.indexOf(i.clip);-1!==n&&this._clips.splice(n,1)}var r=new cc.AnimationState(t,e);return this._nameToState[e]=r,r}cc.warnID(3900)},removeClip:function(t,e){if(t){var i;for(var n in this._init(),this._nameToState)if(i=this._nameToState[n],a(i.clip,t))break;if(t===this._defaultClip){if(!e)return void cc.warnID(3902);this._defaultClip=null}if(i&&i.isPlaying){if(!e)return void cc.warnID(3903);this.stop(i.name)}this._clips=this._clips.filter((function(e){return!a(e,t)})),i&&delete this._nameToState[i.name]}else cc.warnID(3901)},sample:function(t){if(this._init(),t){var e=this.getAnimationState(t);e&&e.sample()}else this._animator.sample()},on:function(t,e,i,n){this._init();var r=this._EventTargetOn(t,e,i,n);if("lastframe"===t){var s=this._nameToState;for(var a in s)s[a]._lastframeEventOn=!0}return r},off:function(t,e,i,n){if(this._init(),"lastframe"===t){var r=this._nameToState;for(var s in r)r[s]._lastframeEventOn=!1}this._EventTargetOff(t,e,i,n)},_init:function(){this._didInit||(this._didInit=!0,this._animator=new i(this.node,this),this._createStates())},_createStates:function(){this._nameToState=s.createMap(!0);for(var t=null,e=!1,i=0;i0&&(i=this.time/this.duration),i>=1&&(i=1),this.transition===r.COLOR){var n=this._fromColor.lerp(this._toColor,i);this._setTargetColor(n)}else this.transition===r.SCALE&&this._originalScale&&(e.scale=this._fromScale.lerp(this._toScale,i));1===i&&(this._transitionFinished=!0)}},_registerNodeEvent:function(){this.node.on(cc.Node.EventType.TOUCH_START,this._onTouchBegan,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this._onTouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this._onTouchCancel,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this._onMouseMoveIn,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this._onMouseMoveOut,this)},_unregisterNodeEvent:function(){this.node.off(cc.Node.EventType.TOUCH_START,this._onTouchBegan,this),this.node.off(cc.Node.EventType.TOUCH_MOVE,this._onTouchMove,this),this.node.off(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this),this.node.off(cc.Node.EventType.TOUCH_CANCEL,this._onTouchCancel,this),this.node.off(cc.Node.EventType.MOUSE_ENTER,this._onMouseMoveIn,this),this.node.off(cc.Node.EventType.MOUSE_LEAVE,this._onMouseMoveOut,this)},_registerTargetEvent:function(t){t.on(cc.Node.EventType.SCALE_CHANGED,this._onTargetScaleChanged,this)},_unregisterTargetEvent:function(t){t.off(cc.Node.EventType.SCALE_CHANGED,this._onTargetScaleChanged,this)},_getTargetSprite:function(t){var e=null;return t&&(e=t.getComponent(cc.Sprite)),e},_applyTarget:function(){var t=this._getTarget();this._sprite=this._getTargetSprite(t),this._originalScale||(this._originalScale=cc.Vec2.ZERO),this._originalScale.x=t.scaleX,this._originalScale.y=t.scaleY,this._registerTargetEvent(t)},_onTouchBegan:function(t){this.interactable&&this.enabledInHierarchy&&(this._pressed=!0,this._updateState(),t.stopPropagation())},_onTouchMove:function(t){if(this.interactable&&this.enabledInHierarchy&&this._pressed){var e,i=t.touch,n=this.node._hitTest(i.getLocation()),a=this._getTarget(),o=this._originalScale;this.transition===r.SCALE&&o?n?(this._fromScale.x=o.x,this._fromScale.y=o.y,this._toScale.x=o.x*this.zoomScale,this._toScale.y=o.y*this.zoomScale,this._transitionFinished=!1):(this.time=0,this._transitionFinished=!0,a.setScale(o.x,o.y)):(e=n?s.PRESSED:s.NORMAL,this._applyTransition(e)),t.stopPropagation()}},_onTouchEnded:function(t){this.interactable&&this.enabledInHierarchy&&(this._pressed&&(cc.Component.EventHandler.emitEvents(this.clickEvents,t),this.node.emit("click",this)),this._pressed=!1,this._updateState(),t.stopPropagation())},_onTouchCancel:function(){this.interactable&&this.enabledInHierarchy&&(this._pressed=!1,this._updateState())},_onMouseMoveIn:function(){!this._pressed&&this.interactable&&this.enabledInHierarchy&&(this.transition!==r.SPRITE||this.hoverSprite)&&(this._hovered||(this._hovered=!0,this._updateState()))},_onMouseMoveOut:function(){this._hovered&&(this._hovered=!1,this._updateState())},_updateState:function(){var t=this._getButtonState();this._applyTransition(t),this._updateDisabledState()},_getButtonState:function(){return this.interactable?this._pressed?s.PRESSED:this._hovered?s.HOVER:s.NORMAL:s.DISABLED},_updateColorTransitionImmediately:function(t){var e=this._getStateColor(t);this._setTargetColor(e),this._fromColor=e.clone(),this._toColor=e},_updateColorTransition:function(t){if(t===s.DISABLED)this._updateColorTransitionImmediately(t);else{var e=this._getTarget(),i=this._getStateColor(t);this._fromColor=e.color.clone(),this._toColor=i,this.time=0,this._transitionFinished=!1}},_updateSpriteTransition:function(t){var e=this._getStateSprite(t);this._sprite&&e&&(this._sprite.spriteFrame=e)},_updateScaleTransition:function(t){t===s.PRESSED?this._zoomUp():this._zoomBack()},_zoomUp:function(){this._originalScale&&(this._fromScale.x=this._originalScale.x,this._fromScale.y=this._originalScale.y,this._toScale.x=this._originalScale.x*this.zoomScale,this._toScale.y=this._originalScale.y*this.zoomScale,this.time=0,this._transitionFinished=!1)},_zoomBack:function(){if(this._originalScale){var t=this._getTarget();this._fromScale.x=t.scaleX,this._fromScale.y=t.scaleY,this._toScale.x=this._originalScale.x,this._toScale.y=this._originalScale.y,this.time=0,this._transitionFinished=!1}},_updateTransition:function(t){t===r.COLOR?this._updateColorTransitionImmediately(s.NORMAL):t===r.SPRITE&&this._updateSpriteTransition(s.NORMAL),this._updateState()},_applyTransition:function(t){var e=this.transition;e===r.COLOR?this._updateColorTransition(t):e===r.SPRITE?this._updateSpriteTransition(t):e===r.SCALE&&this._updateScaleTransition(t)},_resizeNodeToTargetNode:!1,_updateDisabledState:function(t){if(this._sprite&&(this.enableAutoGrayEffect||t)){var e=!1;this.transition===r.SPRITE&&this.disabledSprite||(e=this.enableAutoGrayEffect&&!this.interactable),this._switchGrayMaterial(e,this._sprite)}}});cc.Button=e.exports=a}),{"../utils/gray-sprite-state":219,"./CCComponent":105}],104:[(function(t,e){"use strict";var i=t("../camera/CCCamera"),n=t("./CCComponent"),r=cc.Class({name:"cc.Canvas",extends:n,editor:!1,resetInEditor:!1,statics:{instance:null},properties:{_designResolution:cc.size(960,640),designResolution:{get:function(){return cc.size(this._designResolution)},set:function(t){this._designResolution.width=t.width,this._designResolution.height=t.height,this.applySettings()},tooltip:!1},_fitWidth:!1,_fitHeight:!0,fitHeight:{get:function(){return this._fitHeight},set:function(t){this._fitHeight!==t&&(this._fitHeight=t,this.applySettings())},tooltip:!1},fitWidth:{get:function(){return this._fitWidth},set:function(t){this._fitWidth!==t&&(this._fitWidth=t,this.applySettings())},tooltip:!1}},_fitDesignResolution:!1,__preload:function(){if(r.instance)return cc.warnID(6700,this.node.name,r.instance.node.name);r.instance=this,this.applySettings();var t=this.getComponent(cc.Widget);t&&t.updateAlignment()},start:function(){if(!i.main&&cc.game.renderType!==cc.game.RENDER_TYPE_CANVAS){var t=new cc.Node("Main Camera");t.parent=this.node,t.setSiblingIndex(0);var e=t.addComponent(i),n=i.ClearFlags;e.clearFlags=n.COLOR|n.DEPTH|n.STENCIL,e.depth=-1}},onDestroy:function(){r.instance===this&&(r.instance=null)},applySettings:function(){var t,e=cc.ResolutionPolicy;t=this.fitHeight&&this.fitWidth?e.SHOW_ALL:this.fitHeight||this.fitWidth?this.fitWidth?e.FIXED_WIDTH:e.FIXED_HEIGHT:e.NO_BORDER;var i=this._designResolution;cc.view.setDesignResolutionSize(i.width,i.height,t)}});cc.Canvas=e.exports=r}),{"../camera/CCCamera":90,"./CCComponent":105}],105:[(function(t,e){"use strict";var i=t("../platform/CCObject"),n=t("../platform/js"),r=new(t("../platform/id-generater"))("Comp"),s=(i.Flags.IsOnEnableCalled,i.Flags.IsOnLoadCalled),a=!!cc.ActionManager,o=cc.Class({name:"cc.Component",extends:i,ctor:function(){this._id=r.getNewId(),this.__eventTargets=[]},properties:{node:{default:null,visible:!1},name:{get:function(){if(this._name)return this._name;var t=cc.js.getClassName(this),e=t.lastIndexOf(".");return e>=0&&(t=t.slice(e+1)),this.node.name+"<"+t+">"},set:function(t){this._name=t},visible:!1},uuid:{get:function(){return this._id},visible:!1},__scriptAsset:!1,_enabled:!0,enabled:{get:function(){return this._enabled},set:function(t){if(this._enabled!==t&&(this._enabled=t,this.node._activeInHierarchy)){var e=cc.director._compScheduler;t?e.enableComp(this):e.disableComp(this)}},visible:!1,animatable:!0},enabledInHierarchy:{get:function(){return this._enabled&&this.node._activeInHierarchy},visible:!1},_isOnLoadCalled:{get:function(){return this._objFlags&s}}},update:null,lateUpdate:null,__preload:null,onLoad:null,start:null,onEnable:null,onDisable:null,onDestroy:null,onFocusInEditor:null,onLostFocusInEditor:null,resetInEditor:null,addComponent:function(t){return this.node.addComponent(t)},getComponent:function(t){return this.node.getComponent(t)},getComponents:function(t){return this.node.getComponents(t)},getComponentInChildren:function(t){return this.node.getComponentInChildren(t)},getComponentsInChildren:function(t){return this.node.getComponentsInChildren(t)},_getLocalBounds:null,onRestore:null,destroy:function(){this._super()&&this._enabled&&this.node._activeInHierarchy&&cc.director._compScheduler.disableComp(this)},_onPreDestroy:function(){a&&cc.director.getActionManager().removeAllActionsFromTarget(this),this.unscheduleAllCallbacks();for(var t=this.__eventTargets,e=t.length-1;e>=0;--e){var i=t[e];i&&i.targetOff(this)}t.length=0,cc.director._nodeActivator.destroyComp(this),this.node._removeComponent(this)},_instantiate:function(t){return t||(t=cc.instantiate._clone(this,this)),t.node=null,t},schedule:function(t,e,i,n){cc.assertID(t,1619),e=e||0,cc.assertID(e>=0,1620),i=isNaN(i)?cc.macro.REPEAT_FOREVER:i,n=n||0;var r=cc.director.getScheduler(),s=r.isTargetPaused(this);r.schedule(t,this,e,i,n,s)},scheduleOnce:function(t,e){this.schedule(t,0,0,e)},unschedule:function(t){t&&cc.director.getScheduler().unschedule(t,this)},unscheduleAllCallbacks:function(){cc.director.getScheduler().unscheduleAllForTarget(this)}});o._requireComponent=null,o._executionOrder=0,n.value(o,"_registerEditorProps",(function(t,e){var i=e.requireComponent;i&&(t._requireComponent=i);var n=e.executionOrder;n&&"number"==typeof n&&(t._executionOrder=n)})),o.prototype.__scriptUuid="",cc.Component=e.exports=o}),{"../platform/CCObject":156,"../platform/id-generater":167,"../platform/js":171}],106:[(function(){"use strict";cc.Component.EventHandler=cc.Class({name:"cc.ClickEvent",properties:{target:{default:null,type:cc.Node},component:"",_componentId:"",_componentName:{get:function(){return this._genCompIdIfNeeded(),this._compId2Name(this._componentId)},set:function(t){this._componentId=this._compName2Id(t)}},handler:{default:""},customEventData:{default:""}},statics:{emitEvents:function(t){var e;if(arguments.length>0)for(var i=0,n=(e=new Array(arguments.length-1)).length;ip&&(p=v),R>=p&&(v=p,p=R,y=x.getAnchorPoint().y),this.horizontalDirection===o.RIGHT_TO_LEFT&&(S=1-x.anchorX),d=d+h*S*w+h*this.spacingX;var M=h*(1-S)*w;if(e){var I=d+M+h*(h>0?this.paddingRight:this.paddingLeft),D=this.horizontalDirection===o.LEFT_TO_RIGHT&&I>(1-c.x)*t,P=this.horizontalDirection===o.RIGHT_TO_LEFT&&I<-c.x*t;(D||P)&&(R>=p?(0===v&&(v=p),_+=v,v=p):(_+=p,v=R,p=0),d=f+h*(u+S*w),g++)}var O=i(x,_,g);t>=w+this.paddingLeft+this.paddingRight&&s&&x.setPosition(cc.v2(d,O));var L,N=1,F=0===p?R:p;this.verticalDirection===a.TOP_TO_BOTTOM?(m=m||this.node._contentSize.height,(L=O+(N=-1)*(F*y+this.paddingBottom))m&&(m=L)),d+=M}}return m},_getVerticalBaseHeight:function(t){var e=0,i=0;if(this.resizeMode===r.CONTAINER){for(var n=0;np&&(p=v),w>=p&&(v=p,p=w,y=x.getAnchorPoint().x),this.verticalDirection===a.TOP_TO_BOTTOM&&(S=1-x.anchorY),d=d+h*S*R+h*this.spacingY;var M=h*(1-S)*R;if(e){var I=d+M+h*(h>0?this.paddingTop:this.paddingBottom),D=this.verticalDirection===a.BOTTOM_TO_TOP&&I>(1-c.y)*t,P=this.verticalDirection===a.TOP_TO_BOTTOM&&I<-c.y*t;(D||P)&&(w>=p?(0===v&&(v=p),_+=v,v=p):(_+=p,v=w,p=0),d=f+h*(u+S*R),g++)}var O=i(x,_,g);t>=R+(this.paddingTop+this.paddingBottom)&&s&&x.setPosition(cc.v2(O,d));var L,N=1,F=0===p?w:p;this.horizontalDirection===o.RIGHT_TO_LEFT?(N=-1,m=m||this.node._contentSize.width,(L=O+N*(F*y+this.paddingLeft))m&&(m=L)),d+=M}}return m},_doLayoutBasic:function(){for(var t=this.node.children,e=null,i=0;i0&&(this._doLayout(),this._layoutDirty=!1)}});cc.Layout=e.exports=c}),{"../CCNode":29,"./CCComponent":105}],111:[(function(t,e){"use strict";var i=a(t("../../renderer/gfx")),n=a(t("../value-types/mat4")),r=a(t("../value-types/vec2")),s=a(t("../assets/material/material-variant"));function a(t){return t&&t.__esModule?t:{default:t}}var o=t("../utils/misc"),c=t("./CCRenderComponent"),l=t("../renderer/render-flow"),h=t("../graphics/graphics"),u=new r.default,f=new n.default,d=[];function _(t,e,i){d.length=0;for(var n=2*Math.PI/i,r=0;r=0&&o.y>=0&&o.x<=s&&o.y<=a;else if(this.type===p.ELLIPSE){var l=s/2,h=a/2,d=o.x-.5*s,_=o.y-.5*a;c=d*d/(l*l)+_*_/(h*h)<1}return this.inverted&&(c=!c),c},markForRender:function(t){var e=l.FLAG_RENDER|l.FLAG_UPDATE_RENDER_DATA|l.FLAG_POST_RENDER;t?(this.node._renderFlag|=e,this.markForValidate()):t||(this.node._renderFlag&=~e)},disableRender:function(){this.node._renderFlag&=~(l.FLAG_RENDER|l.FLAG_UPDATE_RENDER_DATA|l.FLAG_POST_RENDER)}});cc.Mask=e.exports=v}),{"../../renderer/gfx":269,"../assets/material/material-variant":87,"../graphics/graphics":144,"../renderer/render-flow":182,"../utils/misc":221,"../value-types/mat4":238,"../value-types/vec2":245,"./CCRenderComponent":115}],112:[(function(t,e){"use strict";var i=cc.Enum({Unified:0,Free:1}),n=cc.Enum({Horizontal:0,Vertical:1}),r=cc.Enum({PAGE_TURNING:0}),s=cc.Class({name:"cc.PageView",extends:cc.ScrollView,editor:!1,ctor:function(){this._curPageIdx=0,this._lastPageIdx=0,this._pages=[],this._initContentPos=cc.v2(),this._scrollCenterOffsetX=[],this._scrollCenterOffsetY=[]},properties:{sizeMode:{default:i.Unified,type:i,tooltip:!1,notify:function(){this._syncSizeMode()}},direction:{default:n.Horizontal,type:n,tooltip:!1,notify:function(){this._syncScrollDirection()}},scrollThreshold:{default:.5,type:cc.Float,slide:!0,range:[0,1,.01],tooltip:!1},autoPageTurningThreshold:{default:100,type:cc.Float,tooltip:!1},pageTurningEventTiming:{default:.1,type:cc.Float,range:[0,1,.01],tooltip:!1},indicator:{default:null,type:cc.PageViewIndicator,tooltip:!1,notify:function(){this.indicator&&this.indicator.setPageView(this)}},pageTurningSpeed:{default:.3,type:cc.Float,tooltip:!1},pageEvents:{default:[],type:cc.Component.EventHandler,tooltip:!1}},statics:{SizeMode:i,Direction:n,EventType:r},onEnable:function(){this._super(),this.node.on(cc.Node.EventType.SIZE_CHANGED,this._updateAllPagesSize,this),this.node.on("scroll-ended-with-threshold",this._dispatchPageTurningEvent,this)},onDisable:function(){this._super(),this.node.off(cc.Node.EventType.SIZE_CHANGED,this._updateAllPagesSize,this),this.node.off("scroll-ended-with-threshold",this._dispatchPageTurningEvent,this)},onLoad:function(){this._initPages(),this.indicator&&this.indicator.setPageView(this)},getCurrentPageIndex:function(){return this._curPageIdx},setCurrentPageIndex:function(t){this.scrollToPage(t,!0)},getPages:function(){return this._pages},addPage:function(t){t&&-1===this._pages.indexOf(t)&&this.content&&(this.content.addChild(t),this._pages.push(t),this._updatePageView())},insertPage:function(t,e){e<0||!t||-1!==this._pages.indexOf(t)||!this.content||(e>=this._pages.length?this.addPage(t):(this._pages.splice(e,0,t),this.content.addChild(t),this._updatePageView()))},removePage:function(t){if(t&&this.content){var e=this._pages.indexOf(t);-1!==e?this.removePageAtIndex(e):cc.warnID(4300,t.name)}},removePageAtIndex:function(t){var e=this._pages;if(!(t<0||t>=e.length)){var i=e[t];i&&(this.content.removeChild(i),e.splice(t,1),this._updatePageView())}},removeAllPages:function(){if(this.content){for(var t=this._pages,e=0,i=t.length;e=this._pages.length||(e=void 0!==e?e:.3,this._curPageIdx=t,this.scrollToOffset(this._moveOffsetValue(t),e,!0),this.indicator&&this.indicator._changedState())},getScrollEndedEventTiming:function(){return this.pageTurningEventTiming},_syncScrollDirection:function(){this.horizontal=this.direction===n.Horizontal,this.vertical=this.direction===n.Vertical},_syncSizeMode:function(){if(this.content){var t=this.content.getComponent(cc.Layout);if(t){if(this.sizeMode===i.Free&&this._pages.length>0){var e=this._pages[this._pages.length-1];this.direction===n.Horizontal?(t.paddingLeft=(this._view.width-this._pages[0].width)/2,t.paddingRight=(this._view.width-e.width)/2):this.direction===n.Vertical&&(t.paddingTop=(this._view.height-this._pages[0].height)/2,t.paddingBottom=(this._view.height-e.height)/2)}t.updateLayout()}}},_updatePageView:function(){var t=this.content.getComponent(cc.Layout);t&&t.enabled&&t.updateLayout();var e=this._pages.length;this._curPageIdx>=e&&(this._curPageIdx=0===e?0:e-1,this._lastPageIdx=this._curPageIdx);for(var i=this._initContentPos,r=0;r=0||this._pages.push(i)}this._syncScrollDirection(),this._syncSizeMode(),this._updatePageView()}},_dispatchPageTurningEvent:function(){this._lastPageIdx!==this._curPageIdx&&(this._lastPageIdx=this._curPageIdx,cc.Component.EventHandler.emitEvents(this.pageEvents,this,r.PAGE_TURNING),this.node.emit("page-turning",this))},_isScrollable:function(t,e,r){if(this.sizeMode===i.Free){var s,a;if(this.direction===n.Horizontal)return s=this._scrollCenterOffsetX[e],a=this._scrollCenterOffsetX[r],Math.abs(t.x)>=Math.abs(s-a)*this.scrollThreshold;if(this.direction===n.Vertical)return s=this._scrollCenterOffsetY[e],a=this._scrollCenterOffsetY[r],Math.abs(t.y)>=Math.abs(s-a)*this.scrollThreshold}else{if(this.direction===n.Horizontal)return Math.abs(t.x)>=this._view.width*this.scrollThreshold;if(this.direction===n.Vertical)return Math.abs(t.y)>=this._view.height*this.scrollThreshold}},_isQuicklyScrollable:function(t){if(this.direction===n.Horizontal){if(Math.abs(t.x)>this.autoPageTurningThreshold)return!0}else if(this.direction===n.Vertical&&Math.abs(t.y)>this.autoPageTurningThreshold)return!0;return!1},_moveOffsetValue:function(t){var e=cc.v2(0,0);return this.sizeMode===i.Free?this.direction===n.Horizontal?e.x=this._scrollCenterOffsetX[t]:this.direction===n.Vertical&&(e.y=this._scrollCenterOffsetY[t]):this.direction===n.Horizontal?e.x=t*this._view.width:this.direction===n.Vertical&&(e.y=t*this._view.height),e},_getDragDirection:function(t){return this.direction===n.Horizontal?0===t.x?0:t.x>0?1:-1:this.direction===n.Vertical?0===t.y?0:t.y<0?1:-1:void 0},_handleReleaseLogic:function(){this._autoScrollToPage(),this._scrolling&&(this._scrolling=!1,this._autoScrolling||this._dispatchEvent("scroll-ended"))},_autoScrollToPage:function(){if(this._startBounceBackIfNeeded()){var t=this._getHowMuchOutOfBoundary();((t=this._clampDelta(t)).x>0||t.y<0)&&(this._curPageIdx=0===this._pages.length?0:this._pages.length-1),(t.x<0||t.y>0)&&(this._curPageIdx=0),this.indicator&&this.indicator._changedState()}else{var e=this._touchBeganPosition.sub(this._touchEndPosition),i=this._curPageIdx,n=i+this._getDragDirection(e),r=this.pageTurningSpeed*Math.abs(i-n);if(n=t.length)){for(var i=0;it.length)for(i=0;i0;--i){var n=t[i-1];this.node.removeChild(n),t.splice(i-1,1)}this._layout&&this._layout.enabledInHierarchy&&this._layout.updateLayout(),this._changedState()}}}});cc.PageViewIndicator=e.exports=n}),{"./CCComponent":105}],114:[(function(t,e){"use strict";var i=t("../utils/misc"),n=t("./CCComponent"),r=cc.Enum({HORIZONTAL:0,VERTICAL:1,FILLED:2}),s=cc.Class({name:"cc.ProgressBar",extends:n,editor:!1,_initBarSprite:function(){if(this.barSprite){var t=this.barSprite.node;if(!t)return;var e=this.node.getContentSize(),i=this.node.getAnchorPoint(),n=t.getContentSize();t.parent===this.node&&this.node.setContentSize(n),this.barSprite.fillType===cc.Sprite.FillType.RADIAL&&(this.mode=r.FILLED);var s=t.getContentSize();if(this.mode===r.HORIZONTAL?this.totalLength=s.width:this.mode===r.VERTICAL?this.totalLength=s.height:this.totalLength=this.barSprite.fillRange,t.parent===this.node){var a=-e.width*i.x;t.setPosition(cc.v2(a,0))}}},_updateBarStatus:function(){if(this.barSprite){var t=this.barSprite.node;if(!t)return;var e,n,s,a=t.getAnchorPoint(),o=t.getContentSize(),c=t.getPosition(),l=cc.v2(0,.5),h=i.clamp01(this.progress),u=this.totalLength*h;switch(this.mode){case r.HORIZONTAL:this.reverse&&(l=cc.v2(1,.5)),e=cc.size(u,o.height),n=this.totalLength,s=o.height;break;case r.VERTICAL:l=this.reverse?cc.v2(.5,1):cc.v2(.5,0),e=cc.size(o.width,u),n=o.width,s=this.totalLength}if(this.mode===r.FILLED)this.barSprite.type!==cc.Sprite.Type.FILLED?cc.warn("ProgressBar FILLED mode only works when barSprite's Type is FILLED!"):(this.reverse&&(u*=-1),this.barSprite.fillRange=u);else if(this.barSprite.type!==cc.Sprite.Type.FILLED){var f=l.x-a.x,d=l.y-a.y,_=cc.v2(n*f,s*d);t.setPosition(c.x+_.x,c.y+_.y),t.setAnchorPoint(l),t.setContentSize(e)}else cc.warn("ProgressBar non-FILLED mode only works when barSprite's Type is non-FILLED!")}},properties:{barSprite:{default:null,type:cc.Sprite,tooltip:!1,notify:function(){this._initBarSprite()},animatable:!1},mode:{default:r.HORIZONTAL,type:r,tooltip:!1,notify:function(){if(this.barSprite){var t=this.barSprite.node;if(!t)return;var e=t.getContentSize();this.mode===r.HORIZONTAL?this.totalLength=e.width:this.mode===r.VERTICAL?this.totalLength=e.height:this.mode===r.FILLED&&(this.totalLength=this.barSprite.fillRange)}},animatable:!1},_N$totalLength:1,totalLength:{range:[0,Number.MAX_VALUE],tooltip:!1,get:function(){return this._N$totalLength},set:function(t){this.mode===r.FILLED&&(t=i.clamp01(t)),this._N$totalLength=t,this._updateBarStatus()}},progress:{default:1,type:cc.Float,range:[0,1,.1],slide:!0,tooltip:!1,notify:function(){this._updateBarStatus()}},reverse:{default:!1,tooltip:!1,notify:function(){this.barSprite&&(this.barSprite.fillStart=1-this.barSprite.fillStart),this._updateBarStatus()},animatable:!1}},statics:{Mode:r}});cc.ProgressBar=e.exports=s}),{"../utils/misc":221,"./CCComponent":105}],115:[(function(t,e){"use strict";var i=s(t("../renderer/assembler")),n=s(t("../assets/material/material-variant")),r=t("../value-types");function s(t){return t&&t.__esModule?t:{default:t}}var a=t("./CCComponent"),o=t("../renderer/render-flow"),c=t("../assets/material/CCMaterial"),l=new r.Color,h=cc.Class({name:"RenderComponent",extends:a,editor:!1,properties:{_materials:{default:[],type:c},materials:{get:function(){return this._materials},set:function(t){this._materials=t,this._activateMaterial()},type:[c],displayName:"Materials",animatable:!1}},ctor:function(){this._vertsDirty=!0,this._assembler=null},_resetAssembler:function(){i.default.init(this),this._updateColor(),this.setVertsDirty()},__preload:function(){this._resetAssembler(),this._activateMaterial()},onEnable:function(){this.node._renderComponent&&(this.node._renderComponent.enabled=!1),this.node._renderComponent=this,this.node._renderFlag|=o.FLAG_OPACITY_COLOR,this.setVertsDirty()},onDisable:function(){this.node._renderComponent=null,this.disableRender()},onDestroy:function(){for(var t=this._materials,e=0;e=this._materials.length)return null;var e=this._materials[t];if(!e)return null;var i=n.default.create(e,this);return i!==e&&this.setMaterial(t,i),i},getMaterials:function(){for(var t=this._materials,e=0;e0},set:function(t){this._setAlign(s,t)},animatable:!1,tooltip:!1},isAlignVerticalCenter:{get:function(){return(this._alignFlags&a)>0},set:function(t){t?(this.isAlignTop=!1,this.isAlignBottom=!1,this._alignFlags|=a):this._alignFlags&=~a},animatable:!1,tooltip:!1},isAlignBottom:{get:function(){return(this._alignFlags&o)>0},set:function(t){this._setAlign(o,t)},animatable:!1,tooltip:!1},isAlignLeft:{get:function(){return(this._alignFlags&c)>0},set:function(t){this._setAlign(c,t)},animatable:!1,tooltip:!1},isAlignHorizontalCenter:{get:function(){return(this._alignFlags&l)>0},set:function(t){t?(this.isAlignLeft=!1,this.isAlignRight=!1,this._alignFlags|=l):this._alignFlags&=~l},animatable:!1,tooltip:!1},isAlignRight:{get:function(){return(this._alignFlags&h)>0},set:function(t){this._setAlign(h,t)},animatable:!1,tooltip:!1},isStretchWidth:{get:function(){return(this._alignFlags&f)===f},visible:!1},isStretchHeight:{get:function(){return(this._alignFlags&u)===u},visible:!1},top:{get:function(){return this._top},set:function(t){this._top=t},tooltip:!1},bottom:{get:function(){return this._bottom},set:function(t){this._bottom=t},tooltip:!1},left:{get:function(){return this._left},set:function(t){this._left=t},tooltip:!1},right:{get:function(){return this._right},set:function(t){this._right=t},tooltip:!1},horizontalCenter:{get:function(){return this._horizontalCenter},set:function(t){this._horizontalCenter=t},tooltip:!1},verticalCenter:{get:function(){return this._verticalCenter},set:function(t){this._verticalCenter=t},tooltip:!1},isAbsoluteHorizontalCenter:{get:function(){return this._isAbsHorizontalCenter},set:function(t){this._isAbsHorizontalCenter=t},animatable:!1},isAbsoluteVerticalCenter:{get:function(){return this._isAbsVerticalCenter},set:function(t){this._isAbsVerticalCenter=t},animatable:!1},isAbsoluteTop:{get:function(){return this._isAbsTop},set:function(t){this._isAbsTop=t},animatable:!1},isAbsoluteBottom:{get:function(){return this._isAbsBottom},set:function(t){this._isAbsBottom=t},animatable:!1},isAbsoluteLeft:{get:function(){return this._isAbsLeft},set:function(t){this._isAbsLeft=t},animatable:!1},isAbsoluteRight:{get:function(){return this._isAbsRight},set:function(t){this._isAbsRight=t},animatable:!1},alignMode:{default:n.ON_WINDOW_RESIZE,type:n,tooltip:!1},_wasAlignOnce:{default:void 0,formerlySerializedAs:"isAlignOnce"},_target:null,_alignFlags:0,_left:0,_right:0,_top:0,_bottom:0,_verticalCenter:0,_horizontalCenter:0,_isAbsLeft:!0,_isAbsRight:!0,_isAbsTop:!0,_isAbsBottom:!0,_isAbsHorizontalCenter:!0,_isAbsVerticalCenter:!0,_originalWidth:0,_originalHeight:0},statics:{AlignMode:n},onLoad:function(){void 0!==this._wasAlignOnce&&(this.alignMode=this._wasAlignOnce?n.ONCE:n.ALWAYS,this._wasAlignOnce=void 0)},onEnable:function(){i.add(this)},onDisable:function(){i.remove(this)},_validateTargetInDEV:!1,_setAlign:function(t,e){if(e!==(this._alignFlags&t)>0){var i=(t&f)>0;e?(this._alignFlags|=t,i?(this.isAlignHorizontalCenter=!1,this.isStretchWidth&&(this._originalWidth=this.node.width)):(this.isAlignVerticalCenter=!1,this.isStretchHeight&&(this._originalHeight=this.node.height))):(i?this.isStretchWidth&&(this.node.width=this._originalWidth):this.isStretchHeight&&(this.node.height=this._originalHeight),this._alignFlags&=~t)}},updateAlignment:function(){i.updateAlignment(this.node)}});Object.defineProperty(d.prototype,"isAlignOnce",{get:function(){return this.alignMode===n.ONCE},set:function(t){this.alignMode=t?n.ONCE:n.ALWAYS}}),cc.Widget=e.exports=d}),{"../base-ui/CCWidgetManager":89,"./CCComponent":105}],120:[(function(t,e){"use strict";t("./CCComponent"),t("./CCComponentEventHandler"),t("./missing-script");var i=t("./SubContextView");i||(i=cc.Class({name:"cc.SubContextView",extends:cc.Component}),cc.SubContextView=cc.WXSubContextView=cc.SwanSubContextView=i);var n=[t("./CCSprite"),t("./CCWidget"),t("./CCCanvas"),t("./CCAudioSource"),t("./CCAnimation"),t("./CCButton"),t("./CCLabel"),t("./CCProgressBar"),t("./CCMask"),t("./CCScrollBar"),t("./CCScrollView"),t("./CCPageViewIndicator"),t("./CCPageView"),t("./CCSlider"),t("./CCLayout"),t("./editbox/CCEditBox"),t("./CCLabelOutline"),t("./CCLabelShadow"),t("./CCRichText"),t("./CCToggleContainer"),t("./CCToggleGroup"),t("./CCToggle"),t("./CCBlockInputEvents"),t("./CCMotionStreak"),t("./CCSafeArea"),i];e.exports=n}),{"./CCAnimation":100,"./CCAudioSource":101,"./CCBlockInputEvents":102,"./CCButton":103,"./CCCanvas":104,"./CCComponent":105,"./CCComponentEventHandler":106,"./CCLabel":107,"./CCLabelOutline":108,"./CCLabelShadow":109,"./CCLayout":110,"./CCMask":111,"./CCMotionStreak":void 0,"./CCPageView":112,"./CCPageViewIndicator":113,"./CCProgressBar":114,"./CCRichText":void 0,"./CCSafeArea":116,"./CCScrollBar":void 0,"./CCScrollView":void 0,"./CCSlider":void 0,"./CCSprite":117,"./CCToggle":void 0,"./CCToggleContainer":void 0,"./CCToggleGroup":void 0,"./CCWidget":119,"./SubContextView":void 0,"./editbox/CCEditBox":void 0,"./missing-script":121}],121:[(function(t,e){"use strict";var i=cc.js,n=cc.Class({name:"cc.MissingScript",extends:cc.Component,editor:{inspector:"packages://inspector/inspectors/comps/missing-script.js"},properties:{compiled:{default:!1,serializable:!1},_$erialized:{default:null,visible:!1,editorOnly:!0}},ctor:!1,statics:{safeFindClass:function(t){return i._getClassById(t)||(cc.deserialize.reportMissingClass(t),n)}},onLoad:function(){cc.warnID(4600,this.node.name)}});cc._MissingScript=e.exports=n}),{}],122:[(function(t,e){"use strict";var i=cc.js;t("../event/event");var n=function(t,e){cc.Event.call(this,cc.Event.MOUSE,e),this._eventType=t,this._button=0,this._x=0,this._y=0,this._prevX=0,this._prevY=0,this._scrollX=0,this._scrollY=0};i.extend(n,cc.Event);var r=n.prototype;r.setScrollData=function(t,e){this._scrollX=t,this._scrollY=e},r.getScrollX=function(){return this._scrollX},r.getScrollY=function(){return this._scrollY},r.setLocation=function(t,e){this._x=t,this._y=e},r.getLocation=function(){return cc.v2(this._x,this._y)},r.getLocationInView=function(){return cc.v2(this._x,cc.view._designResolutionSize.height-this._y)},r._setPrevCursor=function(t,e){this._prevX=t,this._prevY=e},r.getPreviousLocation=function(){return cc.v2(this._prevX,this._prevY)},r.getDelta=function(){return cc.v2(this._x-this._prevX,this._y-this._prevY)},r.getDeltaX=function(){return this._x-this._prevX},r.getDeltaY=function(){return this._y-this._prevY},r.setButton=function(t){this._button=t},r.getButton=function(){return this._button},r.getLocationX=function(){return this._x},r.getLocationY=function(){return this._y},n.NONE=0,n.DOWN=1,n.UP=2,n.MOVE=3,n.SCROLL=4,n.BUTTON_LEFT=0,n.BUTTON_RIGHT=2,n.BUTTON_MIDDLE=1,n.BUTTON_4=3,n.BUTTON_5=4,n.BUTTON_6=5,n.BUTTON_7=6,n.BUTTON_8=7;var s=function(t,e){cc.Event.call(this,cc.Event.TOUCH,e),this._eventCode=0,this._touches=t||[],this.touch=null,this.currentTouch=null};i.extend(s,cc.Event),(r=s.prototype).getEventCode=function(){return this._eventCode},r.getTouches=function(){return this._touches},r._setEventCode=function(t){this._eventCode=t},r._setTouches=function(t){this._touches=t},r.setLocation=function(t,e){this.touch&&this.touch.setTouchInfo(this.touch.getID(),t,e)},r.getLocation=function(){return this.touch?this.touch.getLocation():cc.v2()},r.getLocationInView=function(){return this.touch?this.touch.getLocationInView():cc.v2()},r.getPreviousLocation=function(){return this.touch?this.touch.getPreviousLocation():cc.v2()},r.getStartLocation=function(){return this.touch?this.touch.getStartLocation():cc.v2()},r.getID=function(){return this.touch?this.touch.getID():null},r.getDelta=function(){return this.touch?this.touch.getDelta():cc.v2()},r.getDeltaX=function(){return this.touch?this.touch.getDelta().x:0},r.getDeltaY=function(){return this.touch?this.touch.getDelta().y:0},r.getLocationX=function(){return this.touch?this.touch.getLocationX():0},r.getLocationY=function(){return this.touch?this.touch.getLocationY():0},s.MAX_TOUCHES=5,s.BEGAN=0,s.MOVED=1,s.ENDED=2,s.CANCELED=3;var a=function(t,e){cc.Event.call(this,cc.Event.ACCELERATION,e),this.acc=t};i.extend(a,cc.Event);var o=function(t,e,i){cc.Event.call(this,cc.Event.KEYBOARD,i),this.keyCode=t,this.isPressed=e};i.extend(o,cc.Event),cc.Event.EventMouse=n,cc.Event.EventTouch=s,cc.Event.EventAcceleration=a,cc.Event.EventKeyboard=o,e.exports=cc.Event}),{"../event/event":129}],123:[(function(t,e){"use strict";var i=t("../platform/js");cc.EventListener=function(t,e,i){this._onEvent=i,this._type=t||0,this._listenerID=e||"",this._registered=!1,this._fixedPriority=0,this._node=null,this._target=null,this._paused=!0,this._isEnabled=!0},cc.EventListener.prototype={constructor:cc.EventListener,_setPaused:function(t){this._paused=t},_isPaused:function(){return this._paused},_setRegistered:function(t){this._registered=t},_isRegistered:function(){return this._registered},_getType:function(){return this._type},_getListenerID:function(){return this._listenerID},_setFixedPriority:function(t){this._fixedPriority=t},_getFixedPriority:function(){return this._fixedPriority},_setSceneGraphPriority:function(t){this._target=t,this._node=t},_getSceneGraphPriority:function(){return this._node},checkAvailable:function(){return null!==this._onEvent},clone:function(){return null},setEnabled:function(t){this._isEnabled=t},isEnabled:function(){return this._isEnabled},retain:function(){},release:function(){}},cc.EventListener.UNKNOWN=0,cc.EventListener.TOUCH_ONE_BY_ONE=1,cc.EventListener.TOUCH_ALL_AT_ONCE=2,cc.EventListener.KEYBOARD=3,cc.EventListener.MOUSE=4,cc.EventListener.ACCELERATION=6,cc.EventListener.CUSTOM=8;var n=cc.EventListener.ListenerID={MOUSE:"__cc_mouse",TOUCH_ONE_BY_ONE:"__cc_touch_one_by_one",TOUCH_ALL_AT_ONCE:"__cc_touch_all_at_once",KEYBOARD:"__cc_keyboard",ACCELERATION:"__cc_acceleration"},r=function(t,e){this._onCustomEvent=e,cc.EventListener.call(this,cc.EventListener.CUSTOM,t,this._callback)};i.extend(r,cc.EventListener),i.mixin(r.prototype,{_onCustomEvent:null,_callback:function(t){null!==this._onCustomEvent&&this._onCustomEvent(t)},checkAvailable:function(){return cc.EventListener.prototype.checkAvailable.call(this)&&null!==this._onCustomEvent},clone:function(){return new r(this._listenerID,this._onCustomEvent)}});var s=function(){cc.EventListener.call(this,cc.EventListener.MOUSE,n.MOUSE,this._callback)};i.extend(s,cc.EventListener),i.mixin(s.prototype,{onMouseDown:null,onMouseUp:null,onMouseMove:null,onMouseScroll:null,_callback:function(t){var e=cc.Event.EventMouse;switch(t._eventType){case e.DOWN:this.onMouseDown&&this.onMouseDown(t);break;case e.UP:this.onMouseUp&&this.onMouseUp(t);break;case e.MOVE:this.onMouseMove&&this.onMouseMove(t);break;case e.SCROLL:this.onMouseScroll&&this.onMouseScroll(t)}},clone:function(){var t=new s;return t.onMouseDown=this.onMouseDown,t.onMouseUp=this.onMouseUp,t.onMouseMove=this.onMouseMove,t.onMouseScroll=this.onMouseScroll,t},checkAvailable:function(){return!0}});var a=function(){cc.EventListener.call(this,cc.EventListener.TOUCH_ONE_BY_ONE,n.TOUCH_ONE_BY_ONE,null),this._claimedTouches=[]};i.extend(a,cc.EventListener),i.mixin(a.prototype,{constructor:a,_claimedTouches:null,swallowTouches:!1,onTouchBegan:null,onTouchMoved:null,onTouchEnded:null,onTouchCancelled:null,setSwallowTouches:function(t){this.swallowTouches=t},isSwallowTouches:function(){return this.swallowTouches},clone:function(){var t=new a;return t.onTouchBegan=this.onTouchBegan,t.onTouchMoved=this.onTouchMoved,t.onTouchEnded=this.onTouchEnded,t.onTouchCancelled=this.onTouchCancelled,t.swallowTouches=this.swallowTouches,t},checkAvailable:function(){return!!this.onTouchBegan||(cc.logID(1801),!1)}});var o=function(){cc.EventListener.call(this,cc.EventListener.TOUCH_ALL_AT_ONCE,n.TOUCH_ALL_AT_ONCE,null)};i.extend(o,cc.EventListener),i.mixin(o.prototype,{constructor:o,onTouchesBegan:null,onTouchesMoved:null,onTouchesEnded:null,onTouchesCancelled:null,clone:function(){var t=new o;return t.onTouchesBegan=this.onTouchesBegan,t.onTouchesMoved=this.onTouchesMoved,t.onTouchesEnded=this.onTouchesEnded,t.onTouchesCancelled=this.onTouchesCancelled,t},checkAvailable:function(){return null!==this.onTouchesBegan||null!==this.onTouchesMoved||null!==this.onTouchesEnded||null!==this.onTouchesCancelled||(cc.logID(1802),!1)}});var c=function(t){this._onAccelerationEvent=t,cc.EventListener.call(this,cc.EventListener.ACCELERATION,n.ACCELERATION,this._callback)};i.extend(c,cc.EventListener),i.mixin(c.prototype,{constructor:c,_onAccelerationEvent:null,_callback:function(t){this._onAccelerationEvent(t.acc,t)},checkAvailable:function(){return cc.assertID(this._onAccelerationEvent,1803),!0},clone:function(){return new c(this._onAccelerationEvent)}});var l=function(){cc.EventListener.call(this,cc.EventListener.KEYBOARD,n.KEYBOARD,this._callback)};i.extend(l,cc.EventListener),i.mixin(l.prototype,{constructor:l,onKeyPressed:null,onKeyReleased:null,_callback:function(t){t.isPressed?this.onKeyPressed&&this.onKeyPressed(t.keyCode,t):this.onKeyReleased&&this.onKeyReleased(t.keyCode,t)},clone:function(){var t=new l;return t.onKeyPressed=this.onKeyPressed,t.onKeyReleased=this.onKeyReleased,t},checkAvailable:function(){return null!==this.onKeyPressed||null!==this.onKeyReleased||(cc.logID(1800),!1)}}),cc.EventListener.create=function(t){cc.assertID(t&&t.event,1900);var e=t.event;delete t.event;var i=null;for(var n in e===cc.EventListener.TOUCH_ONE_BY_ONE?i=new a:e===cc.EventListener.TOUCH_ALL_AT_ONCE?i=new o:e===cc.EventListener.MOUSE?i=new s:e===cc.EventListener.CUSTOM?(i=new r(t.eventName,t.callback),delete t.eventName,delete t.callback):e===cc.EventListener.KEYBOARD?i=new l:e===cc.EventListener.ACCELERATION&&(i=new c(t.callback),delete t.callback),t)i[n]=t[n];return i},e.exports=cc.EventListener}),{"../platform/js":171}],124:[(function(t,e){"use strict";var i=t("../platform/js");t("./CCEventListener");var n=cc.EventListener.ListenerID,r=function(){this._fixedListeners=[],this._sceneGraphListeners=[],this.gt0Index=0};r.prototype={constructor:r,size:function(){return this._fixedListeners.length+this._sceneGraphListeners.length},empty:function(){return 0===this._fixedListeners.length&&0===this._sceneGraphListeners.length},push:function(t){0===t._getFixedPriority()?this._sceneGraphListeners.push(t):this._fixedListeners.push(t)},clearSceneGraphListeners:function(){this._sceneGraphListeners.length=0},clearFixedListeners:function(){this._fixedListeners.length=0},clear:function(){this._sceneGraphListeners.length=0,this._fixedListeners.length=0},getFixedPriorityListeners:function(){return this._fixedListeners},getSceneGraphPriorityListeners:function(){return this._sceneGraphListeners}};var s=function(t){var e=cc.Event,i=t.type;return i===e.ACCELERATION?n.ACCELERATION:i===e.KEYBOARD?n.KEYBOARD:i.startsWith(e.MOUSE)?n.MOUSE:(i.startsWith(e.TOUCH)&&cc.logID(2e3),"")},a={DIRTY_NONE:0,DIRTY_FIXED_PRIORITY:1,DIRTY_SCENE_GRAPH_PRIORITY:2,DIRTY_ALL:3,_listenersMap:{},_priorityDirtyFlagMap:{},_nodeListenersMap:{},_toAddedListeners:[],_toRemovedListeners:[],_dirtyListeners:{},_inDispatch:0,_isEnabled:!1,_currentTouch:null,_currentTouchListener:null,_internalCustomListenerIDs:[],_setDirtyForNode:function(t){var e=this._nodeListenersMap[t._id];if(void 0!==e)for(var i=0,n=e.length;i0)for(var s=t._children,a=0,o=s.length;a=0;i--)(e=t[i])._setRegistered(!1),null!=e._getSceneGraphPriority()&&(this._dissociateNodeAndEventListener(e._getSceneGraphPriority(),e),e._setSceneGraphPriority(null)),0===this._inDispatch&&cc.js.array.removeAt(t,i)},_removeListenersForListenerID:function(t){var e,i=this._listenersMap[t];if(i){var n=i.getFixedPriorityListeners(),r=i.getSceneGraphPriorityListeners();this._removeAllListenersInVector(r),this._removeAllListenersInVector(n),delete this._priorityDirtyFlagMap[t],this._inDispatch||(i.clear(),delete this._listenersMap[t])}var s,a=this._toAddedListeners;for(e=a.length-1;e>=0;e--)(s=a[e])&&s._getListenerID()===t&&cc.js.array.removeAt(a,e)},_sortEventListeners:function(t){var e=this.DIRTY_NONE,i=this._priorityDirtyFlagMap;i[t]&&(e=i[t]),e!==this.DIRTY_NONE&&(i[t]=this.DIRTY_NONE,e&this.DIRTY_FIXED_PRIORITY&&this._sortListenersOfFixedPriority(t),e&this.DIRTY_SCENE_GRAPH_PRIORITY&&cc.director.getScene()&&this._sortListenersOfSceneGraphPriority(t))},_sortListenersOfSceneGraphPriority:function(t){var e=this._getListeners(t);if(e){var i=e.getSceneGraphPriorityListeners();i&&0!==i.length&&e.getSceneGraphPriorityListeners().sort(this._sortEventListenersOfSceneGraphPriorityDes)}},_sortEventListenersOfSceneGraphPriorityDes:function(t,e){var i=t._getSceneGraphPriority(),n=e._getSceneGraphPriority();if(!(e&&n&&n._activeInHierarchy&&null!==n._parent))return-1;if(!t||!i||!i._activeInHierarchy||null===i._parent)return 1;for(var r=i,s=n,a=!1;r._parent._id!==s._parent._id;)r=null===r._parent._parent?(a=!0)&&n:r._parent,s=null===s._parent._parent?(a=!0)&&i:s._parent;if(r._id===s._id){if(r._id===n._id)return-1;if(r._id===i._id)return 1}return a?r._localZOrder-s._localZOrder:s._localZOrder-r._localZOrder},_sortListenersOfFixedPriority:function(t){var e=this._listenersMap[t];if(e){var i=e.getFixedPriorityListeners();if(i&&0!==i.length){i.sort(this._sortListenersOfFixedPriorityAsc);for(var n=0,r=i.length;n=0);)++n;e.gt0Index=n}}},_sortListenersOfFixedPriorityAsc:function(t,e){return t._getFixedPriority()-e._getFixedPriority()},_onUpdateListeners:function(t){var e,i,n,r=t.getFixedPriorityListeners(),s=t.getSceneGraphPriorityListeners(),a=this._toRemovedListeners;if(s)for(e=s.length-1;e>=0;e--)(i=s[e])._isRegistered()||(cc.js.array.removeAt(s,e),-1!==(n=a.indexOf(i))&&a.splice(n,1));if(r)for(e=r.length-1;e>=0;e--)(i=r[e])._isRegistered()||(cc.js.array.removeAt(r,e),-1!==(n=a.indexOf(i))&&a.splice(n,1));s&&0===s.length&&t.clearSceneGraphListeners(),r&&0===r.length&&t.clearFixedListeners()},frameUpdateListeners:function(){var t=this._listenersMap,e=this._priorityDirtyFlagMap;for(var i in t)t[i].empty()&&(delete e[i],delete t[i]);var n=this._toAddedListeners;if(0!==n.length){for(var r=0,s=n.length;r0,3508),!(t>1)){var e;(e=this._listenersMap[n.TOUCH_ONE_BY_ONE])&&this._onUpdateListeners(e),(e=this._listenersMap[n.TOUCH_ALL_AT_ONCE])&&this._onUpdateListeners(e),cc.assertID(1===t,3509);var i=this._toAddedListeners;if(0!==i.length){for(var r=0,s=i.length;r0&&-1!==(r=t._claimedTouches.indexOf(n))){if(s=!0,!cc.macro.ENABLE_MULTI_TOUCH&&a._currentTouch&&a._currentTouch!==n)return!1;o===c.MOVED&&t.onTouchMoved?t.onTouchMoved(n,i):o===c.ENDED?(t.onTouchEnded&&t.onTouchEnded(n,i),t._registered&&t._claimedTouches.splice(r,1),a._clearCurTouch()):o===c.CANCELED&&(t.onTouchCancelled&&t.onTouchCancelled(n,i),t._registered&&t._claimedTouches.splice(r,1),a._clearCurTouch())}return i.isStopped()?(a._updateTouchListeners(i),!0):!(!s||!t.swallowTouches||(e.needsMutableSet&&e.touches.splice(n,1),0))},_dispatchTouchEvent:function(t){this._sortEventListeners(n.TOUCH_ONE_BY_ONE),this._sortEventListeners(n.TOUCH_ALL_AT_ONCE);var e=this._getListeners(n.TOUCH_ONE_BY_ONE),i=this._getListeners(n.TOUCH_ALL_AT_ONCE);if(null!==e||null!==i){var r=t.getTouches(),s=cc.js.array.copy(r),a={event:t,needsMutableSet:e&&i,touches:s,selTouch:null};if(e)for(var o=0;o0&&(this._dispatchEventToListeners(i,this._onTouchesEventCallback,{event:t,touches:s}),t.isStopped())||this._updateTouchListeners(t)}},_onTouchesEventCallback:function(t,e){if(!t._registered)return!1;var i=cc.Event.EventTouch,n=e.event,r=e.touches,s=n.getEventCode();return n.currentTarget=t._node,s===i.BEGAN&&t.onTouchesBegan?t.onTouchesBegan(r,n):s===i.MOVED&&t.onTouchesMoved?t.onTouchesMoved(r,n):s===i.ENDED&&t.onTouchesEnded?t.onTouchesEnded(r,n):s===i.CANCELED&&t.onTouchesCancelled&&t.onTouchesCancelled(r,n),!!n.isStopped()&&(a._updateTouchListeners(n),!0)},_associateNodeAndEventListener:function(t,e){var i=this._nodeListenersMap[t._id];i||(i=[],this._nodeListenersMap[t._id]=i),i.push(e)},_dissociateNodeAndEventListener:function(t,e){var i=this._nodeListenersMap[t._id];i&&(cc.js.array.remove(i,e),0===i.length&&delete this._nodeListenersMap[t._id])},_dispatchEventToListeners:function(t,e,i){var n,r,s=!1,a=t.getFixedPriorityListeners(),o=t.getSceneGraphPriorityListeners(),c=0;if(a&&0!==a.length)for(;c=0;c--){var l=o[c];if(l===t){cc.js.array.removeAt(o,c),l._setRegistered(!1);break}}this._currentTouchListener===t&&this._clearCurTouch()}},_clearCurTouch:function(){this._currentTouchListener=null,this._currentTouch=null},_removeListenerInCallback:function(t,e){if(null==t)return!1;for(var i=t.length-1;i>=0;i--){var n=t[i];if(n._onCustomEvent===e||n._onEvent===e)return n._setRegistered(!1),null!=n._getSceneGraphPriority()&&(this._dissociateNodeAndEventListener(n._getSceneGraphPriority(),n),n._setSceneGraphPriority(null)),0===this._inDispatch?cc.js.array.removeAt(t,i):this._toRemovedListeners.push(n),!0}return!1},_removeListenerInVector:function(t,e){if(null==t)return!1;for(var i=t.length-1;i>=0;i--){var n=t[i];if(n===e)return n._setRegistered(!1),null!=n._getSceneGraphPriority()&&(this._dissociateNodeAndEventListener(n._getSceneGraphPriority(),n),n._setSceneGraphPriority(null)),0===this._inDispatch?cc.js.array.removeAt(t,i):this._toRemovedListeners.push(n),!0}return!1},removeListeners:function(t,e){var i=this;if(cc.js.isNumber(t)||t instanceof cc._BaseNode)if(void 0!==t._id){var r,s=i._nodeListenersMap[t._id];if(s){var a=cc.js.array.copy(s);for(r=0;r=0;i--){var n=e[i];n&&this.off(t,n.callback,n.target)}},cc.EventTarget=e.exports=s}),{"../platform/callbacks-invoker":163,"../platform/js":171}],129:[(function(t,e){"use strict";var i=t("../platform/js");cc.Event=function(t,e){this.type=t,this.bubbles=!!e,this.target=null,this.currentTarget=null,this.eventPhase=0,this._propagationStopped=!1,this._propagationImmediateStopped=!1},cc.Event.prototype={constructor:cc.Event,unuse:function(){this.type=cc.Event.NO_TYPE,this.target=null,this.currentTarget=null,this.eventPhase=cc.Event.NONE,this._propagationStopped=!1,this._propagationImmediateStopped=!1},reuse:function(t,e){this.type=t,this.bubbles=e||!1},stopPropagation:function(){this._propagationStopped=!0},stopPropagationImmediate:function(){this._propagationImmediateStopped=!0},isStopped:function(){return this._propagationStopped||this._propagationImmediateStopped},getCurrentTarget:function(){return this.currentTarget},getType:function(){return this.type}},cc.Event.NO_TYPE="no_type",cc.Event.TOUCH="touch",cc.Event.MOUSE="mouse",cc.Event.KEYBOARD="keyboard",cc.Event.ACCELERATION="acceleration",cc.Event.NONE=0,cc.Event.CAPTURING_PHASE=1,cc.Event.AT_TARGET=2,cc.Event.BUBBLING_PHASE=3;var n=function(t,e){cc.Event.call(this,t,e),this.detail=null};i.extend(n,cc.Event),n.prototype.reset=n,n.prototype.setUserData=function(t){this.detail=t},n.prototype.getUserData=function(){return this.detail},n.prototype.getEventName=cc.Event.prototype.getType;var r=new i.Pool(10);n.put=function(t){r.put(t)},n.get=function(t,e){var i=r._get();return i?i.reset(t,e):i=new n(t,e),i},cc.Event.EventCustom=n,e.exports=cc.Event}),{"../platform/js":171}],130:[(function(t){"use strict";t("./event"),t("./event-listeners"),t("./event-target"),t("./system-event")}),{"./event":129,"./event-listeners":127,"./event-target":128,"./system-event":131}],131:[(function(t,e){"use strict";var i=t("../event/event-target"),n=t("../event-manager"),r=t("../platform/CCInputManager"),s=cc.Enum({KEY_DOWN:"keydown",KEY_UP:"keyup",DEVICEMOTION:"devicemotion"}),a=null,o=null,c=cc.Class({name:"SystemEvent",extends:i,statics:{EventType:s},setAccelerometerEnabled:function(t){t&&window.DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission?DeviceMotionEvent.requestPermission().then((function(t){console.log("Device Motion Event request permission: "+t),r.setAccelerometerEnabled("granted"===t)})):r.setAccelerometerEnabled(t)},setAccelerometerInterval:function(t){r.setAccelerometerInterval(t)},on:function(t,e,i,r){this._super(t,e,i,r),t!==s.KEY_DOWN&&t!==s.KEY_UP||(a||(a=cc.EventListener.create({event:cc.EventListener.KEYBOARD,onKeyPressed:function(t,e){e.type=s.KEY_DOWN,cc.systemEvent.dispatchEvent(e)},onKeyReleased:function(t,e){e.type=s.KEY_UP,cc.systemEvent.dispatchEvent(e)}})),n.hasEventListener(cc.EventListener.ListenerID.KEYBOARD)||n.addListener(a,1)),t===s.DEVICEMOTION&&(o||(o=cc.EventListener.create({event:cc.EventListener.ACCELERATION,callback:function(t,e){e.type=s.DEVICEMOTION,cc.systemEvent.dispatchEvent(e)}})),n.hasEventListener(cc.EventListener.ListenerID.ACCELERATION)||n.addListener(o,1))},off:function(t,e,i){if(this._super(t,e,i),a&&(t===s.KEY_DOWN||t===s.KEY_UP)){var r=this.hasEventListener(s.KEY_DOWN),c=this.hasEventListener(s.KEY_UP);r||c||n.removeListener(a)}o&&t===s.DEVICEMOTION&&n.removeListener(o)}});cc.SystemEvent=e.exports=c,cc.systemEvent=new cc.SystemEvent}),{"../event-manager":126,"../event/event-target":128,"../platform/CCInputManager":154}],132:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("../value-types/vec3")),r=a(t("../value-types/mat3")),s=a(t("./enums"));function a(t){return t&&t.__esModule?t:{default:t}}var o=new n.default,c=new n.default,l=new r.default,h=function(t,e,i){var r=l.m,s=i.m;r[0]=Math.abs(s[0]),r[1]=Math.abs(s[1]),r[2]=Math.abs(s[2]),r[3]=Math.abs(s[4]),r[4]=Math.abs(s[5]),r[5]=Math.abs(s[6]),r[6]=Math.abs(s[8]),r[7]=Math.abs(s[9]),r[8]=Math.abs(s[10]),n.default.transformMat3(t,e,l)},u=(function(){function t(t,e,i,r,a,o){this.center=void 0,this.halfExtents=void 0,this._type=void 0,this._type=s.default.SHAPE_AABB,this.center=new n.default(t,e,i),this.halfExtents=new n.default(r,a,o)}t.create=function(e,i,n,r,s,a){return new t(e,i,n,r,s,a)},t.clone=function(e){return new t(e.center.x,e.center.y,e.center.z,e.halfExtents.x,e.halfExtents.y,e.halfExtents.z)},t.copy=function(t,e){return n.default.copy(t.center,e.center),n.default.copy(t.halfExtents,e.halfExtents),t},t.fromPoints=function(t,e,i){return n.default.scale(t.center,n.default.add(o,e,i),.5),n.default.scale(t.halfExtents,n.default.sub(c,i,e),.5),t},t.set=function(t,e,i,r,s,a,o){return n.default.set(t.center,e,i,r),n.default.set(t.halfExtents,s,a,o),t};var e=t.prototype;return e.getBoundary=function(t,e){n.default.sub(t,this.center,this.halfExtents),n.default.add(e,this.center,this.halfExtents)},e.transform=function(t,e,i,r,s){s||(s=this),n.default.transformMat4(s.center,this.center,t),h(s.halfExtents,this.halfExtents,t)},t})();i.default=u,e.exports=i.default}),{"../value-types/mat3":237,"../value-types/vec3":246,"./enums":134}],133:[(function(t,e,i){"use strict";i.__esModule=!0,i.point_plane=f,i.pt_point_plane=function(t,e,i){var r=f(e,i);return n.Vec3.subtract(t,e,n.Vec3.multiplyScalar(t,i.n,r))},i.pt_point_aabb=function(t,e,i){return n.Vec3.copy(t,e),n.Vec3.subtract(c,i.center,i.halfExtents),n.Vec3.add(l,i.center,i.halfExtents),t.x=t.xl.x?l.x:t.x,t.y=t.y>l.x?l.y:t.y,t.z=t.z>l.x?l.z:t.z,t},i.pt_point_obb=function(t,e,i){var c=i.orientation.m;n.Vec3.set(r,c[0],c[1],c[2]),n.Vec3.set(s,c[3],c[4],c[5]),n.Vec3.set(a,c[6],c[7],c[8]),h[0]=r,h[1]=s,h[2]=a,u[0]=i.halfExtents.x,u[1]=i.halfExtents.y,u[2]=i.halfExtents.z,n.Vec3.subtract(o,e,i.center),n.Vec3.set(t,i.center.x,i.center.y,i.center.z);for(var l=0;l<3;l++){var f=n.Vec3.dot(o,h[l]);f>u[l]&&(f=u[l]),f<-u[l]&&(f=-u[l]),t.x+=f*h[l].x,t.y+=f*h[l].y,t.z+=f*h[l].z}return t};var n=t("../value-types"),r=new n.Vec3,s=new n.Vec3,a=new n.Vec3,o=new n.Vec3,c=new n.Vec3,l=new n.Vec3,h=new Array(3),u=new Array(3);function f(t,e){return n.Vec3.dot(e.n,t)-e.d}}),{"../value-types":236}],134:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0,i.default={SHAPE_RAY:1,SHAPE_LINE:2,SHAPE_SPHERE:4,SHAPE_AABB:8,SHAPE_OBB:16,SHAPE_PLANE:32,SHAPE_TRIANGLE:64,SHAPE_FRUSTUM:128,SHAPE_FRUSTUM_ACCURATE:256},e.exports=i.default}),{}],135:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("../value-types"),r=a(t("./enums")),s=a(t("./plane"));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i0&&d=0;r--)t(n[r],i);i(e)}function e(t,e){return t.distance-e.distance}function i(t,e,i){var n=i.m,r=e.x,s=e.y,a=e.z,o=n[3]*r+n[7]*s+n[11]*a;return o=o?1/o:1,t.x=(n[0]*r+n[4]*s+n[8]*a)*o,t.y=(n[1]*r+n[5]*s+n[9]*a)*o,t.z=(n[2]*r+n[6]*s+n[10]*a)*o,t}var n=new r.default(function(){return{distance:0,node:null}},1),o=[],c=a.default.create(),h=new s.Vec3,u=new s.Vec3,f=new l.default,d=cc.mat4(),_=cc.mat4(),p=new s.Vec3;function v(t){return t>0&&t<1/0}return function(r,l,g,m){return n.reset(),o.length=0,t(r=r||cc.director.getScene(),(function(t){if(!m||m(t)){s.Mat4.invert(_,t.getWorldMatrix(d)),s.Vec3.transformMat4(f.o,l.o,_),s.Vec3.normalize(f.d,i(f.d,l.d,_));var e=1/0,r=t._renderComponent;if(r instanceof cc.MeshRenderer?e=B(f,r._boundingBox):t.width&&t.height&&(s.Vec3.set(h,-t.width*t.anchorX,-t.height*t.anchorY,t.z),s.Vec3.set(u,t.width*(1-t.anchorX),t.height*(1-t.anchorY),t.z),a.default.fromPoints(c,h,u),e=B(f,c)),v(e)&&(g&&(e=g(f,t,e)),v(e))){s.Vec3.scale(p,f.d,e),i(p,p,d);var y=n.add();y.node=t,y.distance=s.Vec3.mag(p),o.push(y)}}})),o.sort(e),o}})(),I=(d=new s.Vec3(0,0,0),function(t,e){var i=s.Vec3.dot(t.d,e.n);if(Math.abs(i)1?0:i}),P=(function(){var t=new s.Vec3(0,0,0),e=new s.Vec3(0,0,0),i=new s.Vec3(0,0,0),n=new s.Vec3(0,0,0),r=new s.Vec3(0,0,0);return function(a,o,c){s.Vec3.subtract(t,o.b,o.a),s.Vec3.subtract(e,o.c,o.a),s.Vec3.cross(i,a.d,e);var l=s.Vec3.dot(t,i);if(l-Number.EPSILON))return 0;var h=1/l;s.Vec3.subtract(n,a.o,o.a);var u=s.Vec3.dot(n,i)*h;if(u<0||u>1)return 0;s.Vec3.cross(r,n,t);var f=s.Vec3.dot(a.d,r)*h;if(f<0||u+f>1)return 0;var d=s.Vec3.dot(e,r)*h;return d<0?0:d}})(),O=P,L=(function(){var t=new s.Vec3(0,0,0),e=new s.Vec3(0,0,0),i=new s.Vec3(0,0,0),n=new s.Vec3(0,0,0),r=new s.Vec3(0,0,0),a=new s.Vec3(0,0,0);return function(o,c,l){s.Vec3.subtract(t,c.b,c.a),s.Vec3.subtract(e,c.c,c.a),s.Vec3.subtract(i,o.s,o.e),s.Vec3.cross(r,t,e);var h=s.Vec3.dot(i,r);if(h<=0)return 0;s.Vec3.subtract(n,o.s,c.a);var u=s.Vec3.dot(n,r);if(u<0||u>h)return 0;s.Vec3.cross(a,i,n);var f=s.Vec3.dot(e,a);if(f<0||f>h)return 0;var d=-s.Vec3.dot(t,a);if(d<0||f+d>h)return 0;if(l){var _=1/h,p=1-(f*=_)-(d*=_);s.Vec3.set(l,c.a.x*p+c.b.x*f+c.c.x*d,c.a.y*p+c.b.y*f+c.c.y*d,c.a.z*p+c.b.z*f+c.c.z*d)}return 1}})(),N=(p=new s.Vec3(0,0,0),v=new s.Vec3(0,0,0),g=new s.Vec3(0,0,0),m=new s.Vec3(0,0,0),y=new s.Vec3(0,0,0),E=new s.Vec3(0,0,0),T=new s.Vec3(0,0,0),function(t,e,i,n,r,a,o){s.Vec3.subtract(p,e,t),s.Vec3.subtract(v,i,t),s.Vec3.subtract(g,n,t),s.Vec3.subtract(m,r,t),s.Vec3.cross(E,m,p);var c=s.Vec3.dot(v,E);if(c>=0){var l=-s.Vec3.dot(g,E);if(l<0)return 0;var h=s.Vec3.dot(s.Vec3.cross(T,p,g),v);if(h<0)return 0;if(o){var u=1/(l+c+h);l*=u,c*=u,h*=u,s.Vec3.set(o,i.x*l+n.x*c+r.x*h,i.y*l+n.y*c+r.y*h,i.z*l+n.z*c+r.z*h)}}else{s.Vec3.subtract(y,a,t);var f=s.Vec3.dot(y,E);if(f<0)return 0;var d=s.Vec3.dot(s.Vec3.cross(T,p,v),y);if(d<0)return 0;if(o){var _=1/(f+(c=-c)+d);f*=_,c*=_,d*=_,s.Vec3.set(o,i.x*f+a.x*c+r.x*d,i.y*f+a.y*c+r.y*d,i.z*f+a.z*c+r.z*d)}}return 1}),F=(function(){var t=new s.Vec3(0,0,0);return function(e,i){var n=i.radius,r=i.center,a=e.o,o=e.d,c=n*n;s.Vec3.subtract(t,r,a);var l=t.lengthSqr(),h=s.Vec3.dot(t,o),u=c-(l-h*h);if(u<0)return 0;var f=Math.sqrt(u),d=lp?0:_}),V=B,k=(function(){var t=new s.Vec3,e=new s.Vec3,i=new s.Vec3,n=new s.Vec3,r=new s.Vec3,a=new s.Vec3,o=new s.Vec3,c=new Array(3),l=new Array(3),h=new Array(3),u=new Array(6);return function(f,d){c[0]=d.halfExtents.x,c[1]=d.halfExtents.y,c[2]=d.halfExtents.z,t=d.center,e=f.o,i=f.d;var _=d.orientation.m;s.Vec3.set(n,_[0],_[1],_[2]),s.Vec3.set(r,_[3],_[4],_[5]),s.Vec3.set(a,_[6],_[7],_[8]),s.Vec3.subtract(o,t,e),l[0]=s.Vec3.dot(n,i),l[1]=s.Vec3.dot(r,i),l[2]=s.Vec3.dot(a,i),h[0]=s.Vec3.dot(n,o),h[1]=s.Vec3.dot(r,o),h[2]=s.Vec3.dot(a,o);for(var p=0;p<3;++p){if(0===l[p]){if(-h[p]-c[p]>0||-h[p]+c[p]<0)return 0;l[p]=1e-7}u[2*p+0]=(h[p]+c[p])/l[p],u[2*p+1]=(h[p]-c[p])/l[p]}var v=Math.max(Math.max(Math.min(u[0],u[1]),Math.min(u[2],u[3])),Math.min(u[4],u[5])),g=Math.min(Math.min(Math.max(u[0],u[1]),Math.max(u[2],u[3])),Math.max(u[4],u[5]));return g<0||v>g||v<0?0:v}})(),U=(C=new s.Vec3,b=new s.Vec3,S=new s.Vec3,w=new s.Vec3,function(t,e){return s.Vec3.subtract(C,t.center,t.halfExtents),s.Vec3.add(b,t.center,t.halfExtents),s.Vec3.subtract(S,e.center,e.halfExtents),s.Vec3.add(w,e.center,e.halfExtents),C.x<=w.x&&b.x>=S.x&&C.y<=w.y&&b.y>=S.y&&C.z<=w.z&&b.z>=S.z});function z(t,e,i){s.Vec3.set(i[0],t.x,e.y,e.z),s.Vec3.set(i[1],t.x,e.y,t.z),s.Vec3.set(i[2],t.x,t.y,e.z),s.Vec3.set(i[3],t.x,t.y,t.z),s.Vec3.set(i[4],e.x,e.y,e.z),s.Vec3.set(i[5],e.x,e.y,t.z),s.Vec3.set(i[6],e.x,t.y,e.z),s.Vec3.set(i[7],e.x,t.y,t.z)}function W(t,e,i,n,r,a){s.Vec3.set(a[0],t.x+i.x*e.x+n.x*e.y+r.x*e.z,t.y+i.y*e.x+n.y*e.y+r.y*e.z,t.z+i.z*e.x+n.z*e.y+r.z*e.z),s.Vec3.set(a[1],t.x-i.x*e.x+n.x*e.y+r.x*e.z,t.y-i.y*e.x+n.y*e.y+r.y*e.z,t.z-i.z*e.x+n.z*e.y+r.z*e.z),s.Vec3.set(a[2],t.x+i.x*e.x-n.x*e.y+r.x*e.z,t.y+i.y*e.x-n.y*e.y+r.y*e.z,t.z+i.z*e.x-n.z*e.y+r.z*e.z),s.Vec3.set(a[3],t.x+i.x*e.x+n.x*e.y-r.x*e.z,t.y+i.y*e.x+n.y*e.y-r.y*e.z,t.z+i.z*e.x+n.z*e.y-r.z*e.z),s.Vec3.set(a[4],t.x-i.x*e.x-n.x*e.y-r.x*e.z,t.y-i.y*e.x-n.y*e.y-r.y*e.z,t.z-i.z*e.x-n.z*e.y-r.z*e.z),s.Vec3.set(a[5],t.x+i.x*e.x-n.x*e.y-r.x*e.z,t.y+i.y*e.x-n.y*e.y-r.y*e.z,t.z+i.z*e.x-n.z*e.y-r.z*e.z),s.Vec3.set(a[6],t.x-i.x*e.x+n.x*e.y-r.x*e.z,t.y-i.y*e.x+n.y*e.y-r.y*e.z,t.z-i.z*e.x+n.z*e.y-r.z*e.z),s.Vec3.set(a[7],t.x-i.x*e.x-n.x*e.y+r.x*e.z,t.y-i.y*e.x-n.y*e.y+r.y*e.z,t.z-i.z*e.x-n.z*e.y+r.z*e.z)}function H(t,e){for(var i=s.Vec3.dot(e,t[0]),n=i,r=1;r<8;++r){var a=s.Vec3.dot(e,t[r]);i=an?a:n}return[i,n]}var G,Y=(function(){for(var t=new Array(15),e=0;e<15;e++)t[e]=new s.Vec3(0,0,0);for(var i=new Array(8),n=new Array(8),r=0;r<8;r++)i[r]=new s.Vec3(0,0,0),n[r]=new s.Vec3(0,0,0);var a=new s.Vec3,o=new s.Vec3;return function(e,r){var c=r.orientation.m;s.Vec3.set(t[0],1,0,0),s.Vec3.set(t[1],0,1,0),s.Vec3.set(t[2],0,0,1),s.Vec3.set(t[3],c[0],c[1],c[2]),s.Vec3.set(t[4],c[3],c[4],c[5]),s.Vec3.set(t[5],c[6],c[7],c[8]);for(var l=0;l<3;++l)s.Vec3.cross(t[6+3*l],t[l],t[0]),s.Vec3.cross(t[7+3*l],t[l],t[1]),s.Vec3.cross(t[7+3*l],t[l],t[2]);s.Vec3.subtract(a,e.center,e.halfExtents),s.Vec3.add(o,e.center,e.halfExtents),z(a,o,i),W(r.center,r.halfExtents,t[3],t[4],t[5],n);for(var h=0;h<15;++h){var u=H(i,t[h]),f=H(n,t[h]);if(f[0]>u[1]||u[0]>f[1])return 0}return 1}})(),X=function(t,e){var i=t.halfExtents.x*Math.abs(e.n.x)+t.halfExtents.y*Math.abs(e.n.y)+t.halfExtents.z*Math.abs(e.n.z),n=s.Vec3.dot(e.n,t.center);return n+ie.d?0:1},j=function(t,e){for(var i=0;in.halfExtents.x?e++:t[h].x<-n.halfExtents.x&&i++;if(e===r.vertices.length||i===r.vertices.length)return 0;e=0,i=0;for(var u=0;un.halfExtents.y?e++:t[u].y<-n.halfExtents.y&&i++;if(e===r.vertices.length||i===r.vertices.length)return 0;e=0,i=0;for(var f=0;fn.halfExtents.z?e++:t[f].z<-n.halfExtents.z&&i++;return e===r.vertices.length||i===r.vertices.length?0:1}})(),Z=(function(){var t=new s.Vec3(0,0,0),e=new s.Mat3;return function(i,n){return s.Vec3.subtract(t,n,i.center),s.Vec3.transformMat3(t,t,s.Mat3.transpose(e,i.orientation)),r=t,a=i.halfExtents,Math.abs(r.x)e.d?0:1}),Q=function(t,e){for(var i=0;ir.halfExtents.x?i++:e<-r.halfExtents.x&&n++;if(i===o.vertices.length||n===o.vertices.length)return 0;i=0,n=0;for(var _=0;_r.halfExtents.y?i++:e<-r.halfExtents.y&&n++;if(i===o.vertices.length||n===o.vertices.length)return 0;i=0,n=0;for(var p=0;pr.halfExtents.z?i++:e<-r.halfExtents.z&&n++;return i===o.vertices.length||n===o.vertices.length?0:1}})(),$=(function(){for(var t=new Array(15),e=0;e<15;e++)t[e]=new s.Vec3(0,0,0);for(var i=new Array(8),n=new Array(8),r=0;r<8;r++)i[r]=new s.Vec3(0,0,0),n[r]=new s.Vec3(0,0,0);return function(e,r){var a=e.orientation.m,o=r.orientation.m;s.Vec3.set(t[0],a[0],a[1],a[2]),s.Vec3.set(t[1],a[3],a[4],a[5]),s.Vec3.set(t[2],a[6],a[7],a[8]),s.Vec3.set(t[3],o[0],o[1],o[2]),s.Vec3.set(t[4],o[3],o[4],o[5]),s.Vec3.set(t[5],o[6],o[7],o[8]);for(var c=0;c<3;++c)s.Vec3.cross(t[6+3*c],t[c],t[0]),s.Vec3.cross(t[7+3*c],t[c],t[1]),s.Vec3.cross(t[7+3*c],t[c],t[2]);W(e.center,e.halfExtents,t[0],t[1],t[2],i),W(r.center,r.halfExtents,t[3],t[4],t[5],n);for(var l=0;l<15;++l){var h=H(i,t[l]),u=H(n,t[l]);if(u[0]>h[1]||h[0]>u[1])return 0}return 1}})(),tt=function(t,e){var i=s.Vec3.dot(e.n,t.center),n=t.radius*e.n.length();return i+ne.d?0:1},et=function(t,e){for(var i=0;ih)){s.Vec3.add(t,c,s.Vec3.multiplyScalar(t,l,o));for(var f=0;f<6;f++)if(f!==r&&f!==r+e[r]){var d=n.planes[f];if(s.Vec3.dot(d.n,t)0&&(t.d=e.d/i),t},t.prototype.transform=function(t){r.Mat4.invert(c,t),r.Mat4.transpose(c,c),r.Vec4.set(l,this.n.x,this.n.y,this.n.z,this.d),r.Vec4.transformMat4(l,l,c),r.Vec3.set(this.n,l.x,l.y,l.z),this.d=l.w},t})();i.default=h,e.exports=i.default}),{"../value-types":236,"./enums":134}],141:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("../value-types"),s=(n=t("./enums"))&&n.__esModule?n:{default:n},a=(function(){function t(t,e,i,n,a,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=-1),this.o=void 0,this.d=void 0,this._type=void 0,this._type=s.default.SHAPE_RAY,this.o=new r.Vec3(t,e,i),this.d=new r.Vec3(n,a,o)}return t.create=function(e,i,n,r,s,a){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=1),new t(e,i,n,r,s,a)},t.clone=function(e){return new t(e.o.x,e.o.y,e.o.z,e.d.x,e.d.y,e.d.z)},t.copy=function(t,e){return r.Vec3.copy(t.o,e.o),r.Vec3.copy(t.d,e.d),t},t.fromPoints=function(t,e,i){return r.Vec3.copy(t.o,e),r.Vec3.normalize(t.d,r.Vec3.subtract(t.d,i,e)),t},t.set=function(t,e,i,n,r,s,a){return t.o.x=e,t.o.y=i,t.o.z=n,t.d.x=r,t.d.y=s,t.d.z=a,t},t.prototype.computeHit=function(t,e){r.Vec3.normalize(t,this.d),r.Vec3.scaleAndAdd(t,this.o,t,e)},t})();i.default=a,e.exports=i.default}),{"../value-types":236,"./enums":134}],142:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("../value-types"),s=(n=t("./enums"))&&n.__esModule?n:{default:n},a=new r.Vec3,o=(function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),this.center=void 0,this.radius=void 0,this._type=void 0,this._type=s.default.SHAPE_SPHERE,this.center=new r.Vec3(t,e,i),this.radius=n}t.create=function(e,i,n,r){return new t(e,i,n,r)},t.clone=function(e){return new t(e.center.x,e.center.y,e.center.z,e.radius)},t.copy=function(t,e){return r.Vec3.copy(t.center,e.center),t.radius=e.radius,t},t.fromPoints=function(t,e,i){return r.Vec3.multiplyScalar(t.center,r.Vec3.add(a,e,i),.5),t.radius=.5*r.Vec3.subtract(a,i,e).len(),t},t.set=function(t,e,i,n,r){return t.center.x=e,t.center.y=i,t.center.z=n,t.radius=r,t};var e=t.prototype;return e.clone=function(){return t.clone(this)},e.copy=function(e){return t.copy(this,e)},e.getBoundary=function(t,e){r.Vec3.set(t,this.center.x-this.radius,this.center.y-this.radius,this.center.z-this.radius),r.Vec3.set(e,this.center.x+this.radius,this.center.y+this.radius,this.center.z+this.radius)},e.transform=function(t,e,i,n,s){r.Vec3.transformMat4(s.center,this.center,t),s.radius=this.radius*n.maxAxis()},e.translateAndRotate=function(t,e,i){r.Vec3.transformMat4(i.center,this.center,t)},e.setScale=function(t,e){e.radius=this.radius*t.maxAxis()},t})();i.default=o,e.exports=i.default}),{"../value-types":236,"./enums":134}],143:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(t("../value-types/vec3")),r=s(t("./enums"));function s(t){return t&&t.__esModule?t:{default:t}}var a=(function(){function t(t,e,i,s,a,o,c,l,h){this.a=void 0,this.b=void 0,this.c=void 0,this._type=void 0,this.a=new n.default(t,e,i),this.b=new n.default(s,a,o),this.c=new n.default(c,l,h),this._type=r.default.SHAPE_TRIANGLE}return t.create=function(e,i,n,r,s,a,o,c,l){return new t(e,i,n,r,s,a,o,c,l)},t.clone=function(e){return new t(e.a.x,e.a.y,e.a.z,e.b.x,e.b.y,e.b.z,e.c.x,e.c.y,e.c.z)},t.copy=function(t,e){return n.default.copy(t.a,e.a),n.default.copy(t.b,e.b),n.default.copy(t.c,e.c),t},t.fromPoints=function(t,e,i,r){return n.default.copy(t.a,e),n.default.copy(t.b,i),n.default.copy(t.c,r),t},t.set=function(t,e,i,n,r,s,a,o,c,l){return t.a.x=e,t.a.y=i,t.a.z=n,t.b.x=r,t.b.y=s,t.b.z=a,t.c.x=o,t.c.y=c,t.c.z=l,t},t})();i.default=a,e.exports=i.default}),{"../value-types/vec3":246,"./enums":134}],144:[(function(t,e){"use strict";var i=t("../components/CCRenderComponent"),n=t("../assets/material/CCMaterial"),r=t("./types"),s=r.LineCap,a=r.LineJoin,o=cc.Class({name:"cc.Graphics",extends:i,editor:!1,ctor:function(){this._impl=new o._Impl(this)},properties:{_lineWidth:2,_strokeColor:cc.Color.BLACK,_lineJoin:a.MITER,_lineCap:s.BUTT,_fillColor:cc.Color.WHITE,_miterLimit:10,lineWidth:{get:function(){return this._lineWidth},set:function(t){this._lineWidth=t,this._impl.lineWidth=t}},lineJoin:{get:function(){return this._lineJoin},set:function(t){this._lineJoin=t,this._impl.lineJoin=t},type:a},lineCap:{get:function(){return this._lineCap},set:function(t){this._lineCap=t,this._impl.lineCap=t},type:s},strokeColor:{get:function(){return this._strokeColor},set:function(t){this._impl.strokeColor=this._strokeColor=cc.color(t)}},fillColor:{get:function(){return this._fillColor},set:function(t){this._impl.fillColor=this._fillColor=cc.color(t)}},miterLimit:{get:function(){return this._miterLimit},set:function(t){this._miterLimit=t,this._impl.miterLimit=t}}},statics:{LineJoin:a,LineCap:s},onRestore:function(){this._impl||(this._impl=new o._Impl(this))},onDestroy:function(){this.clear(!0),this._super(),this._impl=null},_getDefaultMaterial:function(){return n.getBuiltinMaterial("2d-graphics")},_updateMaterial:function(){var t=this._materials[0];t&&(void 0!==t.getDefine("CC_USE_MODEL")&&t.define("CC_USE_MODEL",!0),void 0!==t.getDefine("CC_SUPPORT_standard_derivatives")&&cc.sys.glExtension("OES_standard_derivatives")&&t.define("CC_SUPPORT_standard_derivatives",!0))},moveTo:function(t,e){this._impl.moveTo(t,e)},lineTo:function(t,e){this._impl.lineTo(t,e)},bezierCurveTo:function(t,e,i,n,r,s){this._impl.bezierCurveTo(t,e,i,n,r,s)},quadraticCurveTo:function(t,e,i,n){this._impl.quadraticCurveTo(t,e,i,n)},arc:function(t,e,i,n,r,s){this._impl.arc(t,e,i,n,r,s)},ellipse:function(t,e,i,n){this._impl.ellipse(t,e,i,n)},circle:function(t,e,i){this._impl.circle(t,e,i)},rect:function(t,e,i,n){this._impl.rect(t,e,i,n)},roundRect:function(t,e,i,n,r){this._impl.roundRect(t,e,i,n,r)},fillRect:function(t,e,i,n){this.rect(t,e,i,n),this.fill()},clear:function(t){this._impl.clear(t),this._assembler&&this._assembler.clear(t)},close:function(){this._impl.close()},stroke:function(){this._assembler||this._resetAssembler(),this._assembler.stroke(this)},fill:function(){this._assembler||this._resetAssembler(),this._assembler.fill(this)}});cc.Graphics=e.exports=o,cc.Graphics.Types=r,cc.Graphics.Helper=t("./helper")}),{"../assets/material/CCMaterial":80,"../components/CCRenderComponent":115,"./helper":145,"./types":147}],145:[(function(t,e){"use strict";var i=t("./types").PointFlags,n=Math.PI,r=Math.min,s=Math.max,a=Math.cos,o=Math.sin,c=Math.abs,l=Math.sign,h=.5522847493;e.exports={arc:function(t,e,i,l,h,u,f){var d,_,p,v=0,g=0,m=0,y=0,E=0,T=0,A=0,x=0,C=0,b=0,S=0,w=0,R=0;if(g=u-h,f=f||!1)if(c(g)>=2*n)g=2*n;else for(;g<0;)g+=2*n;else if(c(g)>=2*n)g=2*-n;else for(;g>0;)g-=2*n;for(p=0|s(1,r(c(g)/(.5*n)+.5,5)),m=c(4/3*(1-a(d=g/p/2))/o(d)),f||(m=-m),_=0;_<=p;_++)T=e+(y=a(v=h+g*(_/p)))*l,A=i+(E=o(v))*l,x=-E*l*m,C=y*l*m,0===_?t.moveTo(T,A):t.bezierCurveTo(b+w,S+R,T-x,A-C,T,A),b=T,S=A,w=x,R=C},ellipse:function(t,e,i,n,r){t.moveTo(e-n,i),t.bezierCurveTo(e-n,i+r*h,e-n*h,i+r,e,i+r),t.bezierCurveTo(e+n*h,i+r,e+n,i+r*h,e+n,i),t.bezierCurveTo(e+n,i-r*h,e+n*h,i-r,e,i-r),t.bezierCurveTo(e-n*h,i-r,e-n,i-r*h,e-n,i),t.close()},roundRect:function(t,e,i,n,s,a){if(a<.1)t.rect(e,i,n,s);else{var o=r(a,.5*c(n))*l(n),u=r(a,.5*c(s))*l(s);t.moveTo(e,i+u),t.lineTo(e,i+s-u),t.bezierCurveTo(e,i+s-u*(1-h),e+o*(1-h),i+s,e+o,i+s),t.lineTo(e+n-o,i+s),t.bezierCurveTo(e+n-o*(1-h),i+s,e+n,i+s-u*(1-h),e+n,i+s-u),t.lineTo(e+n,i+u),t.bezierCurveTo(e+n,i+u*(1-h),e+n-o*(1-h),i,e+n-o,i),t.lineTo(e+o,i),t.bezierCurveTo(e+o*(1-h),i,e,i+u*(1-h),e,i+u),t.close()}},tesselateBezier:function t(e,n,r,s,a,o,l,h,u,f,d){var _,p,v,g,m,y,E,T,A,x,C,b,S,w,R,M;f>10||(m=.5*(o+h),y=.5*(l+u),E=.5*((_=.5*(n+s))+(v=.5*(s+o))),T=.5*((p=.5*(r+a))+(g=.5*(a+l))),((R=c((s-h)*(w=u-r)-(a-u)*(S=h-n)))+(M=c((o-h)*w-(l-u)*S)))*(R+M)0?a:null,!0);var u=o.prototype;if(e&&(h||(i.extend(o,e),u=o.prototype),o.$super=e),n){for(var f=n.length-1;f>=0;f--){var d=n[f];p(u,d.prototype),p(o,d,(function(t){return d.hasOwnProperty(t)&&!0})),R._isCCClass(d)&&p(s.getClassAttrs(o),s.getClassAttrs(d))}u.constructor=o}return h||(u.__initProps__=A),i.setClassName(t,o),o}function g(t,e,n,r){var s=cc.Component,a=cc._RF.peek();if(a&&i.isChildClassOf(e,s)){if(i.isChildClassOf(a.cls,s))return cc.errorID(3615),null;t=t||a.script}var o=v(t,e,n,r);if(a)if(i.isChildClassOf(e,s)){var c=a.uuid;c&&i._setClassId(c,o),a.cls=o}else i.isChildClassOf(a.cls,s)||(a.cls=o);return o}function m(t){for(var e=i.getClassName(t),n=t.constructor,r="new "+e+"(",s=0;s0){var a="].apply(this,arguments);\n";if(1===s)r+="CCClass.__ctors__[0"+a;else{r+="var cs=CCClass.__ctors__;\n";for(var o=0;o=0)){var s=e[r];if("function"==typeof s){var a=i.getPropertyDescriptor(t.prototype,r);if(a){var o=a.value;if("function"==typeof o){b.test(s)&&(n=!0,e[r]=(function(t,e){return function(){var i=this._super;this._super=t;var n=e.apply(this,arguments);return this._super=i,n}})(o,s));continue}}}}return n}function w(t,e,i,n,r,c){if(t.__props__=[],n&&n.__props__&&(t.__props__=n.__props__.slice()),r)for(var l=0;l=0)){var d=t[f];o.validateMethodWithProps(d,f,e,s,n)&&i.value(s.prototype,f,d,!0,!0)}var _=t.editor;return _&&i.isChildClassOf(n,cc.Component)&&cc.Component._registerEditorProps(s,_),s}/xyz/.test((function(){xyz})),R._isCCClass=function(t){return t&&t.hasOwnProperty("__ctors__")},R._fastDefine=function(t,e,n){i.setClassName(t,e);for(var r=e.__props__=e.__values__=Object.keys(n),o=s.getClassAttrs(e),c=0;c=2&&((o||l())[c+"min"]=f[0],o[c+"max"]=f[1],f.length>2&&(o[c+"step"]=f[2])),u("min","number"),u("max","number"),u("step","number")}cc.Class=R,e.exports={isArray:function(t){return t=_(t),Array.isArray(t)},fastDefine:R._fastDefine,getNewValueTypeCode:m,IDENTIFIER_RE:T,escapeForJS:y,getDefault:_}}),{"./CCEnum":152,"./attribute":162,"./js":171,"./preprocess-class":172,"./requiring-frame":173,"./utils":174}],151:[(function(t,e){"use strict";t("./CCClass");var i=t("./preprocess-class"),n=t("./js"),r="__ccclassCache__";function s(t){return t}function a(t,e){return t[e]||(t[e]={})}function o(t){return function(e){return"function"==typeof e?t(e):function(i){return t(i,e)}}}function c(t,e){return function(t){return function(i){return e(i,t)}}}var l=c.bind(null,!1);function h(){return c.bind(null,!1)}var u=h(),f=h();function d(t){return a(t,r)}function _(t){var e;try{e=t()}catch(i){return t}return"object"!=typeof e||null===e?e:t}function p(t){var e;try{e=new t}catch(i){return{}}return e}function v(t,e,r,s,a,o){var c,l=a&&(a.get||a.set);s&&(c=i.getFullFormOfProperty(s,l));var h=e[r],u=n.mixin(h||{},c||s||{});if(l)a.get&&(u.get=a.get),a.set&&(u.set=a.set);else{var f=void 0;if(a)a.initializer&&(f=_(a.initializer));else{var d=o.default||(o.default=p(t));d.hasOwnProperty(r)&&(f=d[r])}u.default=f}e[r]=u}var g=o((function(t,e){var i=n.getSuper(t);i===Object&&(i=null);var s={name:e,extends:i,ctor:t,__ES6__:!0},a=t[r];if(a){var o=a.proto;o&&n.mixin(s,o),t[r]=void 0}return cc.Class(s)}));function m(t,e,i){return t((function(t,n){var r=d(t);if(r){var s=void 0!==i?i:n,o=a(r,"proto");a(o,"editor")[e]=s}}),e)}function y(t){return t(s)}var E=y(o),T=m(l,"requireComponent"),A=y(u),x=m(f,"executionOrder"),C=y(o),b=y(o),S=y(u),w=y(u),R=y(u);cc._decorator=e.exports={ccclass:g,property:function(t,e,i){var n=null;function r(t,e,i){var r=d(t.constructor);if(r){var s=a(r,"proto"),o=a(s,"properties");v(t.constructor,o,e,n,i,r)}}if(void 0===e)return n=t,r;r(t,e,i)},executeInEditMode:E,requireComponent:T,menu:A,executionOrder:x,disallowMultiple:C,playOnFocus:b,inspector:S,icon:w,help:R,mixins:function(){for(var t=[],e=0;es)return this._removeUsedIndexBit(i),delete this._touchesIntegerDict[n.getID()],i;t>>=1}return-1},_removeUsedIndexBit:function(t){if(!(t<0||t>=this._maxTouches)){var e=1<0){this._glView._convertTouchesWithScale(a);var f=new cc.Event.EventTouch(a);f._eventCode=cc.Event.EventTouch.BEGAN,r.dispatchEvent(f)}},handleTouchesMove:function(t){for(var e,i,s,a=[],o=this._touches,c=n.now(),l=0,h=t.length;l0){this._glView._convertTouchesWithScale(a);var u=new cc.Event.EventTouch(a);u._eventCode=cc.Event.EventTouch.MOVED,r.dispatchEvent(u)}},handleTouchesEnd:function(t){var e=this.getSetOfTouchesEndOrCancel(t);if(e.length>0){this._glView._convertTouchesWithScale(e);var i=new cc.Event.EventTouch(e);i._eventCode=cc.Event.EventTouch.ENDED,r.dispatchEvent(i)}this._preTouchPool.length=0},handleTouchesCancel:function(t){var e=this.getSetOfTouchesEndOrCancel(t);if(e.length>0){this._glView._convertTouchesWithScale(e);var i=new cc.Event.EventTouch(e);i._eventCode=cc.Event.EventTouch.CANCELED,r.dispatchEvent(i)}this._preTouchPool.length=0},getSetOfTouchesEndOrCancel:function(t){for(var e,i,n,r=[],s=this._touches,a=this._touchesIntegerDict,o=0,c=t.length;o=0;r--)if(i[r].getID()===n){e=i[r];break}return e||(e=t),e},setPreTouch:function(t){for(var e=!1,i=this._preTouchPool,n=t.getID(),r=i.length-1;r>=0;r--)if(i[r].getID()===n){i[r]=t,e=!0;break}e||(i.length<=50?i.push(t):(i[this._preTouchPoolPointer]=t,this._preTouchPoolPointer=(this._preTouchPoolPointer+1)%50))},getTouchByXY:function(t,e,i){var n=this._preTouchPoint,r=this._glView.convertToLocationInView(t,e,i),s=new cc.Touch(r.x,r.y,0);return s._setPrevPoint(n.x,n.y),n.x=r.x,n.y=r.y,s},getMouseEvent:function(t,e,i){var n=this._prevMousePoint,r=new cc.Event.EventMouse(i);return r._setPrevCursor(n.x,n.y),n.x=t.x,n.y=t.y,this._glView._convertMouseToLocationInView(n,e),r.setLocation(n.x,n.y),r},getPointByEvent:function(t,e){return cc.sys.browserType!==cc.sys.BROWSER_TYPE_QQ&&cc.sys.browserType!==cc.sys.BROWSER_TYPE_UC&&cc.sys.browserType!==cc.sys.BROWSER_TYPE_SAFARI||this._updateCanvasBoundingRect(),null!=t.pageX?{x:t.pageX,y:t.pageY}:(e.left-=document.body.scrollLeft,e.top-=document.body.scrollTop,{x:t.clientX,y:t.clientY})},getTouchesByEvent:function(t,e){for(var i,r,s,o=[],c=this._glView,l=this._preTouchPoint,h=t.changedTouches.length,u=0;uthis._accelInterval&&(this._accelCurTime-=this._accelInterval,r.dispatchEvent(new cc.Event.EventAcceleration(this._acceleration))),this._accelCurTime+=t}};e.exports=cc.internal.inputManager=o}),{"../event-manager":126,"./CCMacro":155,"./CCSys":159}],155:[(function(t,e){"use strict";cc.macro={RAD:Math.PI/180,DEG:180/Math.PI,REPEAT_FOREVER:Number.MAX_VALUE-1,FLT_EPSILON:1.192092896e-7,MIN_ZINDEX:-Math.pow(2,15),MAX_ZINDEX:Math.pow(2,15)-1,ONE:1,ZERO:0,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,DST_ALPHA:772,DST_COLOR:774,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ORIENTATION_PORTRAIT:1,ORIENTATION_LANDSCAPE:2,ORIENTATION_AUTO:3,DENSITYDPI_DEVICE:"device-dpi",DENSITYDPI_HIGH:"high-dpi",DENSITYDPI_MEDIUM:"medium-dpi",DENSITYDPI_LOW:"low-dpi",FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX:!0,DIRECTOR_STATS_POSITION:cc.v2(0,0),ENABLE_STACKABLE_ACTIONS:!0,TOUCH_TIMEOUT:5e3,BATCH_VERTEX_COUNT:2e4,ENABLE_TILEDMAP_CULLING:!0,ENABLE_TRANSPARENT_CANVAS:!1,ENABLE_WEBGL_ANTIALIAS:!1,ENABLE_CULLING:!1,CLEANUP_IMAGE_CACHE:!1,SHOW_MESH_WIREFRAME:!1,SHOW_MESH_NORMAL:!1,ENABLE_MULTI_TOUCH:!0,ALLOW_IMAGE_BITMAP:!cc.sys.isMobile,ENABLE_NATIVE_TTF_RENDERER:!0},Object.defineProperty(cc.macro,"ROTATE_ACTION_CCW",{set:function(t){cc.RotateTo&&cc.RotateBy&&(cc.RotateTo._reverse=cc.RotateBy._reverse=t)}}),cc.macro.SUPPORT_TEXTURE_FORMATS=[".pkm",".pvr",".webp",".jpg",".jpeg",".bmp",".png"],cc.macro.KEY={none:0,back:6,menu:18,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pause:19,capslock:20,escape:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,select:41,insert:45,Delete:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,num0:96,num1:97,num2:98,num3:99,num4:100,num5:101,num6:102,num7:103,num8:104,num9:105,"*":106,"+":107,"-":109,numdel:110,"/":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,numlock:144,scrolllock:145,";":186,semicolon:186,equal:187,"=":187,",":188,comma:188,dash:189,".":190,period:190,forwardslash:191,grave:192,"[":219,openbracket:219,backslash:220,"]":221,closebracket:221,quote:222,dpadLeft:1e3,dpadRight:1001,dpadUp:1003,dpadDown:1004,dpadCenter:1005},cc.macro.ImageFormat=cc.Enum({JPG:0,PNG:1,TIFF:2,WEBP:3,PVR:4,ETC:5,S3TC:6,ATITC:7,TGA:8,RAWDATA:9,UNKNOWN:10}),cc.macro.BlendFactor=cc.Enum({ONE:1,ZERO:0,SRC_ALPHA:770,SRC_COLOR:768,DST_ALPHA:772,DST_COLOR:774,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775}),cc.macro.TextAlignment=cc.Enum({LEFT:0,CENTER:1,RIGHT:2}),cc.macro.VerticalTextAlignment=cc.Enum({TOP:0,CENTER:1,BOTTOM:2}),e.exports=cc.macro}),{}],156:[(function(t,e){"use strict";var i=t("./js"),n=t("./CCClass"),r=1;function s(){this._name="",this._objFlags=0}n.fastDefine("cc.Object",s,{_name:"",_objFlags:0}),i.value(s,"Flags",{Destroyed:r,DontSave:8,EditorOnly:16,Dirty:32,DontDestroy:64,PersistentMask:-4192741,Destroying:128,Deactivating:256,LockedInEditor:512,HideInHierarchy:1024,IsPreloadStarted:8192,IsOnLoadStarted:32768,IsOnLoadCalled:16384,IsOnEnableCalled:2048,IsStartCalled:65536,IsEditorOnEnableCalled:4096,IsPositionLocked:1<<21,IsRotationLocked:1<<17,IsScaleLocked:1<<18,IsAnchorLocked:1<<19,IsSizeLocked:1<<20});var a=[];i.value(s,"_deferredDestroy",(function(){for(var t=a.length,e=0;e0)return void(t.webkitEnterFullscreen&&t.webkitEnterFullscreen());t.setAttribute("x5-video-player-fullscreen","true")}if(this._supportsFullScreen){if(t=t||document.documentElement,e){var n=this._fn.fullscreenchange;this._onfullscreenchange&&document.removeEventListener(n,this._onfullscreenchange),this._onfullscreenchange=e,document.addEventListener(n,e,!1)}if(i){var r=this._fn.fullscreenerror;this._onfullscreenerror&&document.removeEventListener(r,this._onfullscreenerror),this._onfullscreenerror=i,document.addEventListener(r,i,{once:!0})}var s=t[this._fn.requestFullscreen]();void 0===document[this._fn.fullscreenerror]&&window.Promise&&s instanceof Promise&&s.catch((function(){}))}},exitFullScreen:function(t){if(t&&"video"===t.tagName.toLowerCase()){if(cc.sys.os===cc.sys.OS_IOS&&cc.sys.isBrowser)return void(t.webkitExitFullscreen&&t.webkitExitFullscreen());t.setAttribute("x5-video-player-fullscreen","false")}return!this._supportsFullScreen||document[this._fn.exitFullscreen]()},autoFullScreen:function(t,e){t=t||document.body,this._ensureFullScreen(t,e),this.requestFullScreen(t,e)},disableAutoFullScreen:function(t){var e=cc.game.canvas||t,i=this._touchEvent;this._preOnTouch&&(e.removeEventListener(i,this._preOnTouch),this._preOnTouch=null)},_ensureFullScreen:function(t,e){var i=this,n=cc.game.canvas||t,r=this._fn.fullscreenerror,s=this._touchEvent;function a(){i._preOnFullScreenError=null,i._preOnTouch&&n.removeEventListener(s,i._preOnTouch),i._preOnTouch=function(){i._preOnTouch=null,i.requestFullScreen(t,e)},n.addEventListener(s,i._preOnTouch,{once:!0})}this._preOnFullScreenError&&t.removeEventListener(r,this._preOnFullScreenError),this._preOnFullScreenError=a,t.addEventListener(r,a,{once:!0})}},cc.screen.init()}),{}],159:[(function(t,e){"use strict";window._CCSettings&&_CCSettings.platform;var i="undefined"==typeof window?global:window,n=cc&&cc.sys?cc.sys:(function(){cc.sys={};var t,e,n=cc.sys;if(n.LANGUAGE_ENGLISH="en",n.LANGUAGE_CHINESE="zh",n.LANGUAGE_FRENCH="fr",n.LANGUAGE_ITALIAN="it",n.LANGUAGE_GERMAN="de",n.LANGUAGE_SPANISH="es",n.LANGUAGE_DUTCH="du",n.LANGUAGE_RUSSIAN="ru",n.LANGUAGE_KOREAN="ko",n.LANGUAGE_JAPANESE="ja",n.LANGUAGE_HUNGARIAN="hu",n.LANGUAGE_PORTUGUESE="pt",n.LANGUAGE_ARABIC="ar",n.LANGUAGE_NORWEGIAN="no",n.LANGUAGE_POLISH="pl",n.LANGUAGE_TURKISH="tr",n.LANGUAGE_UKRAINIAN="uk",n.LANGUAGE_ROMANIAN="ro",n.LANGUAGE_BULGARIAN="bg",n.LANGUAGE_UNKNOWN="unknown",n.OS_IOS="iOS",n.OS_ANDROID="Android",n.OS_WINDOWS="Windows",n.OS_MARMALADE="Marmalade",n.OS_LINUX="Linux",n.OS_BADA="Bada",n.OS_BLACKBERRY="Blackberry",n.OS_OSX="OS X",n.OS_WP8="WP8",n.OS_WINRT="WINRT",n.OS_UNKNOWN="Unknown",n.UNKNOWN=-1,n.WIN32=0,n.LINUX=1,n.MACOS=2,n.ANDROID=3,n.IPHONE=4,n.IPAD=5,n.BLACKBERRY=6,n.NACL=7,n.EMSCRIPTEN=8,n.TIZEN=9,n.WINRT=10,n.WP8=11,n.MOBILE_BROWSER=100,n.DESKTOP_BROWSER=101,n.EDITOR_PAGE=102,n.EDITOR_CORE=103,n.WECHAT_GAME=104,n.QQ_PLAY=105,n.FB_PLAYABLE_ADS=106,n.BAIDU_GAME=107,n.VIVO_GAME=108,n.OPPO_GAME=109,n.HUAWEI_GAME=110,n.XIAOMI_GAME=111,n.JKW_GAME=112,n.ALIPAY_GAME=113,n.WECHAT_GAME_SUB=114,n.BAIDU_GAME_SUB=115,n.QTT_GAME=116,n.BYTEDANCE_GAME=117,n.BYTEDANCE_GAME_SUB=118,n.LINKSURE=119,n.BROWSER_TYPE_WECHAT="wechat",n.BROWSER_TYPE_ANDROID="androidbrowser",n.BROWSER_TYPE_IE="ie",n.BROWSER_TYPE_EDGE="edge",n.BROWSER_TYPE_QQ="qqbrowser",n.BROWSER_TYPE_MOBILE_QQ="mqqbrowser",n.BROWSER_TYPE_UC="ucbrowser",n.BROWSER_TYPE_UCBS="ucbs",n.BROWSER_TYPE_360="360browser",n.BROWSER_TYPE_BAIDU_APP="baiduboxapp",n.BROWSER_TYPE_BAIDU="baidubrowser",n.BROWSER_TYPE_MAXTHON="maxthon",n.BROWSER_TYPE_OPERA="opera",n.BROWSER_TYPE_OUPENG="oupeng",n.BROWSER_TYPE_MIUI="miuibrowser",n.BROWSER_TYPE_FIREFOX="firefox",n.BROWSER_TYPE_SAFARI="safari",n.BROWSER_TYPE_CHROME="chrome",n.BROWSER_TYPE_LIEBAO="liebao",n.BROWSER_TYPE_QZONE="qzone",n.BROWSER_TYPE_SOUGOU="sogou",n.BROWSER_TYPE_HUAWEI="huawei",n.BROWSER_TYPE_UNKNOWN="unknown",n.isNative=!1,n.isBrowser="object"==typeof window&&"object"==typeof document&&!0,n.glExtension=function(t){return!!cc.renderer.device.ext(t)},n.getMaxJointMatrixSize=function(){if(!n._maxJointMatrixSize){var t=cc.game._renderContext,e=Math.floor(t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS)/4)-10;n._maxJointMatrixSize=e<50?0:50}return n._maxJointMatrixSize},n.getSafeAreaRect=function(){var t=cc.view.getVisibleSize();return cc.rect(0,0,t.width,t.height)},i.__globalAdapter&&i.__globalAdapter.adaptSys)i.__globalAdapter.adaptSys(n);else{var r=window,s=r.navigator,a=document,o=a.documentElement,c=s.userAgent.toLowerCase();n.isMobile=/mobile|android|iphone|ipad/.test(c),"undefined"!=typeof FbPlayableAd?n.platform=n.FB_PLAYABLE_ADS:n.platform=n.isMobile?n.MOBILE_BROWSER:n.DESKTOP_BROWSER;var l=s.language;l=l||s.browserLanguage,n.languageCode=l.toLowerCase(),l=l?l.split("-")[0]:n.LANGUAGE_ENGLISH,n.language=l;var h=!1,u=!1,f="",d=0,_=/android\s*(\d+(?:\.\d+)*)/i.exec(c)||/android\s*(\d+(?:\.\d+)*)/i.exec(s.platform);_&&(h=!0,f=_[1]||"",d=parseInt(f)||0),(_=/(iPad|iPhone|iPod).*OS ((\d+_?){2,3})/i.exec(c))?(u=!0,f=_[2]||"",d=parseInt(f)||0):(/(iPhone|iPad|iPod)/.exec(s.platform)||"MacIntel"===s.platform&&s.maxTouchPoints&&s.maxTouchPoints>1)&&(u=!0,f="",d=0);var p=n.OS_UNKNOWN;-1!==s.appVersion.indexOf("Win")?p=n.OS_WINDOWS:u?p=n.OS_IOS:-1!==s.appVersion.indexOf("Mac")?p=n.OS_OSX:-1!==s.appVersion.indexOf("X11")&&-1===s.appVersion.indexOf("Linux")?p=n.OS_UNIX:h?p=n.OS_ANDROID:-1===s.appVersion.indexOf("Linux")&&-1===c.indexOf("ubuntu")||(p=n.OS_LINUX),n.os=p,n.osVersion=f,n.osMainVersion=d,n.browserType=n.BROWSER_TYPE_UNKNOWN,(function(){var t=/mqqbrowser|micromessenger|qqbrowser|sogou|qzone|liebao|maxthon|ucbs|360 aphone|360browser|baiduboxapp|baidubrowser|maxthon|mxbrowser|miuibrowser/i.exec(c)||/qq|ucbrowser|ubrowser|edge|HuaweiBrowser/i.exec(c)||/chrome|safari|firefox|trident|opera|opr\/|oupeng/i.exec(c),e=t?t[0].toLowerCase():n.BROWSER_TYPE_UNKNOWN;"safari"===e&&h?e=n.BROWSER_TYPE_ANDROID:"qq"===e&&c.match(/android.*applewebkit/i)&&(e=n.BROWSER_TYPE_ANDROID);var i={micromessenger:n.BROWSER_TYPE_WECHAT,trident:n.BROWSER_TYPE_IE,edge:n.BROWSER_TYPE_EDGE,"360 aphone":n.BROWSER_TYPE_360,mxbrowser:n.BROWSER_TYPE_MAXTHON,"opr/":n.BROWSER_TYPE_OPERA,ubrowser:n.BROWSER_TYPE_UC,huaweibrowser:n.BROWSER_TYPE_HUAWEI};n.browserType=i[e]||e})(),n.browserVersion="",(e=c.match(/(mqqbrowser|micromessenger|qqbrowser|sogou|qzone|liebao|maxthon|uc|ucbs|360 aphone|360|baiduboxapp|baidu|maxthon|mxbrowser|miui(?:.hybrid)?)(mobile)?(browser)?\/?([\d.]+)/i))||(e=c.match(/(qq|chrome|safari|firefox|trident|opera|opr\/|oupeng)(mobile)?(browser)?\/?([\d.]+)/i)),n.browserVersion=e?e[4]:"";var v=window.innerWidth||document.documentElement.clientWidth,g=window.innerHeight||document.documentElement.clientHeight,m=window.devicePixelRatio||1;n.windowPixelResolution={width:m*v,height:m*g},n._checkWebGLRenderMode=function(){if(cc.game.renderType!==cc.game.RENDER_TYPE_WEBGL)throw new Error("This feature supports WebGL render mode only.")};var y=document.createElement("canvas");try{var E=n.localStorage=r.localStorage;E.setItem("storage",""),E.removeItem("storage"),E=null}catch(R){var T=function(){cc.warnID(5200)};n.localStorage={getItem:T,setItem:T,removeItem:T,clear:T}}var A=y.toDataURL("image/webp").startsWith("data:image/webp"),x=!!y.getContext("2d"),C=!1;r.WebGLRenderingContext&&(C=!0);var b,S=n.capabilities={canvas:x,opengl:C,webp:A,imageBitmap:!1};"undefined"!=typeof createImageBitmap&&"undefined"!=typeof Blob&&(y.width=y.height=2,createImageBitmap(y,{}).then((function(t){S.imageBitmap=!0,t.close&&t.close()})).catch((function(){}))),(void 0!==o.ontouchstart||void 0!==a.ontouchstart||s.msPointerEnabled)&&(S.touches=!0),void 0!==o.onmouseup&&(S.mouse=!0),void 0!==o.onkeyup&&(S.keyboard=!0),(r.DeviceMotionEvent||r.DeviceOrientationEvent)&&(S.accelerometer=!0),(function(){n.browserVersion;var t=!!(window.AudioContext||window.webkitAudioContext||window.mozAudioContext);b={ONLY_ONE:!1,WEB_AUDIO:t,DELAY_CREATE_CTX:!1},n.os===n.OS_IOS&&(b.USE_LOADER_EVENT="loadedmetadata"),n.browserType===n.BROWSER_TYPE_FIREFOX&&(b.DELAY_CREATE_CTX=!0,b.USE_LOADER_EVENT="canplay"),n.os===n.OS_ANDROID&&n.browserType===n.BROWSER_TYPE_UC&&(b.ONE_SOURCE=!0)})();try{b.WEB_AUDIO&&(b.context=new(window.AudioContext||window.webkitAudioContext||window.mozAudioContext),b.DELAY_CREATE_CTX&&setTimeout((function(){b.context=new(window.AudioContext||window.webkitAudioContext||window.mozAudioContext)}),0))}catch(M){b.WEB_AUDIO=!1,cc.logID(5201)}var w=[];(t=document.createElement("audio")).canPlayType&&(t.canPlayType('audio/ogg; codecs="vorbis"')&&w.push(".ogg"),t.canPlayType("audio/mpeg")&&w.push(".mp3"),t.canPlayType('audio/wav; codecs="1"')&&w.push(".wav"),t.canPlayType("audio/mp4")&&w.push(".mp4"),t.canPlayType("audio/x-m4a")&&w.push(".m4a")),b.format=w,n.__audioSupport=b}return n.NetworkType={NONE:0,LAN:1,WWAN:2},n.getNetworkType=function(){return n.NetworkType.LAN},n.getBatteryLevel=function(){return 1},n.garbageCollect=function(){},n.restartVM=function(){},n.isObjectValid=function(t){return!!t},n.dump=function(){var t="";t+="isMobile : "+this.isMobile+"\r\n",t+="language : "+this.language+"\r\n",t+="browserType : "+this.browserType+"\r\n",t+="browserVersion : "+this.browserVersion+"\r\n",t+="capabilities : "+JSON.stringify(this.capabilities)+"\r\n",t+="os : "+this.os+"\r\n",t+="osVersion : "+this.osVersion+"\r\n",t+="platform : "+this.platform+"\r\n",t+="Using "+(cc.game.renderType===cc.game.RENDER_TYPE_WEBGL?"WEBGL":"CANVAS")+" renderer.\r\n",cc.log(t)},n.openURL=function(t){window.open(t)},n.now=function(){return Date.now?Date.now():+new Date},n})();e.exports=n}),{}],160:[(function(t,e){"use strict";var i=t("../event/event-target"),n=t("../platform/js"),r=t("../renderer");t("../platform/CCClass");var s={init:function(){this.html=document.getElementsByTagName("html")[0]},availWidth:function(t){return t&&t!==this.html?t.clientWidth:window.innerWidth},availHeight:function(t){return t&&t!==this.html?t.clientHeight:window.innerHeight},meta:{width:"device-width"},adaptationType:cc.sys.browserType};switch(cc.sys.os===cc.sys.OS_IOS&&(s.adaptationType=cc.sys.BROWSER_TYPE_SAFARI),s.adaptationType){case cc.sys.BROWSER_TYPE_SAFARI:case cc.sys.BROWSER_TYPE_SOUGOU:case cc.sys.BROWSER_TYPE_UC:s.meta["minimal-ui"]="true",s.availWidth=function(t){return t.clientWidth},s.availHeight=function(t){return t.clientHeight}}var a=null,o=function(){i.call(this);var t=this,e=cc.ContainerStrategy,n=cc.ContentStrategy;s.init(this),t._frameSize=cc.size(0,0),t._designResolutionSize=cc.size(0,0),t._originalDesignResolutionSize=cc.size(0,0),t._scaleX=1,t._scaleY=1,t._viewportRect=cc.rect(0,0,0,0),t._visibleRect=cc.rect(0,0,0,0),t._autoFullScreen=!1,t._devicePixelRatio=1,t._maxPixelRatio=2,t._retinaEnabled=!1,t._resizeCallback=null,t._resizing=!1,t._resizeWithBrowserSize=!1,t._orientationChanging=!0,t._isRotated=!1,t._orientation=cc.macro.ORIENTATION_AUTO,t._isAdjustViewport=!0,t._antiAliasEnabled=!1,t._resolutionPolicy=null,t._rpExactFit=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.EXACT_FIT),t._rpShowAll=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.SHOW_ALL),t._rpNoBorder=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.NO_BORDER),t._rpFixedHeight=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.FIXED_HEIGHT),t._rpFixedWidth=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.FIXED_WIDTH),cc.game.once(cc.game.EVENT_ENGINE_INITED,this.init,this)};cc.js.extend(o,i),cc.js.mixin(o.prototype,{init:function(){this._initFrameSize();var t=cc.game.canvas.width,e=cc.game.canvas.height;this._designResolutionSize.width=t,this._designResolutionSize.height=e,this._originalDesignResolutionSize.width=t,this._originalDesignResolutionSize.height=e,this._viewportRect.width=t,this._viewportRect.height=e,this._visibleRect.width=t,this._visibleRect.height=e,cc.winSize.width=this._visibleRect.width,cc.winSize.height=this._visibleRect.height,cc.visibleRect&&cc.visibleRect.init(this._visibleRect)},_resizeEvent:function(t){var e;e=this.setDesignResolutionSize?this:cc.view;var i=cc.sys;if(i.browserType!==i.BROWSER_TYPE_UC||i.os!==i.OS_IOS){var n=e._frameSize.width,r=e._frameSize.height,s=e._isRotated;if(cc.sys.isMobile){var a=cc.game.container.style,o=a.margin;a.margin="0",a.display="none",e._initFrameSize(),a.margin=o,a.display="block"}else e._initFrameSize();if(!0===t||e._isRotated!==s||e._frameSize.width!==n||e._frameSize.height!==r){var c=e._originalDesignResolutionSize.width,l=e._originalDesignResolutionSize.height;e._resizing=!0,c>0&&e.setDesignResolutionSize(c,l,e._resolutionPolicy),e._resizing=!1,e.emit("canvas-resize"),e._resizeCallback&&e._resizeCallback.call()}}else setTimeout((function(){e._resizeEvent(t)}),0)},_orientationChange:function(){cc.view._orientationChanging=!0,cc.view._resizeEvent(),cc.sys.browserType===cc.sys.BROWSER_TYPE_SAFARI&&cc.sys.isMobile&&setTimeout((function(){window.innerHeight>window.innerWidth&&window.scrollTo(0,1)}),500)},_resize:function(){cc.view._resizeEvent(!1)},resizeWithBrowserSize:function(t){t?this._resizeWithBrowserSize||(this._resizeWithBrowserSize=!0,window.addEventListener("resize",this._resize),window.addEventListener("orientationchange",this._orientationChange)):this._resizeWithBrowserSize&&(this._resizeWithBrowserSize=!1,window.removeEventListener("resize",this._resize),window.removeEventListener("orientationchange",this._orientationChange))},setResizeCallback:function(t){"function"!=typeof t&&null!=t||(this._resizeCallback=t)},setOrientation:function(t){if((t&=cc.macro.ORIENTATION_AUTO)&&this._orientation!==t){this._orientation=t;var e=this._originalDesignResolutionSize.width,i=this._originalDesignResolutionSize.height;this.setDesignResolutionSize(e,i,this._resolutionPolicy)}},_initFrameSize:function(){var t=this._frameSize,e=s.availWidth(cc.game.frame),i=s.availHeight(cc.game.frame),n=e>=i;!cc.sys.isMobile||n&&this._orientation&cc.macro.ORIENTATION_LANDSCAPE||!n&&this._orientation&cc.macro.ORIENTATION_PORTRAIT?(t.width=e,t.height=i,cc.game.container.style["-webkit-transform"]="rotate(0deg)",cc.game.container.style.transform="rotate(0deg)",this._isRotated=!1):(t.width=i,t.height=e,cc.game.container.style["-webkit-transform"]="rotate(90deg)",cc.game.container.style.transform="rotate(90deg)",cc.game.container.style["-webkit-transform-origin"]="0px 0px 0px",cc.game.container.style.transformOrigin="0px 0px 0px",this._isRotated=!0),this._orientationChanging&&setTimeout((function(){cc.view._orientationChanging=!1}),1e3)},_setViewportMeta:function(t,e){var i=document.getElementById("cocosMetaElement");i&&e&&document.head.removeChild(i);var n,r,s,a=document.getElementsByName("viewport"),o=a?a[0]:null;for(r in n=o?o.content:"",(i=i||document.createElement("meta")).id="cocosMetaElement",i.name="viewport",i.content="",t)-1==n.indexOf(r)?n+=","+r+"="+t[r]:e&&(s=new RegExp(r+"s*=s*[^,]+"),n=n.replace(s,r+"="+t[r]));/^,/.test(n)&&(n=n.substr(1)),i.content=n,o&&(o.content=n),document.head.appendChild(i)},_adjustViewportMeta:function(){this._isAdjustViewport&&(this._setViewportMeta(s.meta,!1),this._isAdjustViewport=!1)},adjustViewportMeta:function(t){this._isAdjustViewport=t},enableRetina:function(t){this._retinaEnabled=!!t},isRetinaEnabled:function(){return this._retinaEnabled},enableAntiAlias:function(t){if(cc.warnID(9200),this._antiAliasEnabled!==t)if(this._antiAliasEnabled=t,cc.game.renderType===cc.game.RENDER_TYPE_WEBGL)cc.assetManager.assets.forEach((function(e){if(e instanceof cc.Texture2D){var i=cc.Texture2D.Filter;t?e.setFilters(i.LINEAR,i.LINEAR):e.setFilters(i.NEAREST,i.NEAREST)}}));else if(cc.game.renderType===cc.game.RENDER_TYPE_CANVAS){var e=cc.game.canvas.getContext("2d");e.imageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t}},isAntiAliasEnabled:function(){return this._antiAliasEnabled},enableAutoFullScreen:function(t){t&&t!==this._autoFullScreen&&cc.sys.isMobile?(this._autoFullScreen=!0,cc.screen.autoFullScreen(cc.game.frame)):(this._autoFullScreen=!1,cc.screen.disableAutoFullScreen(cc.game.frame))},isAutoFullScreenEnabled:function(){return this._autoFullScreen},setCanvasSize:function(t,e){var i=cc.game.canvas,n=cc.game.container;i.width=t*this._devicePixelRatio,i.height=e*this._devicePixelRatio,i.style.width=t+"px",i.style.height=e+"px",n.style.width=t+"px",n.style.height=e+"px",this._resizeEvent()},getCanvasSize:function(){return cc.size(cc.game.canvas.width,cc.game.canvas.height)},getFrameSize:function(){return cc.size(this._frameSize.width,this._frameSize.height)},setFrameSize:function(t,e){this._frameSize.width=t,this._frameSize.height=e,cc.game.frame.style.width=t+"px",cc.game.frame.style.height=e+"px",this._resizeEvent(!0)},getVisibleSize:function(){return cc.size(this._visibleRect.width,this._visibleRect.height)},getVisibleSizeInPixel:function(){return cc.size(this._visibleRect.width*this._scaleX,this._visibleRect.height*this._scaleY)},getVisibleOrigin:function(){return cc.v2(this._visibleRect.x,this._visibleRect.y)},getVisibleOriginInPixel:function(){return cc.v2(this._visibleRect.x*this._scaleX,this._visibleRect.y*this._scaleY)},getResolutionPolicy:function(){return this._resolutionPolicy},setResolutionPolicy:function(t){var e=this;if(t instanceof cc.ResolutionPolicy)e._resolutionPolicy=t;else{var i=cc.ResolutionPolicy;t===i.EXACT_FIT&&(e._resolutionPolicy=e._rpExactFit),t===i.SHOW_ALL&&(e._resolutionPolicy=e._rpShowAll),t===i.NO_BORDER&&(e._resolutionPolicy=e._rpNoBorder),t===i.FIXED_HEIGHT&&(e._resolutionPolicy=e._rpFixedHeight),t===i.FIXED_WIDTH&&(e._resolutionPolicy=e._rpFixedWidth)}},setDesignResolutionSize:function(t,e,i){if(t>0&&e>0){this.setResolutionPolicy(i);var n=this._resolutionPolicy;if(n&&n.preApply(this),cc.sys.isMobile&&this._adjustViewportMeta(),this._orientationChanging=!0,this._resizing||this._initFrameSize(),n){this._originalDesignResolutionSize.width=this._designResolutionSize.width=t,this._originalDesignResolutionSize.height=this._designResolutionSize.height=e;var s=n.apply(this,this._designResolutionSize);if(s.scale&&2===s.scale.length&&(this._scaleX=s.scale[0],this._scaleY=s.scale[1]),s.viewport){var a=this._viewportRect,o=this._visibleRect,c=s.viewport;a.x=c.x,a.y=c.y,a.width=c.width,a.height=c.height,o.x=0,o.y=0,o.width=c.width/this._scaleX,o.height=c.height/this._scaleY}n.postApply(this),cc.winSize.width=this._visibleRect.width,cc.winSize.height=this._visibleRect.height,cc.visibleRect&&cc.visibleRect.init(this._visibleRect),r.updateCameraViewport(),cc.internal.inputManager._updateCanvasBoundingRect(),this.emit("design-resolution-changed")}else cc.logID(2201)}else cc.errorID(2200)},getDesignResolutionSize:function(){return cc.size(this._designResolutionSize.width,this._designResolutionSize.height)},setRealPixelResolution:function(t,e,i){this._setViewportMeta({width:t},!0),document.documentElement.style.width=t+"px",document.body.style.width=t+"px",document.body.style.left="0px",document.body.style.top="0px",this.setDesignResolutionSize(t,e,i)},setViewportInPoints:function(t,e,i,n){var r=this._scaleX,s=this._scaleY;cc.game._renderContext.viewport(t*r+this._viewportRect.x,e*s+this._viewportRect.y,i*r,n*s)},setScissorInPoints:function(t,e,i,n){var r=this._scaleX,s=this._scaleY,o=Math.ceil(t*r+this._viewportRect.x),c=Math.ceil(e*s+this._viewportRect.y),l=Math.ceil(i*r),h=Math.ceil(n*s),u=cc.game._renderContext;if(!a){var f=u.getParameter(u.SCISSOR_BOX);a=cc.rect(f[0],f[1],f[2],f[3])}a.x===o&&a.y===c&&a.width===l&&a.height===h||(a.x=o,a.y=c,a.width=l,a.height=h,u.scissor(o,c,l,h))},isScissorEnabled:function(){return cc.game._renderContext.isEnabled(gl.SCISSOR_TEST)},getScissorRect:function(){if(!a){var t=gl.getParameter(gl.SCISSOR_BOX);a=cc.rect(t[0],t[1],t[2],t[3])}var e=1/this._scaleX,i=1/this._scaleY;return cc.rect((a.x-this._viewportRect.x)*e,(a.y-this._viewportRect.y)*i,a.width*e,a.height*i)},getViewportRect:function(){return this._viewportRect},getScaleX:function(){return this._scaleX},getScaleY:function(){return this._scaleY},getDevicePixelRatio:function(){return this._devicePixelRatio},convertToLocationInView:function(t,e,i,n){var r=n||cc.v2(),s=i.adjustedLeft?i.adjustedLeft:i.left,a=i.adjustedTop?i.adjustedTop:i.top,o=this._devicePixelRatio*(t-s),c=this._devicePixelRatio*(a+i.height-e);return this._isRotated?(r.x=cc.game.canvas.width-c,r.y=o):(r.x=o,r.y=c),r},_convertMouseToLocationInView:function(t,e){var i=this._viewportRect;t.x=(this._devicePixelRatio*(t.x-e.left)-i.x)/this._scaleX,t.y=(this._devicePixelRatio*(e.top+e.height-t.y)-i.y)/this._scaleY},_convertPointWithScale:function(t){var e=this._viewportRect;t.x=(t.x-e.x)/this._scaleX,t.y=(t.y-e.y)/this._scaleY},_convertTouchesWithScale:function(t){for(var e,i,n,r=this._viewportRect,s=this._scaleX,a=this._scaleY,o=0;o=0;n--){var s=i[n];s.hasOwnProperty("__attrs__")&&s.__attrs__||r(s,(e=i[n+1])&&e.__attrs__)}return r(t,(e=i[0])&&e.__attrs__),t.__attrs__}function a(t){return t.hasOwnProperty("__attrs__")&&t.__attrs__||s(t)}function o(t,e){this.name=t,this.default=e}o.prototype.toString=function(){return this.name},cc.Integer=new o("Integer",0),cc.Float=new o("Float",0),cc.Boolean=new o("Boolean",!1),cc.String=new o("String",""),e.exports={PrimitiveType:o,attr:function(t,e){var i=a(t),r=e+n,s={};for(var o in i)o.startsWith(r)&&(s[o.slice(r.length)]=i[o]);return s},getClassAttrs:a,setClassAttr:function(t,e,i,r){a(t)[e+n+i]=r},DELIMETER:n,getTypeChecker_ET:!1,getObjTypeChecker_ET:!1,ScriptUuid:{}}}),{"./CCClass":150,"./js":171,"./utils":174}],163:[(function(t,e){"use strict";var i=t("./js"),n=i.array.fastRemoveAt;function r(){}function s(){this.callback=r,this.target=void 0,this.once=!1}s.prototype.set=function(t,e,i){this.callback=t,this.target=e,this.once=!!i};var a=new i.Pool(function(t){return t.callback=r,t.target=void 0,t.once=!1,!0},32);function o(){this.callbackInfos=[],this.isInvoking=!1,this.containCanceled=!1}a.get=function(){return this._get()||new s};var c=o.prototype;c.removeByCallback=function(t){for(var e=0;e=0;--t)this.callbackInfos[t]||n(this.callbackInfos,t);this.containCanceled=!1},c.clear=function(){this.cancelAll(),this.callbackInfos.length=0,this.isInvoking=!1,this.containCanceled=!1};var l=new i.Pool(function(t){return t.callbackInfos=[],t.isInvoking=!1,t.containCanceled=!1,!0},16);function h(){this._callbackTable=i.createMap(!0)}l.get=function(){return this._get()||new o},(c=h.prototype).on=function(t,e,i,n){var r=this._callbackTable[t];r||(r=this._callbackTable[t]=l.get());var s=a.get();s.set(e,i,n),r.callbackInfos.push(s)},c.hasEventListener=function(t,e,i){var n=this._callbackTable[t];if(!n)return!1;var r=n.callbackInfos;if(!e){if(n.isInvoking){for(var s=0;s0}for(var a=0;a=0?a[i[c]]=o:a[~c]=o}for(;r=0?l[i[u]]=h:l[~u]=h}}function T(t,e){for(var i=t[4][e[0]],n=i[0],r=new(0,n[0]),s=n[1],a=n[2],o=i[i.length-1],c=1;c=0?e[i]=t[5][n]:t[7][3*~n]=e}function C(t){return function(e,i,n,r){i[n]=r;for(var s=0;s=0){var u=o[l];e[a]=A(t,u,h)}else(0,w[l=~l])(t,e,a,h)}return r}function M(t,e){return t||L.reportMissingClass(e),Object}function I(t,e,i,n,r,s){var a=t(e);if(!a){if(r)return void(i[n]=(function(e,i,n){return function(){var r=t(n)||M(s,n);return e[i]=r,new r}})(i,n,e));a=M(s,e)}i[n]=a}function D(t,e,i){for(var r=i||n.default._getClassById,s=t[3],a=0;a=0?i[l]:~l,s[o]=l);var h=a[o];"number"==typeof h&&(a[o]=n[h])}}function L(t,e,i){"string"==typeof t&&(t=JSON.parse(t));var n=!e;(e=e||y.pool.get()).init(t),i=i||{};var r=t[0],s=!1;if("object"==typeof r&&(s=r.preprocessed,r=r.version),r<1)throw new Error(cc.debug.getError(5304,r));i._version=r,i.result=e,t[0]=i,s||(D(t,!1,i.classFinder),P(t)),cc.game._isCloning=!0;var a=t[5],o=R(t);return cc.game._isCloning=!1,t[7]&&E(t[7],a,t[2]),O(t),n&&y.pool.put(e),a[o]}w[0]=function(t,e,i,n){e[i]=n},w[1]=x,w[2]=C(x),w[3]=C(b),w[4]=S,w[5]=function(t,e,i,n){v[n[0]](e[i],n)},w[6]=b,w[7]=function(t,e,i,n){e[i].set(n)},w[8]=function(t,e,i,n){var r=new _[n[0]];v[n[0]](r,n),e[i]=r},w[9]=C(S),w[10]=function(t,e,i,n){var r=t[3][n[0]];e[i]=A(t,r,n[1])},w[11]=function(t,e,i,n){var r=n[0];e[i]=r;for(var s=1;s0&&(i=f+this.globalVariables.join(",")+";");var n=c.flattenCodeArray(["return (function(R){",i||[],this.codeArray,"return o;","})"]);this.result=Function("O","F",n)(this.objs,this.funcs);for(var r=0,s=this.objsToClear_iN$t.length;r1)t.push(_+"="+this._targetExp+";"),e=_;else{if(1!==this._exps.length)return;e=this._targetExp}for(var i=0;i=0&&(f(t,i),!0)}function _(t,e){void 0===e&&(e=t,t=null),this.get=null,this.count=0,this._pool=new Array(e),this._cleanup=t}s.formatStr=function(){var t=arguments.length;if(0===t)return"";var e=arguments[0];if(1===t)return""+e;var i="string"==typeof e&&h.test(e);if(i)for(var n=1;n=0&&(t[i]=t[t.length-1],--t.length)},removeAt:f,fastRemoveAt:function(t,e){var i=t.length;e<0||e>=i||(t[e]=t[i-1],t.length=i-1)},contains:function(t,e){return t.indexOf(e)>=0},verifyType:function(t,e){if(t&&t.length>0)for(var i=0;i0){--this.count;var t=this._pool[this.count];return this._pool[this.count]=null,t}return null},_.prototype.put=function(t){var e=this._pool;if(this.count=0&&(this._pool.length=t,this.count>t&&(this.count=t))},s.Pool=_,cc.js=s,e.exports=s}),{"../utils/mutable-forward-iterator":222,"./id-generater":167}],172:[(function(t,e,i){"use strict";var n=t("./js"),r=t("./attribute"),s={default:{},serializable:{},editorOnly:{},formerlySerializedAs:{}};function a(t,e,i,n){if(!t.get&&!t.set&&t.hasOwnProperty("default")){var r="_N$"+e;t.get=function(){return this[r]},t.set=function(t){var e=this[r];this[r]=t,i.call(this,e)};var a={};for(var o in n[r]=a,s){var c=s[o];t.hasOwnProperty(o)&&(a[o]=t[o],c.canUsedInGet||delete t[o])}}}function o(t,e,i,n){if(Array.isArray(e)){if(!(e.length>0))return cc.errorID(5508,i,n);t.type=e=e[0]}"function"==typeof e&&(e===String?t.type=cc.String:e===Boolean?t.type=cc.Boolean:e===Number&&(t.type=cc.Float))}function c(t,e,i){var n=t?{_short:!0}:{_short:!0,default:e};return i&&(n.type=i),n}i.getFullFormOfProperty=function(t,e){return t&&t.constructor===Object?null:Array.isArray(t)&&t.length>0?c(e,[],t):"function"==typeof t?c(e,n.isChildClassOf(t,cc.ValueType)?new t:null,t):t instanceof r.PrimitiveType?c(e,t.default):c(e,t)},i.preprocessAttrs=function(t,e){for(var n in t){var r=t[n],s=i.getFullFormOfProperty(r,!1);if(s&&(r=t[n]=s),r){var c=r.notify;c&&a(r,n,c,t),"type"in r&&o(r,r.type,e,n)}}},i.validateMethodWithProps=function(t){return"function"==typeof t||null===t}}),{"./CCClass":150,"./attribute":162,"./js":171}],173:[(function(){"use strict";var t=[];cc._RF={push:function(e,i,n){void 0===n&&(n=i,i=""),t.push({uuid:i,script:n,module:e,exports:e.exports,beh:null})},pop:function(){var e=t.pop(),i=e.module,n=i.exports;if(n===e.exports){for(var r in n)return;i.exports=n=e.cls}},peek:function(){return t[t.length-1]}}}),{}],174:[(function(t,e){"use strict";t("./js"),e.exports={contains:function(t,e){if("function"==typeof t.contains)return t.contains(e);if("function"==typeof t.compareDocumentPosition)return!!(16&t.compareDocumentPosition(e));var i=e.parentNode;if(i)do{if(i===t)return!0;i=i.parentNode}while(null!==i);return!1},isDomNode:"object"==typeof window&&("function"==typeof Node?function(t){return t instanceof Node}:function(t){return t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName}),callInNextTick:function(t,e,i){t&&setTimeout((function(){t(e,i)}),0)}}}),{"./js":171}],175:[(function(t){"use strict";t("./platform/js"),t("./value-types"),t("./utils"),t("./platform/CCInputManager"),t("./platform/CCInputExtension"),t("./event"),t("./platform/CCSys"),t("./platform/CCMacro"),t("./asset-manager"),t("./CCDirector"),t("./renderer"),t("./platform/CCView"),t("./platform/CCScreen"),t("./CCScheduler"),t("./event-manager")}),{"./CCDirector":27,"./CCScheduler":32,"./asset-manager":50,"./event":130,"./event-manager":126,"./platform/CCInputExtension":153,"./platform/CCInputManager":154,"./platform/CCMacro":155,"./platform/CCScreen":158,"./platform/CCSys":159,"./platform/CCView":160,"./platform/js":171,"./renderer":181,"./utils":220,"./value-types":236}],176:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("./assembler")),r=a(t("./utils/dynamic-atlas/manager")),s=a(t("./webgl/render-data"));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i>2,c=s._vData;n.length+o>c.length?c.set(n.subarray(0,c.length-o),o):c.set(n,o);for(var l=s._iData,h=a.indiceOffset,u=a.vertexOffset,f=0,d=r.length;fthis.maxSize||(this._clean(t),i[e].push(t),this.count++)}},r.get=function(t){var e;if(this.enabled){var i=this._pool,n=a(t);e=i[n]&&i[n].pop()}return e?this.count--:e=new t,e},r.clear=function(){this._pool={},this.count=0},r._clean=function(t){t._renderComp=null},n}(r.default));r.default.register("assembler",o);var c=o;i.default=c,e.exports=i.default}),{"../utils/pool":223}],178:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("./webgl/vertex-format"),s=(n=t("./assembler-pool"))&&n.__esModule?n:{default:n},a=(function(){function t(){this._extendNative&&this._extendNative()}var e=t.prototype;return e.init=function(t){this._renderComp=t},e.updateRenderData=function(){},e.fillBuffers=function(){},e.getVfmt=function(){return r.vfmtPosUvColor},t})();i.default=a,a.register=function(t,e){t.__assembler__=e},a.init=function(t){for(var e=t.constructor,i=e.__assembler__;!i;){if(!(e=e.$super))return void cc.warn("Can not find assembler for render component : ["+cc.js.getClassName(t)+"]");i=e.__assembler__}if(i.getConstructor&&(i=i.getConstructor(t)),!t._assembler||t._assembler.constructor!==i){var n=s.default.get(i);n.init(t),t._assembler=n}},cc.Assembler=a,e.exports=i.default}),{"./assembler-pool":177,"./webgl/vertex-format":211}],179:[(function(t,e){"use strict";var i=function(t){var e;try{e=t.getContext("2d")}catch(i){return void console.error(i)}this._canvas=t,this._ctx=e,this._caps={},this._stats={drawcalls:0},this._vx=this._vy=this._vw=this._vh=0,this._sx=this._sy=this._sw=this._sh=0};i.prototype._restoreTexture=function(){},i.prototype.setViewport=function(t,e,i,n){this._vx===t&&this._vy===e&&this._vw===i&&this._vh===n||(this._vx=t,this._vy=e,this._vw=i,this._vh=n)},i.prototype.setScissor=function(t,e,i,n){this._sx===t&&this._sy===e&&this._sw===i&&this._sh===n||(this._sx=t,this._sy=e,this._sw=i,this._sh=n)},i.prototype.clear=function(t){var e=this._ctx;e.clearRect(this._vx,this._vy,this._vw,this._vh),!t||0===t[0]&&0===t[1]&&0===t[2]||(e.fillStyle="rgb("+t[0]+","+t[1]+","+t[2]+")",e.globalAlpha=t[3],e.fillRect(this._vx,this._vy,this._vw,this._vh))},i.prototype.resetDrawCalls=function(){this._stats.drawcalls=0},i.prototype.getDrawCalls=function(){return this._stats.drawcalls},e.exports=i}),{}],180:[(function(t,e){"use strict";var i=function(t,e){this._device=t,this._width=4,this._height=4,this._image=null,e&&(void 0!==e.width&&(this._width=e.width),void 0!==e.height&&(this._height=e.height),this.updateImage(e))};i.prototype.update=function(t){this.updateImage(t)},i.prototype.updateImage=function(t){if(t.images&&t.images[0]){var e=t.images[0];e&&e!==this._image&&(this._image=e)}},i.prototype.destroy=function(){this._image=null},e.exports=i}),{}],181:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("../../renderer/gfx")),r=a(t("../../renderer/core/input-assembler")),s=a(t("../../renderer/core/pass"));function a(t){return t&&t.__esModule?t:{default:t}}var o=cc.renderer={Texture2D:null,InputAssembler:r.default,Pass:s.default,renderEngine:null,canvas:null,device:null,scene:null,drawCalls:0,_handle:null,_cameraNode:null,_camera:null,_forward:null,_flow:null,initWebGL:function(e,i){t("./webgl/assemblers");var r=t("./webgl/model-batcher");this.Texture2D=n.default.Texture2D,this.canvas=e,this._flow=cc.RenderFlow;var s=t("../../renderer/scene/scene"),a=t("../../renderer/renderers/forward-renderer");this.device=new n.default.Device(e,i),this.scene=new s;var o,c=(o=this.device,{defaultTexture:new n.default.Texture2D(o,{images:[],width:128,height:128,wrapS:n.default.WRAP_REPEAT,wrapT:n.default.WRAP_REPEAT,format:n.default.TEXTURE_FMT_RGB8,genMipmaps:!1}),programTemplates:[],programChunks:{}});this._forward=new a(this.device,c),this._handle=new r(this.device,this.scene),this._flow.init(this._handle,this._forward)},initCanvas:function(e){var i=t("./canvas"),n=t("./canvas/Texture2D"),r=t("./canvas/Device");this.Device=r,this.Texture2D=n,this.canvas=e,this.device=new r(e),this._camera={a:1,b:0,c:0,d:1,tx:0,ty:0},this._handle=new i.RenderComponentHandle(this.device,this._camera),this._forward=new i.ForwardRenderer,this._flow=cc.RenderFlow,this._flow.init(this._handle,this._forward)},updateCameraViewport:function(){if(cc.director){var t=cc.director.getScene();t&&t.setScale(1,1,1)}if(cc.game.renderType===cc.game.RENDER_TYPE_CANVAS){var e=cc.view.getViewportRect();this.device.setViewport(e.x,e.y,e.width,e.height),this._camera.a=cc.view.getScaleX(),this._camera.d=cc.view.getScaleY(),this._camera.tx=e.x,this._camera.ty=e.y+e.height}},render:function(t,e){this.device.resetDrawCalls(),t&&(this._flow.render(t,e),this.drawCalls=this.device.getDrawCalls())},clear:function(){this._handle.reset(),this._forward.clear()}};i.default=o,e.exports=i.default}),{"../../renderer/core/input-assembler":259,"../../renderer/core/pass":260,"../../renderer/gfx":269,"../../renderer/renderers/forward-renderer":288,"../../renderer/scene/scene":291,"./canvas":void 0,"./canvas/Device":179,"./canvas/Texture2D":180,"./webgl/assemblers":191,"./webgl/model-batcher":207}],182:[(function(t,e){"use strict";var i,n,r=0,s=1<0;)i&t&&(e=x(i,e)),i>>=1;return e}function b(t){var e=t._renderFlag;(A[e]=C(e))._func(t)}y.flows=A,y.createFlow=x;var S=[];y.registerValidate=function(t){t._inValidateList||(S.push(t),t._inValidateList=!0)},y.validateRenderers=function(){for(var t=0,e=S.length;t0&&n>0&&z+d.w*A>F&&!s.isUnicodeSpace(x)){_.push(l),l=0,i++,n=0,r-=D*this._getFontScale()+0,V=!0;break}p.x=z,p.y=r-d.offsetY*A+c.margin,this._recordLetterInfo(p,x,U,i),U+1p.y-d.h*A&&(R=p.y-d.h*A)}else{this._recordPlaceholderInfo(U,x);var W="";v&&(W=v.atlasName),console.log("Can't find letter definition in texture atlas "+W+" for letter:"+x)}else this._recordPlaceholderInfo(U,x)}V||(n=B,hR&&(u=R),a<(l=M)&&(a=l),y+=S)}else _.push(l),l=0,i++,n=0,r-=D*this._getFontScale()+0,this._recordPlaceholderInfo(y,x),y++}return _.push(l),m=(g=i+1)*D*this._getFontScale(),g>1&&(m+=0*(g-1)),C.width=L,C.height=N,L<=0&&(C.width=parseFloat(a.toFixed(2))+2*c.margin),N<=0&&(C.height=parseFloat(m.toFixed(2))+2*c.margin),E=C.height,T=0,P!==o.CLAMP&&(h>0&&(E=C.height+h),u<-m&&(T=m+u)),!0},r._getFirstCharLen=function(){return 1},r._getFontScale=function(){return P===o.SHRINK?A:1},r._getFirstWordLen=function(t,e,i){var n=t.charAt(e);if(s.isUnicodeCJK(n)||"\n"===n||s.isUnicodeSpace(n))return 1;var r=1,a=c.fontAtlas.getLetterDefinitionForChar(n,c);if(!a)return r;for(var o=a.xAdvance*A+I,l=e+1;lF&&!s.isUnicodeSpace(n)&&F>0)return r;if(o+=a.xAdvance*A+I,"\n"===n||s.isUnicodeSpace(n)||s.isUnicodeCJK(n))break;r++}return r},r._multilineTextWrapByWord=function(){return this._multilineTextWrap(this._getFirstWordLen)},r._multilineTextWrapByChar=function(){return this._multilineTextWrap(this._getFirstCharLen)},r._recordPlaceholderInfo=function(t,e){if(t>=d.length){var i=new l;d.push(i)}d[t].char=e,d[t].hash=e.charCodeAt(0)+c.hash,d[t].valid=!1},r._recordLetterInfo=function(t,e,i,n){if(i>=d.length){var r=new l;d.push(r)}var s=e.charCodeAt(0)+c.hash;d[i].line=n,d[i].char=e,d[i].hash=s,d[i].valid=c.fontAtlas.getLetter(s).valid,d[i].x=t.x,d[i].y=t.y},r._alignText=function(){m=0,_.length=0,this._multilineTextWrapByWord(),this._computeAlignmentOffset(),P===o.SHRINK&&S>0&&this._isVerticalClamp()&&this._shrinkLabelToContentSize(this._isVerticalClamp),this._updateQuads()||P===o.SHRINK&&this._shrinkLabelToContentSize(this._isHorizontalClamp)},r._scaleFontSizeDown=function(t){var e=!0;t||(t=.1,e=!1),S=t,e&&this._updateContent()},r._shrinkLabelToContentSize=function(t){for(var e=0,i=0|S,n=0;e>1;if(r<=0)break;A=r/w,this._multilineTextWrapByWord(),this._computeAlignmentOffset(),t()?i=n-1:e=n}var s=e;s>=0&&this._scaleFontSizeDown(s)},r._isVerticalClamp=function(){return m>C.height},r._isHorizontalClamp=function(){for(var t=!1,e=0,i=b.length;e0)if(O){if(_[a]>C.width&&(s>C.width||s<0)){t=!0;break}}else if(s>C.width){t=!0;break}}}return t},r._isHorizontalClamped=function(t,e){var i=_[e],n=t>C.width||t<0;return O?i>C.width&&n:n},r._updateQuads=function(){var t=x?x._texture:c.fontAtlas.getTexture(),e=u.node;this.verticesCount=this.indicesCount=0,this._renderData&&(this._renderData.dataLength=0);for(var i=C,n=e._anchorPoint.x*i.width,r=e._anchorPoint.y*i.height,s=!0,a=0,l=b.length;a0){if(v>E){var g=v-E;h.y+=g,h.height-=g,v-=g}v-_.h*A0&&this._isHorizontalClamped(S,m))if(P===o.CLAMP)h.width=0;else if(P===o.SHRINK){if(C.width>_.w){s=!1;break}h.width=0}if(h.height>0&&h.width>0){var w=this._determineRect(h),R=f.x+p[f.line];this.appendQuad(u,t,h,w,R-n,v-r,A)}}}return this._quadsUpdated(u),s},r._determineRect=function(t){var e=x.isRotated(),i=x._originalSize,n=x._rect,r=x._offset,s=r.x+(i.width-n.width)/2,a=r.y-(i.height-n.height)/2;if(e){var o=t.x;t.x=n.x+n.height-t.y-t.height-a,t.y=o+n.y-s,t.y<0&&(t.height=t.height+a)}else t.x+=n.x-s,t.y+=n.y+a;return e},r._computeAlignmentOffset=function(){switch(p.length=0,R){case a.TextAlignment.LEFT:for(var t=0;t0){var l=e.out||p;t.strokeStyle="rgba("+l.r+", "+l.g+", "+l.b+", "+l.a/255+")",t.lineWidth=2*e.margin,t.strokeText(this._char,s,a)}t.fillText(this._char,s,a),this._texture.handleLoadedTexture()},destroy:function(){this._texture.destroy(),this._texture=null,s._canvasPool.put(this._data)}},cc.js.mixin(y.prototype,{insertLetterTexture:function(t){var e=t._texture,i=e.width,n=e.height;if(this._x+i+v>this._width&&(this._x=v,this._y=this._nexty),this._y+n>this._nexty&&(this._nexty=this._y+n+v),this._nexty>this._height)return null;this._fontDefDictionary._texture.drawTextureAt(e,this._x,this._y),this._dirty=!0;var r=new d;return r.u=this._x+1,r.v=this._y+1,r.texture=this._fontDefDictionary._texture,r.valid=!0,r.w=t._width-2,r.h=t._height-2,r.xAdvance=r.w,r.offsetY=t._offsetY,this._x+=i+v,this._fontDefDictionary.addLetterDefinitions(t._hash,r),r},update:function(){this._dirty&&(this._fontDefDictionary._texture.update(),this._dirty=!1)},reset:function(){this._x=v,this._y=v,this._nexty=v;for(var t=this._fontDefDictionary._letterDefinitions,e=0,i=t.length;e0&&(n=n+e.margin+e.out.toHEX()),""+e.fontSize+e.fontFamily+i+n)},r._getFontDesc=function(){return f.fontSize.toString()+"px "+f.fontFamily},r._computeHorizontalKerningForText=function(){},r._determineRect=function(){return!1},n})(r.default);i.default=T,e.exports=i.default}),{"../../../assets/CCRenderTexture":70,"../../../components/CCComponent":105,"../../../components/CCLabel":107,"../../../components/CCLabelOutline":108,"../../../utils/text-utils":228,"../../webgl/assemblers/label/2d/bmfont":192,"../utils":187}],186:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r,s=(n=t("../../assembler-2d"))&&n.__esModule?n:{default:n},a=t("../../../utils/text-utils"),o=t("../../../platform/CCMacro"),c=t("../../../components/CCLabel"),l=t("../../../components/CCLabelOutline"),h=t("../../../components/CCLabelShadow"),u=c.Overflow,f=t("../utils").deleteFromDynamicAtlas,d=t("../utils").getFontFamily,_=(1/255).toFixed(3),p=null,v=null,g=null,m="",y="",E=0,T=0,A=[],x=cc.Size.ZERO,C=0,b=0,S=0,w=null,R="",M=u.NONE,I=!1,D=!1,P=null,O=cc.Color.WHITE,L=null,N=cc.Color.BLACK,F=cc.rect(),B=cc.Size.ZERO,V=cc.Size.ZERO,k=!1,U=!1,z=!1,W=0,H=cc.Vec2.ZERO,G=0,Y=["left","center","right"],X=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=n.prototype;return s._getAssemblerData=function(){return(r=c._canvasPool.get()).canvas.width=r.canvas.height=1,r},s._resetAssemblerData=function(t){t&&c._canvasPool.put(t)},s.updateRenderData=function(e){t.prototype.updateRenderData.call(this,e),e._vertsDirty&&(this._updateProperties(e),this._calculateLabelFont(),this._updateLabelDimensions(),this._updateTexture(e),this._calDynamicAtlas(e),e._actualFontSize=E,e.node.setContentSize(V),this.updateVerts(e),e._vertsDirty=!1,p=null,v=null,g=null)},s.updateVerts=function(){},s._updatePaddingRect=function(){var t=0,e=0,i=0,n=0,r=0;if(B.width=B.height=0,P&&(t=e=i=n=r=P.width,B.width=B.height=2*r),L){var s=L.blur+r;i=Math.max(i,-L._offset.x+s),n=Math.max(n,L._offset.x+s),t=Math.max(t,L._offset.y+s),e=Math.max(e,-L._offset.y+s)}if(U){var a=T*Math.tan(.20943951);n+=a,B.width+=a}F.x=i,F.y=t,F.width=i+n,F.height=t+e},s._updateProperties=function(t){var e=t._assemblerData;p=e.context,v=e.canvas,g=t._frame._original?t._frame._original._texture:t._frame._texture,y=t.string.toString(),E=t._fontSize,T=E,W=t.underlineHeight||T/8,M=t.overflow,x.width=t.node.width,x.height=t.node.height,V=t.node.getContentSize(),C=t._lineHeight,b=t.horizontalAlign,S=t.verticalAlign,w=t.node.color,k=t.enableBold,U=t.enableItalic,z=t.enableUnderline,R=d(t),D=t.srcBlendFactor===cc.macro.BlendFactor.ONE,I=M!==u.NONE&&(M===u.RESIZE_HEIGHT||t.enableWrapText),(P=(P=l&&t.getComponent(l))&&P.enabled&&P.width>0?P:null)&&O.set(P.color),(L=(L=h&&t.getComponent(h))&&L.enabled?L:null)&&(N.set(L.color),N.a=N.a*t.node.color.a/255),this._updatePaddingRect()},s._calculateFillTextStartPosition=function(){var t=0;b===o.TextAlignment.RIGHT?t=x.width-F.width:b===o.TextAlignment.CENTER&&(t=(x.width-F.width)/2);var e=this._getLineHeight()*(A.length-1),i=E*(1-a.BASELINE_RATIO/2);if(S!==o.VerticalTextAlignment.TOP){var n=e+F.height+E-x.height;S===o.VerticalTextAlignment.BOTTOM?i-=n+=a.BASELINE_RATIO/2*E:i-=n/2}return i+=a.BASELINE_OFFSET*E,cc.v2(t+F.x,i+F.y)},s._setupOutline=function(){p.strokeStyle="rgba("+O.r+", "+O.g+", "+O.b+", "+O.a/255+")",p.lineWidth=2*P.width},s._setupShadow=function(){p.shadowColor="rgba("+N.r+", "+N.g+", "+N.b+", "+N.a/255+")",p.shadowBlur=L.blur,p.shadowOffsetX=L.offset.x,p.shadowOffsetY=-L.offset.y},s._drawTextEffect=function(t,e){if(L||P||z){var i=A.length>1&&L,n=this._measureText(p,m),r=0,s=0;L&&this._setupShadow(),P&&this._setupOutline();for(var a=0;a>1)<=0){cc.logID(4003);break}E=h,m=this._getFontDesc(),p.font=m;var u=this._getLineHeight();for(n=0,i=0;io?l=h-1:c=h}0===c?cc.logID(4003):(E=c,m=this._getFontDesc(),p.font=m)}else{for(n=t.length*this._getLineHeight(),i=0;ir?e:r}i=(A.length+a.BASELINE_RATIO)*this._getLineHeight();var s=parseFloat(e.toFixed(2)),o=parseFloat(i.toFixed(2));x.width=s+F.width,x.height=o+F.height,V.width=s+B.width,V.height=o+B.height;break;case u.SHRINK:this._calculateShrinkFont(t),this._calculateWrapText(t);break;case u.CLAMP:this._calculateWrapText(t);break;case u.RESIZE_HEIGHT:this._calculateWrapText(t);var c=(A.length+a.BASELINE_RATIO)*this._getLineHeight();x.height=c+F.height,V.height=c+B.height}},n})(s.default);i.default=X,e.exports=i.default}),{"../../../components/CCLabel":107,"../../../components/CCLabelOutline":108,"../../../components/CCLabelShadow":109,"../../../platform/CCMacro":155,"../../../utils/text-utils":228,"../../assembler-2d":176,"../utils":187}],187:[(function(t,e){"use strict";var i=t("./dynamic-atlas/manager"),n=cc.Color.WHITE,r={fontAtlas:null,fontSize:0,lineHeight:0,hAlign:0,vAlign:0,hash:"",fontFamily:"",fontDesc:"Arial",color:n,isOutlined:!1,out:n,margin:0};e.exports={deleteFromDynamicAtlas:function(t,e){e&&e._original&&i&&(i.deleteAtlasSpriteFrame(e),e._resetDynamicAtlasFrame())},getFontFamily:function(t){return t.useSystemFont?t.fontFamily||"Arial":t.font?t.font._nativeAsset?t.font._nativeAsset:(cc.assetManager.postLoadNative(t.font,(function(){t.isValid&&t.setVertsDirty()})),"Arial"):"Arial"},shareLabelInfo:r}}),{"./dynamic-atlas/manager":void 0}],188:[(function(t,e){"use strict";function i(t,e,i){i=i||2;var r,a,o,c,l,u,f,d=e&&e.length,_=d?e[0]*i:t.length,p=n(t,0,_,i,!0),v=[];if(!p)return v;if(d&&(p=h(t,e,p,i)),t.length>80*i){r=o=t[0],a=c=t[1];for(var g=i;g<_;g+=i)(l=t[g])o&&(o=l),u>c&&(c=u);f=Math.max(o-r,c-a)}return s(p,v,i,r,a,f),v}function n(t,e,i,n,r){var s,a;if(r===I(t,e,i,n)>0)for(s=e;s=e;s-=n)a=w(s,t[s],t[s+1],a);return a&&T(a,a.next)&&(R(a),a=a.next),a}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!T(n,n.next)&&0!==E(n.prev,n,n.next))n=n.next;else{if(R(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function s(t,e,i,n,h,u,f){if(t){!f&&u&&_(t,n,h,u);for(var d,p,v=t;t.prev!==t.next;)if(d=t.prev,p=t.next,u?o(t,n,h,u):a(t))e.push(d.i/i),e.push(t.i/i),e.push(p.i/i),R(t),t=p.next,v=p.next;else if((t=p)===v){f?1===f?s(t=c(t,e,i),e,i,n,h,u,2):2===f&&l(t,e,i,n,h,u):s(r(t),e,i,n,h,u,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(E(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(m(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&E(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function o(t,e,i,n){var r=t.prev,s=t,a=t.next;if(E(r,s,a)>=0)return!1;for(var o=r.xs.x?r.x>a.x?r.x:a.x:s.x>a.x?s.x:a.x,h=r.y>s.y?r.y>a.y?r.y:a.y:s.y>a.y?s.y:a.y,u=v(o,c,e,i,n),f=v(l,h,e,i,n),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&m(r.x,r.y,s.x,s.y,a.x,a.y,d.x,d.y)&&E(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=u;){if(d!==t.prev&&d!==t.next&&m(r.x,r.y,s.x,s.y,a.x,a.y,d.x,d.y)&&E(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function c(t,e,i){var n=t;do{var r=n.prev,s=n.next.next;!T(r,s)&&A(r,n,n.next,s)&&C(r,s)&&C(s,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(s.i/i),R(n),R(n.next),n=t=s),n=n.next}while(n!==t);return n}function l(t,e,i,n,a,o){var c=t;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&y(c,l)){var h=S(c,l);return c=r(c,c.next),h=r(h,h.next),s(c,e,i,n,a,o),void s(h,e,i,n,a,o)}l=l.next}c=c.next}while(c!==t)}function h(t,e,i,s){var a,o,c,l=[];for(a=0,o=e.length;a=n.next.y){var o=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=r&&o>a){if(a=o,o===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x=n.x&&n.x>=h&&m(si.x)&&C(n,t)&&(i=n,f=c),n=n.next;return i}function _(t,e,i,n){var r=t;do{null===r.z&&(r.z=v(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,p(r)}function p(t){var e,i,n,r,s,a,o,c,l=1;do{for(i=t,t=null,s=null,a=0;i;){for(a++,n=i,o=0,e=0;e0||c>0&&n;)0===o?(r=n,n=n.nextZ,c--):0!==c&&n?i.z<=n.z?(r=i,i=i.nextZ,o--):(r=n,n=n.nextZ,c--):(r=i,i=i.nextZ,o--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,l*=2}while(a>1);return t}function v(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,i=t;do{e.x=0&&(t-a)*(n-o)-(i-a)*(e-o)>=0&&(i-a)*(s-o)-(r-a)*(n-o)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!x(t,e)&&C(t,e)&&C(e,t)&&b(t,e)}function E(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function A(t,e,i,n){return!!(T(t,e)&&T(i,n)||T(t,n)&&T(i,e))||E(t,e,i)>0!=E(t,e,n)>0&&E(i,n,t)>0!=E(i,n,e)>0}function x(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&&A(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}function C(t,e){return E(t.prev,t,t.next)<0?E(t,e,t.next)>=0&&E(t,t.prev,e)>=0:E(t,e,t.prev)<0||E(t,t.next,e)<0}function b(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}function S(t,e){var i=new M(t.i,t.x,t.y),n=new M(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function w(t,e,i,n){var r=new M(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function R(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)}function M(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}function I(t,e,i,n){for(var r=0,s=e,a=i-n;s0&&(n+=t[r-1].length,i.holes.push(n))}return i}}),{}],189:[(function(t,e){"use strict";var i=t("../../../../graphics/helper"),n=t("../../../../graphics/types").PointFlags,r=cc.Graphics.Point=cc.Class({name:"cc.GraphicsPoint",extends:cc.Vec2,ctor:function(){this.reset()},reset:function(){this.dx=0,this.dy=0,this.dmx=0,this.dmy=0,this.flags=0,this.len=0}});function s(){this.reset()}function a(){this._tessTol=.25,this._distTol=.01,this._updatePathOffset=!1,this._paths=null,this._pathLength=0,this._pathOffset=0,this._points=null,this._pointsOffset=0,this._commandx=0,this._commandy=0,this._paths=[],this._points=[]}cc.js.mixin(s.prototype,{reset:function(){this.closed=!1,this.nbevel=0,this.complex=!0,this.points?this.points.length=0:this.points=[]}}),cc.js.mixin(a.prototype,{moveTo:function(t,e){this._updatePathOffset&&(this._pathOffset=this._pathLength,this._updatePathOffset=!1),this._addPath(),this._addPoint(t,e,n.PT_CORNER),this._commandx=t,this._commandy=e},lineTo:function(t,e){this._addPoint(t,e,n.PT_CORNER),this._commandx=t,this._commandy=e},bezierCurveTo:function(t,e,r,s,a,o){var c=this._curPath,l=c.points[c.points.length-1];l.x!==t||l.y!==e||r!==a||s!==o?(i.tesselateBezier(this,l.x,l.y,t,e,r,s,a,o,0,n.PT_CORNER),this._commandx=a,this._commandy=o):this.lineTo(a,o)},quadraticCurveTo:function(t,e,i,n){var r=this._commandx,s=this._commandy;this.bezierCurveTo(r+2/3*(t-r),s+2/3*(e-s),i+2/3*(t-i),n+2/3*(e-n),i,n)},arc:function(t,e,n,r,s,a){i.arc(this,t,e,n,r,s,a)},ellipse:function(t,e,n,r){i.ellipse(this,t,e,n,r),this._curPath.complex=!1},circle:function(t,e,n){i.ellipse(this,t,e,n,n),this._curPath.complex=!1},rect:function(t,e,i,n){this.moveTo(t,e),this.lineTo(t,e+n),this.lineTo(t+i,e+n),this.lineTo(t+i,e),this.close(),this._curPath.complex=!1},roundRect:function(t,e,n,r,s){i.roundRect(this,t,e,n,r,s),this._curPath.complex=!1},clear:function(t){this._pathLength=0,this._pathOffset=0,this._pointsOffset=0,this._curPath=null,t&&(this._paths.length=0,this._points.length=0)},close:function(){this._curPath.closed=!0},_addPath:function(){var t=this._pathLength,e=this._paths[t];return e?e.reset():(e=new s,this._paths.push(e)),this._pathLength++,this._curPath=e,e},_addPoint:function(t,e,i){var n=this._curPath;if(n){var s,a=this._points,o=n.points;(s=a[this._pointsOffset++])?(s.x=t,s.y=e):(s=new r(t,e),a.push(s)),s.flags=i,o.push(s)}}}),cc.Graphics._Impl=a,e.exports=a}),{"../../../../graphics/helper":145,"../../../../graphics/types":147}],190:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(t("../../../assembler")),r=s(t("../../../../../renderer/core/input-assembler"));function s(t){return t&&t.__esModule?t:{default:t}}var a=t("../../mesh-buffer"),o=t("../../../index"),c=t("../../../../graphics/graphics"),l=t("../../../../graphics/types").PointFlags,h=c.LineJoin,u=c.LineCap,f=t("./earcut");t("./impl");var d=Math.PI,_=Math.min,p=Math.max,v=Math.ceil,g=Math.acos,m=Math.cos,y=Math.sin,E=Math.atan2;function T(t,e,i){return ti?i:t}var A=cc.gfx,x=new A.VertexFormat([{name:A.ATTR_POSITION,type:A.ATTR_TYPE_FLOAT32,num:2},{name:A.ATTR_COLOR,type:A.ATTR_TYPE_UINT8,num:4,normalize:!0},{name:"a_dist",type:A.ATTR_TYPE_FLOAT32,num:1}]);x.name="vfmtPosColorSdf";var C=(function(t){var e,i;function n(e){var i;return(i=t.call(this,e)||this)._buffer=null,i._buffers=[],i._bufferOffset=0,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=n.prototype;return s.getVfmt=function(){return x},s.getVfmtFloatCount=function(){return 4},s.requestBuffer=function(){var t={indiceStart:0,vertexStart:0},e=new a(o._handle,this.getVfmt());t.meshbuffer=e;var i=new r.default(e._vb,e._ib);return t.ia=i,this._buffers.push(t),t},s.getBuffers=function(){return 0===this._buffers.length&&this.requestBuffer(),this._buffers},s.clear=function(t){this._bufferOffset=0;var e=this._buffers;if(t){for(var i=0,n=e.length;i65535||3*s>131070)&&(++this._bufferOffset,s=e,this._bufferOffsetr.vertexOffset&&r.requestStatic(e,3*e),this._buffer=n,n},s.stroke=function(t){this._curColor=t._strokeColor._val,this._flattenPaths(t._impl),this._expandStroke(t),t._impl._updatePathOffset=!0},s.fill=function(t){this._curColor=t._fillColor._val,this._expandFill(t),t._impl._updatePathOffset=!0},s._expandStroke=function(t){var e,i,n,r,s=.5*t.lineWidth,a=t.lineCap,o=t.lineJoin,c=t.miterLimit,f=t._impl,_=(e=s,i=d,n=f._tessTol,r=2*g(e/(e+n)),p(2,v(i/r)));this._calculateJoins(f,s,o,c);for(var m=f._paths,y=0,E=f._pathOffset,T=f._pathLength;E0&&(r=1/e);for(var s=t._paths,a=t._pathOffset,o=t._pathLength;a1e-6){var C=1/m;C>600&&(C=600),v.dmx*=C,v.dmy*=C}v.dx*d.dy-d.dx*v.dy>0&&(v.flags|=l.PT_LEFT),m*(y=p(11,_(d.len,v.len)*r))*y<1&&(v.flags|=l.PT_INNERBEVEL);var b=v.dmx*e,S=v.dmy*e,w=b*b+S*S;(w>v.len*v.len||w>d.len*d.len)&&(v.flags|=l.PT_INNERBEVEL),v.flags&l.PT_CORNER&&(m*n*n<1||i===h.BEVEL||i===h.ROUND)&&(v.flags|=l.PT_BEVEL),0!=(v.flags&(l.PT_BEVEL|l.PT_INNERBEVEL))&&c.nbevel++,d=v,v=u[g+1]}}},s._flattenPaths=function(t){for(var e=t._paths,i=t._pathOffset,n=t._pathLength;i2&&a.equals(o)&&(r.closed=!0,s.pop(),a=s[s.length-1]);for(var c=0,l=s.length;cx&&(C-=2*d),this._vset(_,p,1),this._vset(h-s*n,e.y-a*n,-1);for(var b=T(v((x-C)/d)*r,2,r),S=0;S "+n+"/"+i+".")},e._updateCfgFlag=function(t){var e=this._cfgFields.updateFlags;this._setBufferFlag(this._cfg,e.offset,e.size,e.type,t)},e._setBufferValue=function(t,e,i,n,r){"float"==n&&4==i?t.setFloat32(e,r,jsb.__isLittleEndian__):"int32"==n&&4==i?t.setInt32(e,r,jsb.__isLittleEndian__):"bool"==n&&1==i?t.setInt8(e,r?1:0,jsb.__isLittleEndian__):"Color4B"==n&&4==i?(t.setUint8(e,r.r),t.setUint8(e+1,r.g),t.setUint8(e+2,r.b),t.setUint8(e+3,r.a)):"int8"==n&&1==i?t.setUint8(e,r):cc.warn("dont know how to set value to buffer, type/size -> "+n+"/"+i+".")},e._setFieldValue=function(t,e,i,n){var r=e[i];this._setBufferValue(t,r.offset,r.size,r.type,n)},e._getBufferValue=function(t,e,i,n){return"float"==n&&4==i?t.getFloat32(e,jsb.__isLittleEndian__):"int32"==n&&4==i?t.getInt32(e,jsb.__isLittleEndian__):"bool"==n&&1==i?0!=t.getInt8(e,jsb.__isLittleEndian__):"Color4B"==n&&4==i?{r:t.getUint8(e),g:t.getUint8(e+1),b:t.getUint8(e+2),a:t.getUint8(e+3)}:"int8"==n&&1==i?t.getUint8(e):void cc.warn("dont know how to get value from buffer, type/size -> "+n+"/"+i+".")},e._getFieldValue=function(t,e,i){var n=e[i];return this._getBufferValue(t,n.offset,n.size,n.type)},e._getLayoutValue=function(t){return this._getFieldValue(this._layoutInfo,this._layoutFields,t)},e._setLayoutValue=function(t,e){return this._setFieldValue(this._layoutInfo,this._layoutFields,t,e)},e._updateCfgFlag_Content=function(){this._updateCfgFlag(1)},e._updateCfgFlag_Font=function(){this._updateCfgFlag(2)},e._colorEqual=function(t,e){return t.r==e.r&&t.g==e.g&&t.b==e.b&&t.a==e.a},e._colorToObj=function(t,e,i,n){return{r:t,g:e,b:i,a:n}},e.setString=function(t){t!=this._layout.string&&(this._layout.string=t,this._updateCfgFlag_Content())},e.setFontPath=function(t){t!=this._layout.fontPath&&(this._layout.fontPath=t,this._updateCfgFlag_Font())},e.setFontSize=function(t,e){this._getFieldValue(this._cfg,this._cfgFields,"fontSize")!=t&&(this._setFieldValue(this._cfg,this._cfgFields,"fontSize",t),this._setFieldValue(this._cfg,this._cfgFields,"fontSizeRetina",e),this._updateCfgFlag_Font())},e.setOutline=function(t){var e=this._getLayoutValue("outlineSize");e>0!=t>0&&this._updateCfgFlag_Font(),e!=t&&(this._updateCfgFlag_Content(),this._setLayoutValue("outlineSize",t))},e.setOutlineColor=function(t){var e=this._getLayoutValue("outlineColor");this._colorEqual(e,t)||(this._setLayoutValue("outlineColor",t),this._updateCfgFlag_Content())},e.setLineHeight=function(t){this._getLayoutValue("lineHeight")!=t&&(this._setLayoutValue("lineHeight",t),this._updateCfgFlag_Content())},e.setOverFlow=function(t){this._getLayoutValue("overflow")!=t&&(this._setLayoutValue("overflow",t),this._updateCfgFlag_Content())},e.setEnableWrap=function(t){this._getLayoutValue("wrap")!=t&&(this._setLayoutValue("wrap",t),this._updateCfgFlag_Content())},e.setVerticalAlign=function(t){this._getLayoutValue("valign")!=t&&(this._setLayoutValue("valign",t),this._updateCfgFlag_Content())},e.setHorizontalAlign=function(t){this._getLayoutValue("halign")!=t&&(this._setLayoutValue("halign",t),this._updateCfgFlag_Content())},e.setContentSize=function(t,e){var i=this._getLayoutValue("width"),n=this._getLayoutValue("height");i==t&&n==e||(this._setLayoutValue("height",e),this._setLayoutValue("width",t),this._updateCfgFlag_Content())},e.setAnchorPoint=function(t,e){var i=this._getLayoutValue("anchorX"),n=this._getLayoutValue("anchorY");i==t&&n==e||(this._setLayoutValue("anchorX",t),this._setLayoutValue("anchorY",e),this._updateCfgFlag_Content())},e.setColor=function(t){var e=this._getLayoutValue("color");this._colorEqual(e,t)||(this._setLayoutValue("color",t),this._updateCfgFlag_Content())},e.setShadow=function(t,e,i){var n=this._getLayoutValue("shadowBlur"),r=this._getLayoutValue("shadowX"),s=this._getLayoutValue("shadowY");n>0!=i>0&&this._updateCfgFlag_Font();var a=!1;n!=i&&(this._setLayoutValue("shadowBlur",i),a=!0),r!=t&&(this._setLayoutValue("shadowX",t),a=!0),s!=e&&(this._setLayoutValue("shadowY",e),a=!0),a&&this._updateCfgFlag_Content()},e.setShadowColor=function(t){var e=this._getLayoutValue("shadowColor");this._colorEqual(e,t)||(this._setLayoutValue("shadowColor",t),this._updateCfgFlag_Content())},e.setItalic=function(t){this._getLayoutValue("italic")!=t&&(this._setLayoutValue("italic",t),this._updateCfgFlag_Content())},e.setBold=function(t){this._getLayoutValue("bold")!=t&&(this._setLayoutValue("bold",t),this._updateCfgFlag_Content(),this._updateCfgFlag_Font())},e.setUnderline=function(t){this._getLayoutValue("underline")!=t&&(this._setLayoutValue("underline",t),this._updateCfgFlag_Content())},e.setSpacingX=function(t){this._getLayoutValue("spaceX")==t||"number"!=typeof t||isNaN(t)||(this._setLayoutValue("spaceX",t),this._updateCfgFlag_Content())},e.updateRenderData=function(t){if(t._vertsDirty){t.font&&t.font.nativeUrl&&this.setFontPath(cc.assetManager.cacheManager.getCache(t.font.nativeUrl)||t.font.nativeUrl);var e=this._layout,i=t.node.color,n=t.node,r=t.fontSize;this.setString(t.string),this.setFontSize(t.fontSize,r/72*t.fontSize),this.setLineHeight(t.lineHeight),this.setEnableWrap(t.enableWrapText),this.setItalic(t.enableItalic),this.setUnderline(t.enableUnderline),this.setBold(t.enableBold),this.setOverFlow(t.overflow),this.setVerticalAlign(t.verticalAlign),this.setHorizontalAlign(t.horizontalAlign),this.setSpacingX(t.spacingX),this.setContentSize(n.getContentSize().width,n.getContentSize().height),this.setAnchorPoint(n.anchorX,n.anchorY),this.setColor(this._colorToObj(i.getR(),i.getG(),i.getB(),Math.ceil(i.getA()*n.opacity/255)));var s=n.getComponent(cc.LabelShadow);if(s&&s.enabled){var a=s.color;this.setShadow(s.offset.x,s.offset.y,s.blur),this.setShadowColor(this._colorToObj(a.getR(),a.getG(),a.getB(),Math.ceil(a.getA()*n.opacity/255)))}else this.setShadow(0,0,-1);this._updateTTFMaterial(t),e.render()}},e._bindMaterial=function(t){var e=this.labelMaterial;return e||(e=r.default.createWithBuiltin("2d-label",t),this.labelMaterial=e),e},e._updateTTFMaterial=function(t){var e=this._bindMaterial(t),i=this._label.node,n=this._layout,r=i.getComponent(cc.LabelOutline),s=0;if(r&&r.enabled&&r.width>0){s=Math.max(Math.min(r.width/10,.4),.1);var a=r.color;this.setOutlineColor(this._colorToObj(a.getR(),a.getG(),a.getB(),Math.ceil(a.getA()*i.opacity/255)))}this.setOutline(s),e.define("CC_USE_MODEL",!0),e.define("USE_TEXTURE_ALPHAONLY",!0),e.define("USE_SDF",s>0||t.enableBold),e.define("USE_SDF_EXTEND",t.enableBold?1:0),void 0!==e.getDefine("CC_SUPPORT_standard_derivatives")&&cc.sys.glExtension("OES_standard_derivatives")&&e.define("CC_SUPPORT_standard_derivatives",!0),n.setEffect(e.effect._nativeObj)},e.fillBuffers=function(){this._layout.render()},e.getVfmt=function(){},t})();i.default=s,e.exports=i.default}),{"../../../../../assets/material/CCMaterial":80,"../../../../../assets/material/material-variant":87,"../../../../../components/CCLabel":107,"../../../../../components/CCLabelOutline":108,"../../../../../components/CCLabelShadow":109}],195:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../../../../utils/label/ttf"))&&n.__esModule?n:{default:n},s=t("../../../../../components/CCLabelShadow"),a=cc.color(255,255,255,255),o=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.updateUVs=function(t){for(var e=this._renderData.vDatas[0],i=t._frame.uv,n=this.uvOffset,r=this.floatsPerVert,s=0;s<4;s++){var a=2*s,o=r*s+n;e[o]=i[a],e[o+1]=i[a+1]}},r.updateColor=function(e){a._fastSetA(e.node._color.a);var i=a._val;t.prototype.updateColor.call(this,e,i)},r.updateVerts=function(t){var e=t.node,i=t._ttfTexture.width,n=t._ttfTexture.height,r=e.anchorX*e.width,a=e.anchorY*e.height,o=s&&t.getComponent(s);if(o&&o._enabled){var c=(i-e.width)/2,l=(n-e.height)/2,h=o.offset;-h.x>c?r+=i-e.width:c>h.x&&(r+=c-h.x),-h.y>l?a+=n-e.height:l>h.y&&(a+=l-h.y)}var u=this._local;u[0]=-r,u[1]=-a,u[2]=i-r,u[3]=n-a,this.updateUVs(t),this.updateWorldVerts(t)},n})(r.default);i.default=o,e.exports=i.default}),{"../../../../../components/CCLabelShadow":109,"../../../../utils/label/ttf":186}],196:[(function(t){"use strict";var e=l(t("../../../assembler")),i=l(t("../../../../components/CCLabel")),n=l(t("./2d/ttf")),r=l(t("./2d/bmfont")),s=l(t("./2d/letter")),a=l(t("./3d/ttf")),o=l(t("./3d/bmfont")),c=l(t("./3d/letter"));function l(t){return t&&t.__esModule?t:{default:t}}i.default._canvasPool={pool:[],get:function(){var t=this.pool.pop();if(!t){var e=document.createElement("canvas"),i=e.getContext("2d");t={canvas:e,context:i},i.textBaseline="alphabetic"}return t},put:function(t){this.pool.length>=32||this.pool.push(t)}},e.default.register(cc.Label,{getConstructor:function(t){var e=t.node.is3DNode,l=e?a.default:n.default;return t.font instanceof cc.BitmapFont?l=e?o.default:r.default:t.cacheMode===i.default.CacheMode.CHAR&&(cc.sys.platform===cc.sys.WECHAT_GAME_SUB?cc.warn("sorry, subdomain does not support CHAR mode currently!"):l=e?c.default:s.default),l},TTF:n.default,Bmfont:r.default,Letter:s.default,TTF3D:a.default,Bmfont3D:o.default,Letter3D:c.default,NativeTTF:void 0})}),{"../../../../components/CCLabel":107,"../../../assembler":178,"./2d/bmfont":192,"./2d/letter":193,"./2d/nativeTTF":194,"./2d/ttf":195,"./3d/bmfont":void 0,"./3d/letter":void 0,"./3d/ttf":void 0}],197:[(function(t,e,i){"use strict";i.__esModule=!0,i.MaskAssembler=void 0;var n,r=(n=t("../../assembler"))&&n.__esModule?n:{default:n},s=t("../../../components/CCMask"),a=t("../../render-flow"),o=t("./sprite/2d/simple"),c=t("./graphics"),l=t("../../../../renderer/gfx"),h=t("../vertex-format").vfmtPos,u=8,f=[];function d(){return 1<u&&cc.errorID(9e3,u),f.push(t)}function g(t,e){0===f.length&&cc.errorID(9001),f.pop(),0===f.length?e._flushMaterial(t._exitMaterial):E(e)}function m(t,e){var i=l.DS_FUNC_NEVER,n=d(),r=n,s=n,a=t.inverted?l.STENCIL_OP_REPLACE:l.STENCIL_OP_ZERO;p(t._clearMaterial,i,a,n,r,s);var o=e.getBuffer("mesh",h),c=o.request(4,6),u=c.indiceOffset,f=c.byteOffset>>2,_=c.vertexOffset,v=o._vData,g=o._iData;v[f++]=-1,v[f++]=-1,v[f++]=-1,v[f++]=1,v[f++]=1,v[f++]=1,v[f++]=1,v[f++]=-1,g[u++]=_,g[u++]=_+3,g[u++]=_+1,g[u++]=_+1,g[u++]=_+3,g[u++]=_+2,e.node=e._dummyNode,e.material=t._clearMaterial,e._flush()}function y(t,e){var i=l.DS_FUNC_NEVER,n=d(),r=n,a=n,h=t.inverted?l.STENCIL_OP_ZERO:l.STENCIL_OP_REPLACE;p(t._materials[0],i,h,n,r,a),e.material=t._materials[0],t._type===s.Type.IMAGE_STENCIL?(e.node=e._dummyNode,o.prototype.fillBuffers.call(t._assembler,t,e),e._flush()):(e.node=t.node,c.prototype.fillBuffers.call(t._graphics._assembler,t._graphics,e))}function E(t){var e=l.DS_FUNC_EQUAL,i=l.STENCIL_OP_KEEP,n=_(),r=n,s=d(),a=f[f.length-1];p(a._enableMaterial,e,i,n,r,s),t._flushMaterial(a._enableMaterial)}var T=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.updateRenderData=function(t){t._type===s.Type.IMAGE_STENCIL?t.spriteFrame?o.prototype.updateRenderData.call(this,t):t.setMaterial(0,null):(t._graphics.setMaterial(0,t._materials[0]),c.prototype.updateRenderData.call(t._graphics._assembler,t._graphics,t._graphics))},r.fillBuffers=function(t,e){(t._type!==s.Type.IMAGE_STENCIL||t.spriteFrame)&&(v(t),m(t,e),y(t,e),E(e)),t.node._renderFlag|=a.FLAG_UPDATE_RENDER_DATA},r.postFillBuffers=function(t,e){(t._type!==s.Type.IMAGE_STENCIL||t.spriteFrame)&&g(t,e),t.node._renderFlag|=a.FLAG_UPDATE_RENDER_DATA},n})(o);i.MaskAssembler=T,r.default.register(s,T)}),{"../../../../renderer/gfx":269,"../../../components/CCMask":111,"../../assembler":178,"../../render-flow":182,"../vertex-format":211,"./graphics":190,"./sprite/2d/simple":201}],198:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../../../../assembler-2d"))&&n.__esModule?n:{default:n},s=t("../../../../../components/CCSprite").FillType,a=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.updateRenderData=function(t){var e=t._spriteFrame;if(this.packToDynamicAtlas(t,e),t._vertsDirty){var i=t._fillStart,n=t._fillRange;n<0&&(i+=n,n=-n),n=(n=(n=i+n)>1?1:n)<0?0:n;var r=(i=(i=i>1?1:i)<0?0:i)+(n=(n-=i)<0?0:n);r=r>1?1:r,this.updateUVs(t,i,r),this.updateVerts(t,i,r),t._vertsDirty=!1}},r.updateUVs=function(t,e,i){var n,r,a,o,c,l,h,u,f,d,_=t._spriteFrame,p=_._texture.width,v=_._texture.height,g=_._rect;_._rotated?(n=g.x/p,r=(g.y+g.width)/v,a=c=n,h=f=(g.x+g.height)/p,l=d=r,o=u=g.y/v):(n=g.x/p,r=(g.y+g.height)/v,a=h=n,c=f=(g.x+g.width)/p,o=l=r,u=d=g.y/v);var m=this._renderData.vDatas[0],y=this.uvOffset,E=this.floatsPerVert;switch(t._fillType){case s.HORIZONTAL:m[y]=a+(c-a)*e,m[y+1]=o+(l-o)*e,m[y+E]=a+(c-a)*i,m[y+E+1]=o+(l-o)*i,m[y+2*E]=h+(f-h)*e,m[y+2*E+1]=u+(d-u)*e,m[y+3*E]=h+(f-h)*i,m[y+3*E+1]=u+(d-u)*i;break;case s.VERTICAL:m[y]=a+(h-a)*e,m[y+1]=o+(u-o)*e,m[y+E]=c+(f-c)*e,m[y+E+1]=l+(d-l)*e,m[y+2*E]=a+(h-a)*i,m[y+2*E+1]=o+(u-o)*i,m[y+3*E]=c+(f-c)*i,m[y+3*E+1]=l+(d-l)*i;break;default:cc.errorID(2626)}},r.updateVerts=function(t,e,i){var n,r=t.node,a=r.width,o=r.height,c=r.anchorX*a,l=r.anchorY*o,h=-c,u=-l,f=a-c,d=o-l;switch(t._fillType){case s.HORIZONTAL:n=h+(f-h)*i,h+=(f-h)*e,f=n;break;case s.VERTICAL:n=u+(d-u)*i,u+=(d-u)*e,d=n;break;default:cc.errorID(2626)}var _=this._local;_[0]=h,_[1]=u,_[2]=f,_[3]=d,this.updateWorldVerts(t)},n})(r.default);i.default=a,e.exports=i.default}),{"../../../../../components/CCSprite":117,"../../../../assembler-2d":176}],199:[(function(t,e,i){"use strict";var n;i.__esModule=!0,i.default=void 0;var r=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.initData=function(){this._renderData.createFlexData(0,4,6,this.getVfmt())},r.updateRenderData=function(t){this.packToDynamicAtlas(t,t._spriteFrame);var e=t.spriteFrame;if(e){var i=e.vertices;if(i){this.verticesCount=i.x.length,this.indicesCount=i.triangles.length;var n=this._renderData._flexBuffer;n.reserve(this.verticesCount,this.indicesCount)&&(this.updateColor(t),t._vertsDirty=!0),n.used(this.verticesCount,this.indicesCount),this.updateIndices(i.triangles),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),this.updateWorldVerts(t),t._vertsDirty=!1)}}},r.updateIndices=function(t){this._renderData.iDatas[0].set(t)},r.updateUVs=function(t){for(var e=t.spriteFrame.vertices,i=e.nu,n=e.nv,r=this.uvOffset,s=this.floatsPerVert,a=this._renderData.vDatas[0],o=0;o0){var u=r.y+o*(t-r.x);a[0].x=t,a[0].y=u}if((e-r.x)*h>0){var f=r.y+o*(e-r.x);a[2].x=e,a[2].y=f}}if(0!==Math.sin(s)){if(c=h/l,(n-r.y)*l>0){var d=r.x+c*(n-r.y);a[3].x=d,a[3].y=n}if((i-r.y)*l>0){var _=r.x+c*(i-r.y);a[1].x=_,a[1].y=i}}}function _(t){var e=t.node,i=e.width,n=e.height,r=e.anchorX*i,s=e.anchorY*n,c=-r,l=-s,h=i-r,d=n-s,_=o;_[0]=c,_[1]=l,_[2]=h,_[3]=d;var p=t._fillCenter,v=u.x=Math.min(Math.max(0,p.x),1)*(h-c)+c,g=u.y=Math.min(Math.max(0,p.y),1)*(d-l)+l;a[0].x=a[3].x=c,a[1].x=a[2].x=h,a[0].y=a[1].y=l,a[2].y=a[3].y=d,f.length=0,v!==_[0]&&(f[0]=[3,0]),v!==_[2]&&(f[2]=[1,2]),g!==_[1]&&(f[1]=[0,1]),g!==_[3]&&(f[3]=[2,3])}function p(t,e){var i,n;if(i=e.x-t.x,n=e.y-t.y,0!==i||0!==n){if(0===i)return n>0?.5*Math.PI:1.5*Math.PI;var r=Math.atan(n/i);return i<0&&(r+=Math.PI),r}}var v=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.initData=function(){this._renderData.createFlexData(0,4,6,this.getVfmt()),this.updateIndices()},r.updateRenderData=function(e){t.prototype.updateRenderData.call(this,e);var i,n,r,a,f,p,v,g,m,y=e.spriteFrame;if(this.packToDynamicAtlas(e,y),e._vertsDirty){var E=e._fillStart,T=e._fillRange;for(T<0&&(E+=T,T=-T);E>=1;)E-=1;for(;E<0;)E+=1;E*=s,T*=s,_(e),p=(i=y)._texture.width,v=i._texture.height,g=i._rect,m=c,i._rotated?(n=g.x/p,r=(g.x+g.height)/p,a=g.y/v,f=(g.y+g.width)/v,m[0]=m[2]=n,m[4]=m[6]=r,m[3]=m[7]=f,m[1]=m[5]=a):(n=g.x/p,r=(g.x+g.width)/p,a=g.y/v,f=(g.y+g.height)/v,m[0]=m[4]=n,m[2]=m[6]=r,m[1]=m[3]=f,m[5]=m[7]=a),d(o[0],o[2],o[1],o[3],u,E,l),d(o[0],o[2],o[1],o[3],u,E+T,h),this.updateVerts(e,E,T),e._vertsDirty=!1}},r.updateVerts=function(t,e,i){var n=e+i,r=this._local;r.length=0;for(var o=0,c=3*this.floatsPerVert,d=0;d<4;++d){var _=f[d];if(_)if(i>=s)r.length=o+c,this._generateTriangle(r,o,u,a[_[0]],a[_[1]]),o+=c;else{var v=p(u,a[_[0]]),g=p(u,a[_[1]]);g=n||(v>=e?(r.length=o+c,g>=n?this._generateTriangle(r,o,u,a[_[0]],h[d]):this._generateTriangle(r,o,u,a[_[0]],a[_[1]]),o+=c):g<=e||(g<=n?(r.length=o+c,this._generateTriangle(r,o,u,l[d],a[_[1]]),o+=c):(r.length=o+c,this._generateTriangle(r,o,u,l[d],h[d]),o+=c))),v+=s,g+=s}}this.allocWorldVerts(t),this.updateWorldVerts(t)},r.allocWorldVerts=function(t){var e=t.node._color._val,i=this._renderData,n=this.floatsPerVert,r=this._local,s=r.length/n;this.verticesCount=this.indicesCount=s;var a=i._flexBuffer;a.reserve(s,s)&&this.updateIndices(),a.used(this.verticesCount,this.indicesCount);for(var o=i.vDatas[0],c=i.uintVDatas[0],l=this.uvOffset,h=0;h0)){this._renderData.createData(0,this.verticesFloats,this.indicesCount);for(var t=this._renderData.iDatas[0],e=0,i=0;i<3;++i)for(var n=0;n<3;++n){var r=4*i+n;t[e++]=r,t[e++]=r+1,t[e++]=r+4,t[e++]=r+1,t[e++]=r+5,t[e++]=r+4}}},r.initLocal=function(){this._local=[],this._local.length=8},r.updateRenderData=function(t){var e=t._spriteFrame;this.packToDynamicAtlas(t,e),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),t._vertsDirty=!1)},r.updateVerts=function(t){var e=t.node,i=e.width,n=e.height,r=e.anchorX*i,s=e.anchorY*n,a=t.spriteFrame,o=a.insetLeft,c=a.insetRight,l=a.insetTop,h=a.insetBottom,u=i-o-c,f=n-l-h,d=i/(o+c),_=n/(l+h);d=isNaN(d)||d>1?1:d,_=isNaN(_)||_>1?1:_,u=u<0?0:u,f=f<0?0:f;var p=this._local;p[0]=-r,p[1]=-s,p[2]=o*d-r,p[3]=h*_-s,p[4]=p[2]+u,p[5]=p[3]+f,p[6]=i-r,p[7]=n-s,this.updateWorldVerts(t)},r.updateUVs=function(t){for(var e=this._renderData.vDatas[0],i=t.spriteFrame.uvSliced,n=this.uvOffset,r=this.floatsPerVert,s=0;s<4;++s)for(var a=0;a<4;++a){var o=4*s+a,c=i[o],l=o*r;e[l+n]=c.u,e[l+n+1]=c.v}},r.updateWorldVerts=function(t){for(var e=t.node._worldMatrix.m,i=e[0],n=e[1],r=e[4],s=e[5],a=e[12],o=e[13],c=this._local,l=this._renderData.vDatas[0],h=this.floatsPerVert,u=0;u<4;++u)for(var f=c[2*u+1],d=0;d<4;++d){var _=c[2*d],p=(4*u+d)*h;l[p]=_*i+f*r+a,l[p+1]=_*n+f*s+o}},n})(((n=t("../../../../assembler-2d"))&&n.__esModule?n:{default:n}).default);i.default=r,Object.assign(r.prototype,{verticesCount:16,indicesCount:54}),e.exports=i.default}),{"../../../../assembler-2d":176}],203:[(function(t,e,i){"use strict";var n;i.__esModule=!0,i.default=void 0;var r=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.initData=function(){this.verticesCount=0,this.contentWidth=0,this.contentHeight=0,this.rectWidth=0,this.rectHeight=0,this.hRepeat=0,this.vRepeat=0,this.row=0,this.col=0,this._renderData.createFlexData(0,4,6,this.getVfmt()),this._updateIndices()},r.initLocal=function(){this._local={x:[],y:[]}},r._updateIndices=function(){for(var t=this._renderData.iDatas[0],e=0,i=0,n=t.length;e0?this.sizableWidth:0,this.sizableHeight=this.sizableHeight>0?this.sizableHeight:0;var f=this.hRepeat=0===c?this.sizableWidth:this.sizableWidth/c,d=this.vRepeat=0===u?this.sizableHeight:this.sizableHeight/u,_=(this.row=Math.ceil(d+2))*(this.col=Math.ceil(f+2));this.verticesCount=4*_,this.indicesCount=6*_;var p=this._renderData._flexBuffer;p.reserve(this.verticesCount,this.indicesCount)&&(this._updateIndices(),this.updateColor(t)),p.used(this.verticesCount,this.indicesCount),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),t._vertsDirty=!1)},r.updateVerts=function(t){var e=t._spriteFrame,i=e._rect,n=t.node,r=n.anchorX*n.width,s=n.anchorY*n.height,a=this.row,o=this.col,c=this.contentWidth,l=this.contentHeight,h=this._local,u=h.x,f=h.y;u.length=f.length=0;var d,_,p=e.insetLeft,v=e.insetRight,g=i.width-p-v,m=e.insetTop,y=e.insetBottom,E=i.height-m-y,T=n.width/(p+v)>1?1:n.width/(p+v),A=n.height/(m+y)>1?1:n.height/(m+y);d=g>0?Math.floor(1e3*this.sizableWidth)/1e3%g==0?g:this.sizableWidth%g:this.sizableWidth,_=E>0?Math.floor(1e3*this.sizableHeight)/1e3%E==0?E:this.sizableHeight%E:this.sizableHeight;for(var x=0;x<=o;x++)0===x?u[x]=-r:x>0&&x0?x===o-1?p+d+g*(x-2)-r:p+Math.min(g,this.sizableWidth)+g*(x-2)-r:p+this.sizableWidth-r:x===o&&(u[x]=Math.min(p+this.sizableWidth+v,c)-r);for(var C=0;C<=a;C++)0===C?f[C]=-s:C>0&&C0?C===a-1?y+_+(C-2)*E-s:y+Math.min(E,this.sizableHeight)+(C-2)*E-s:y+this.sizableHeight-s:C===a&&(f[C]=Math.min(y+this.sizableHeight+m,l)-s);this.updateWorldVerts(t)},r.updateWorldVerts=function(t){for(var e,i,n,r,s=this._renderData,a=this._local,o=a.x,c=a.y,l=s.vDatas[0],h=this.row,u=this.col,f=t.node._worldMatrix.m,d=f[0],_=f[1],p=f[4],v=f[5],g=f[12],m=f[13],y=this.floatsPerVert,E=0,T=0,A=h;Tl?this.sizableHeight>=x*l?1:d%1:d;for(var b=0,S=u;ba?this.sizableWidth>=b*a?1:f%1:f,m?(0===x?(T[0]=g[0].u,T[1]=g[0].u,T[2]=g[4].u+(g[8].u-g[4].u)*p):x>2,n=this.vData.length,r=!1;if(i>n){for(;ns){for(;s>2,this._handler.updateMeshRange(t,e)},e.reset=function(){var t=this._initVerticesCount*this._verticesBytes>>2;this._reallocVData(t),this._reallocIData(this._initIndicesCount),this.usedVertices=0,this.usedVerticesFloats=0,this.usedIndices=0},t})();i.default=n,cc.FlexBuffer=n,e.exports=i.default}),{}],206:[(function(t,e){"use strict";var i,n=(i=t("../../../renderer/gfx"))&&i.__esModule?i:{default:i},r=(cc.sys.os===cc.sys.OS_IOS||cc.sys.os===cc.sys.MACOS)&&cc.sys.isBrowser&&/(OS 1[4-9])|(Version\/1[4-9])/.test(window.navigator.userAgent),s=cc.Class({name:"cc.MeshBuffer",ctor:function(t,e){this.init(t,e)},init:function(t,e){this.byteOffset=0,this.indiceOffset=0,this.vertexOffset=0,this.indiceStart=0,this._dirty=!1,this._vertexFormat=e,this._vertexBytes=this._vertexFormat._bytes,this._arrOffset=0,this._vbArr=[],this._vb=new n.default.VertexBuffer(t._device,e,n.default.USAGE_DYNAMIC,new ArrayBuffer,0),this._vbArr[0]=this._vb,this._ibArr=[],this._ib=new n.default.IndexBuffer(t._device,n.default.INDEX_FMT_UINT16,n.default.USAGE_STATIC,new ArrayBuffer,0),this._ibArr[0]=this._ib,this._vData=null,this._uintVData=null,this._iData=null,this._batcher=t,this._initVDataCount=256*e._bytes,this._initIDataCount=1536,this._offsetInfo={byteOffset:0,vertexOffset:0,indiceOffset:0},this._reallocBuffer()},uploadData:function(){if(0!==this.byteOffset&&this._dirty){var t=new Float32Array(this._vData.buffer,0,this.byteOffset>>2),e=new Uint16Array(this._iData.buffer,0,this.indiceOffset);this._vb.update(0,t),this._ib.update(0,e),this._dirty=!1}},switchBuffer:function(){var t=++this._arrOffset;this.byteOffset=0,this.vertexOffset=0,this.indiceOffset=0,this.indiceStart=0,t65535&&(this.uploadData(),this._batcher._flush(),this.switchBuffer())},requestStatic:function(t,e){this.checkAndSwitchBuffer(t);var i=this.byteOffset+t*this._vertexBytes,n=this.indiceOffset+e,r=this._vData.byteLength,s=this._iData.length;if(i>r||n>s){for(;r65535&&(this.uploadData(),this._batcher._flush())},s.prototype.forwardIndiceStartToOffset=function(){this.uploadData(),this.switchBuffer()}),cc.MeshBuffer=e.exports=s}),{"../../../renderer/gfx":269}],207:[(function(t,e){"use strict";var i=s(t("../../../renderer/core/input-assembler")),n=s(t("../../../renderer/memop/recycle-pool")),r=s(t("../../../renderer/scene/model"));function s(t){return t&&t.__esModule?t:{default:t}}var a=t("./vertex-format"),o=a.vfmtPosUvColor,c=a.vfmt3D,l=t("./quad-buffer"),h=t("./mesh-buffer"),u=t("./spine-buffer"),f=t("../../assets/material/CCMaterial"),d=(new(t("../../platform/id-generater"))("VertextFormat"),{}),_=new f,p=new i.default;p._count=0;var v=function(t,e){this._renderScene=e,this._device=t,this.walking=!1,this.material=_,this.cullingMask=1,this._iaPool=new n.default(function(){return new i.default},16),this._modelPool=new n.default(function(){return new r.default},16),this._quadBuffer=this.getBuffer("quad",o),this._meshBuffer=this.getBuffer("mesh",o),this._quadBuffer3D=this.getBuffer("quad",c),this._meshBuffer3D=this.getBuffer("mesh",c),this._buffer=this._meshBuffer,this._batchedModels=[],this._dummyNode=new cc.Node,this._sortKey=0,this.node=this._dummyNode,this.parentOpacity=1,this.parentOpacityDirty=0,this.worldMatDirty=0};v.prototype={constructor:v,reset:function(){this._iaPool.reset();for(var t=this._renderScene,e=this._batchedModels,i=0;i>2);this._vb.update(0,t),this._dirty=!1}},switchBuffer:function(){this._super();var t=new Uint16Array(this._iData.buffer,0,this._initIDataCount);this._ib.update(0,t)},_reallocBuffer:function(){this._reallocVData(!0),this._reallocIData(),this._fillQuadBuffer()}});cc.QuadBuffer=e.exports=n}),{"./mesh-buffer":206}],209:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=a;var n,r=(n=t("./flex-buffer"))&&n.__esModule?n:{default:n},s=t("./vertex-format");function a(){this.vDatas=[],this.uintVDatas=[],this.iDatas=[],this.meshCount=0,this._infos=null,this._flexBuffer=null}cc.js.mixin(a.prototype,{init:function(){},clear:function(){this.vDatas.length=0,this.iDatas.length=0,this.uintVDatas.length=0,this.meshCount=0,this._infos=null,this._flexBuffer&&this._flexBuffer.reset()},updateMesh:function(t,e,i){this.vDatas[t]=e,this.uintVDatas[t]=new Uint32Array(e.buffer,0,e.length),this.iDatas[t]=i,this.meshCount=this.vDatas.length},updateMeshRange:function(){},createData:function(t,e,i){var n=new Float32Array(e),r=new Uint16Array(i);this.updateMesh(t,n,r)},createQuadData:function(t,e,i){this.createData(t,e,i),this.initQuadIndices(this.iDatas[t])},createFlexData:function(t,e,i,n){n=n||s.vfmtPosUvColor,this._flexBuffer=new r.default(this,t,e,i,n)},initQuadIndices:function(t){for(var e=t.length/6,i=0,n=0;ir||n>s){for(;r0&&(t=t.substring(0,i));var n=/(\/|\\)([^\/\\]+)$/g.exec(t.replace(/(\/|\\)$/,""));if(!n)return t;var r=n[2];return e&&t.substring(t.length-e.length).toLowerCase()===e.toLowerCase()?r.substring(0,r.length-e.length):r},dirname:function(t){var e=n.exec(t);return e?e[2]:""},changeExtname:function(t,e){e=e||"";var i=t.indexOf("?"),n="";return i>0&&(n=t.substring(i),t=t.substring(0,i)),(i=t.lastIndexOf("."))<0?t+e+n:t.substring(0,i)+e+n},changeBasename:function(t,e,i){if(0===e.indexOf("."))return this.changeExtname(t,e);var n=t.indexOf("?"),r="",s=i?this.extname(t):"";return n>0&&(r=t.substring(n),t=t.substring(0,n)),n=(n=t.lastIndexOf("/"))<=0?0:n+1,t.substring(0,n)+e+s+r},_normalize:function(t){var e=t=String(t);do{e=t,t=t.replace(r,"")}while(e.length!==t.length);return t},sep:cc.sys.os===cc.sys.OS_WINDOWS?"\\":"/",stripSep:function(t){return t.replace(/[\/\\]$/,"")}},e.exports=cc.path}),{"../platform/CCSys":159}],213:[(function(t,e){"use strict";var i=function(t,e,i,n,r,s){this.a=t,this.b=e,this.c=i,this.d=n,this.tx=r,this.ty=s};i.create=function(t,e,i,n,r,s){return{a:t,b:e,c:i,d:n,tx:r,ty:s}},i.identity=function(){return{a:1,b:0,c:0,d:1,tx:0,ty:0}},i.clone=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,tx:t.tx,ty:t.ty}},i.concat=function(t,e,i){var n=e.a,r=e.b,s=e.c,a=e.d,o=e.tx,c=e.ty;return t.a=n*i.a+r*i.c,t.b=n*i.b+r*i.d,t.c=s*i.a+a*i.c,t.d=s*i.b+a*i.d,t.tx=o*i.a+c*i.c+i.tx,t.ty=o*i.b+c*i.d+i.ty,t},i.invert=function(t,e){var i=e.a,n=e.b,r=e.c,s=e.d,a=1/(i*s-n*r),o=e.tx,c=e.ty;return t.a=a*s,t.b=-a*n,t.c=-a*r,t.d=a*i,t.tx=a*(r*c-s*o),t.ty=a*(n*o-i*c),t},i.fromMat4=function(t,e){var i=e.m;return t.a=i[0],t.b=i[1],t.c=i[4],t.d=i[5],t.tx=i[12],t.ty=i[13],t},i.transformVec2=function(t,e,i,n){var r,s;return void 0===n?(n=i,r=e.x,s=e.y):(r=e,s=i),t.x=n.a*r+n.c*s+n.tx,t.y=n.b*r+n.d*s+n.ty,t},i.transformSize=function(t,e,i){return t.width=i.a*e.width+i.c*e.height,t.height=i.b*e.width+i.d*e.height,t},i.transformRect=function(t,e,i){var n=e.x,r=e.y,s=n+e.width,a=r+e.height,o=i.a*n+i.c*r+i.tx,c=i.b*n+i.d*r+i.ty,l=i.a*s+i.c*r+i.tx,h=i.b*s+i.d*r+i.ty,u=i.a*n+i.c*a+i.tx,f=i.b*n+i.d*a+i.ty,d=i.a*s+i.c*a+i.tx,_=i.b*s+i.d*a+i.ty,p=Math.min(o,l,u,d),v=Math.max(o,l,u,d),g=Math.min(c,h,f,_),m=Math.max(c,h,f,_);return t.x=p,t.y=g,t.width=v-p,t.height=m-g,t},i.transformObb=function(t,e,i,n,r,s){var a=r.x,o=r.y,c=r.width,l=r.height,h=s.a*a+s.c*o+s.tx,u=s.b*a+s.d*o+s.ty,f=s.a*c,d=s.b*c,_=s.c*l,p=s.d*l;e.x=h,e.y=u,i.x=f+h,i.y=d+u,t.x=_+h,t.y=p+u,n.x=f+_+h,n.y=d+p+u},cc.AffineTransform=e.exports=i}),{}],214:[(function(t,e){"use strict";var i=t("../platform/CCObject").Flags,n=t("./misc"),r=t("../platform/js"),s=t("../platform/id-generater"),a=t("../event-manager"),o=t("../renderer/render-flow"),c=i.Destroying,l=i.DontDestroy,h=i.Deactivating,u=new s("Node");function f(t){return t?"string"==typeof t?r.getClassByName(t):t:(cc.errorID(3804),null)}function d(t,e){if(e._sealed)for(var i=0;i0&&(r=p(n._children,e)))return r}return null}function v(t,e,i){for(var n=0;n0&&v(r._children,e,i)}}var g=cc.Class({name:"cc._BaseNode",extends:cc.Object,properties:{_parent:null,_children:[],_active:!0,_components:[],_prefab:null,_persistNode:{get:function(){return(this._objFlags&l)>0},set:function(t){t?this._objFlags|=l:this._objFlags&=~l}},name:{get:function(){return this._name},set:function(t){this._name=t}},uuid:{get:function(){return this._id}},children:{get:function(){return this._children}},childrenCount:{get:function(){return this._children.length}},active:{get:function(){return this._active},set:function(t){if(t=!!t,this._active!==t){this._active=t;var e=this._parent;e&&e._activeInHierarchy&&cc.director._nodeActivator.activateNode(this,t)}}},activeInHierarchy:{get:function(){return this._activeInHierarchy}}},ctor:function(t){this._name=void 0!==t?t:"New Node",this._activeInHierarchy=!1,this._id=u.getNewId(),cc.director._scheduler&&cc.director._scheduler.enableForTarget(this),this.__eventTargets=[]},getParent:function(){return this._parent},setParent:function(t){if(this._parent!==t){var e=this._parent;if(this._parent=t||null,this._onSetParent(t),t&&(a._setDirtyForNode(this),t._children.push(this),t.emit&&t.emit("child-added",this),t._renderFlag|=o.FLAG_CHILDREN),e){if(!(e._objFlags&c)){var i=e._children.indexOf(this);e._children.splice(i,1),e.emit&&e.emit("child-removed",this),this._onHierarchyChanged(e),0===e._children.length&&(e._renderFlag&=~o.FLAG_CHILDREN)}}else t&&this._onHierarchyChanged(null)}},attr:function(t){r.mixin(this,t)},getChildByUuid:function(t){if(!t)return cc.log("Invalid uuid"),null;for(var e=this._children,i=0,n=e.length;i0?(l=n,i=n._children,r=0,c[o]=i[r],o++):(c[o]=n,o++,s=!0);c.length=0,a._stackId--},cleanup:function(){},removeFromParent:function(t){this._parent&&(void 0===t&&(t=!0),this._parent.removeChild(this,t))},removeChild:function(t,e){this._children.indexOf(t)>-1&&((e||void 0===e)&&t.cleanup(),t.parent=null)},removeAllChildren:function(t){var e=this._children;void 0===t&&(t=!0);for(var i=e.length-1;i>=0;i--){var n=e[i];n&&(t&&n.cleanup(),n.parent=null)}this._children.length=0},isChildOf:function(t){var e=this;do{if(e===t)return!0;e=e._parent}while(e);return!1},getComponent:function(t){var e=f(t);return e?d(this,e):null},getComponents:function(t){var e=f(t),i=[];return e&&_(this,e,i),i},getComponentInChildren:function(t){var e=f(t);return e?p(this._children,e):null},getComponentsInChildren:function(t){var e=f(t),i=[];return e&&(_(this,e,i),v(this._children,e,i)),i},_checkMultipleComp:!1,addComponent:function(t){var e;if("string"==typeof t){if(!(e=r.getClassByName(t)))return cc.errorID(3807,t),cc._RFpeek()&&cc.errorID(3808,t),null}else{if(!t)return cc.errorID(3804),null;e=t}if("function"!=typeof e)return cc.errorID(3809),null;if(!r.isChildClassOf(e,cc.Component))return cc.errorID(3810),null;var i=e._requireComponent;if(i&&!this.getComponent(i)&&!this.addComponent(i))return null;var n=new e;return n.node=this,this._components.push(n),this._activeInHierarchy&&cc.director._nodeActivator.activateComp(n),n},_addComponentAt:!1,removeComponent:function(t){t?(t instanceof cc.Component||(t=this.getComponent(t)),t&&t.destroy()):cc.errorID(3813)},_getDependComponent:!1,_removeComponent:function(t){if(t){if(!(this._objFlags&c)){var e=this._components.indexOf(t);-1!==e?this._components.splice(e,1):t.node!==this&&cc.errorID(3815)}}else cc.errorID(3814)},destroy:function(){cc.Object.prototype.destroy.call(this)&&(this.active=!1)},destroyAllChildren:function(){for(var t=this._children,e=0;e>>1;i<=n;r=i+n>>>1){var s=t[r];if(s>e+1e-6)n=r-1;else{if(!(s>2],s[a[r++]]=n[(3&o)<<2|c>>4],s[a[r++]]=n[15&c]}return s.join("")}}),{"./misc":221}],218:[(function(t,e){"use strict";cc.find=e.exports=function(t,e){if(null==t)return cc.errorID(3814),null;if(e);else{var i=cc.director.getScene();if(!i)return null;e=i}for(var n=e,r="/"!==t[0]?0:1,s=t.split("/"),a=r;a>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16)},BUILTIN_CLASSID_RE:/^(?:cc|dragonBones|sp|ccsg)\..+/},r=new Array(123),s=0;s<123;++s)r[s]=64;for(var a=0;a<64;++a)r["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charCodeAt(a)]=a;n.BASE64_VALUES=r,n.pushToMap=function(t,e,i,n){var r=t[e];r?Array.isArray(r)?n?(r.push(r[0]),r[0]=i):r.push(i):t[e]=n?[i,r]:[r,i]:t[e]=i},n.clampf=function(t,e,i){if(e>i){var n=e;e=i,i=n}return t=0&&this.removeAt(e)},n.removeAt=function(t){this.array.splice(t,1),t<=this.i&&--this.i},n.fastRemove=function(t){var e=this.array.indexOf(t);e>=0&&this.fastRemoveAt(e)},n.fastRemoveAt=function(t){var e=this.array;e[t]=e[e.length-1],--e.length,t<=this.i&&--this.i},n.push=function(t){this.array.push(t)},e.exports=i}),{}],223:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=(function(){function t(){this.enabled=!1,this.count=0,this.maxSize=1024}var e=t.prototype;return e.get=function(){},e.put=function(){},e.clear=function(){},t})();i.default=n,cc.pool={},n.register=function(t,e){cc.pool[t]=e},e.exports=i.default}),{}],224:[(function(t,e){"use strict";cc._PrefabInfo=cc.Class({name:"cc.PrefabInfo",properties:{root:null,asset:null,fileId:"",sync:!1}}),e.exports={syncWithPrefab:function(t){var e=t._prefab;if(!e.asset)return cc.errorID(3701,t.name),void(t._prefab=null);var i=t._objFlags,n=t._parent,r=t._id,s=t._name,a=t._active,o=t._eulerAngles.x,c=t._eulerAngles.y,l=t._eulerAngles.z,h=t._localZOrder,u=t._trs,f=u[0],d=u[1],_=u[2];cc.game._isCloning=!0,e.asset._doInstantiate(t),cc.game._isCloning=!1,t._objFlags=i,t._parent=n,t._id=r,t._prefab=e,t._name=s,t._active=a,t._localZOrder=h,(u=t._trs)[0]=f,u[1]=d,u[2]=_,t._eulerAngles.x=o,t._eulerAngles.y=c,t._eulerAngles.z=l}}}),{}],225:[(function(t,e){"use strict";var i=t("../../platform/CCMacro"),n=t("./perf-counter"),r=!1,s=15,a=null,o=null,c=null;function l(){if(!a){a={fps:{desc:"Framerate (FPS)",below:30,average:500},draws:{desc:"Draw Call"},frame:{desc:"Frame time (ms)",min:0,max:50,average:500},logic:{desc:"Game Logic (ms)",min:0,max:50,average:500,color:"#080"},render:{desc:"Renderer (ms)",min:0,max:50,average:500,color:"#f90"},mode:{desc:cc.game.renderType===cc.game.RENDER_TYPE_WEBGL?"WebGL":"Canvas",min:1}};var t=performance.now();for(var e in a)a[e]._counter=new n(e,a[e],t)}}function h(){if(!o||!o.isValid){(o=new cc.Node("PROFILER-NODE")).x=o.y=10,o.groupIndex=cc.Node.BuiltinGroupIndex.DEBUG,cc.Camera._setupDebugCamera(),o.zIndex=i.MAX_ZINDEX,cc.game.addPersistRootNode(o);var t=new cc.Node("LEFT-PANEL");t.anchorX=t.anchorY=0;var e=t.addComponent(cc.Label);e.fontSize=s,e.lineHeight=s,t.parent=o;var n=new cc.Node("RIGHT-PANEL");n.anchorX=1,n.anchorY=0,n.x=200;var r=n.addComponent(cc.Label);r.horizontalAlign=cc.Label.HorizontalAlign.RIGHT,r.fontSize=s,r.lineHeight=s,n.parent=o,cc.sys.platform!==cc.sys.BAIDU_GAME_SUB&&cc.sys.platform!==cc.sys.WECHAT_GAME_SUB&&(e.cacheMode=cc.Label.CacheMode.CHAR,r.cacheMode=cc.Label.CacheMode.CHAR),c={left:e,right:r}}}function u(){h();var t=cc.director._lastUpdate;a.frame._counter.start(t),a.logic._counter.start(t)}function f(){var t=performance.now();cc.director.isPaused()?a.frame._counter.start(t):a.logic._counter.end(t),a.render._counter.start(t)}function d(){var t=performance.now();a.render._counter.end(t),a.draws._counter.value=cc.renderer.drawCalls,a.frame._counter.end(t),a.fps._counter.frame(t);var e="",i="";for(var n in a){var r=a[n];r._counter.sample(t),e+=r.desc+"\n",i+=r._counter.human()+"\n"}c&&(c.left.string=e,c.right.string=i)}cc.profiler=e.exports={isShowingStats:function(){return r},hideStats:function(){r&&(o&&(o.active=!1),cc.director.off(cc.Director.EVENT_BEFORE_UPDATE,u),cc.director.off(cc.Director.EVENT_AFTER_UPDATE,f),cc.director.off(cc.Director.EVENT_AFTER_DRAW,d),r=!1)},showStats:function(){r||(l(),o&&(o.active=!0),cc.director.on(cc.Director.EVENT_BEFORE_UPDATE,u),cc.director.on(cc.Director.EVENT_AFTER_UPDATE,f),cc.director.on(cc.Director.EVENT_AFTER_DRAW,d),r=!0)}}}),{"../../platform/CCMacro":155,"./perf-counter":227}],226:[(function(t,e){"use strict";var i=cc.Class({name:"cc.Counter",ctor:function(t,e,i){this._id=t,this._opts=e||{},this._value=0,this._total=0,this._averageValue=0,this._accumValue=0,this._accumSamples=0,this._accumStart=i},properties:{value:{get:function(){return this._value},set:function(t){this._value=t}}},_average:function(t,e){if(this._opts.average){this._accumValue+=t,++this._accumSamples;var i=e;i-this._accumStart>=this._opts.average&&(this._averageValue=this._accumValue/this._accumSamples,this._accumValue=0,this._accumStart=i,this._accumSamples=0)}},sample:function(t){this._average(this._value,t)},human:function(){var t=this._opts.average?this._averageValue:this._value;return Math.round(100*t)/100},alarm:function(){return this._opts.below&&this._valuethis._opts.over}});e.exports=i}),{}],227:[(function(t,e){"use strict";var i=t("./counter"),n=cc.Class({name:"cc.PerfCounter",extends:i,ctor:function(t,e,i){this._time=i},start:function(t){this._time=t},end:function(t){this._value=t-this._time,this._average(this._value)},tick:function(){this.end(),this.start()},frame:function(t){var e=t,i=e-this._time;this._total++,i>(this._opts.average||1e3)&&(this._value=1e3*this._total/i,this._total=0,this._time=e,this._average(this._value))}});e.exports=n}),{"./counter":226}],228:[(function(t,e){"use strict";var i,n=new(((i=t("../platform/js"))&&i.__esModule?i:{default:i}).default.Pool)(2);function r(t){this.count=0,this.limit=t,this.datas={},this.head=null,this.tail=null}n.get=function(){return this._get()||{key:null,value:null,prev:null,next:null}},r.prototype.moveToHead=function(t){t.next=this.head,t.prev=null,null!==this.head&&(this.head.prev=t),this.head=t,null===this.tail&&(this.tail=t),this.count++,this.datas[t.key]=t},r.prototype.put=function(t,e){var i=n.get();if(i.key=t,i.value=e,this.count>=this.limit){var r=this.tail;delete this.datas[r.key],this.count--,this.tail=r.prev,this.tail.next=null,r.prev=null,r.next=null,n.put(r)}this.moveToHead(i)},r.prototype.remove=function(t){null!==t.prev?t.prev.next=t.next:this.head=t.next,null!==t.next?t.next.prev=t.prev:this.tail=t.prev,delete this.datas[t.key],this.count--},r.prototype.get=function(t){var e=this.datas[t];return e?(this.remove(e),this.moveToHead(e),e.value):null},r.prototype.clear=function(){this.count=0,this.datas={},this.head=null,this.tail=null},r.prototype.has=function(t){return!!this.datas[t]},r.prototype.delete=function(t){var e=this.datas[t];this.remove(e)};var s=new r(100),a={BASELINE_RATIO:.26,MIDDLE_RATIO:.37,BASELINE_OFFSET:0,label_wordRex:/([a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430-\u044f\u0410-\u042f\u0401\u0451]+|\S)/,label_symbolRex:/^[!,.:;'}\]%\?>\u3001\u2018\u201c\u300b\uff1f\u3002\uff0c\uff01]/,label_lastWordRex:/([a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430\xed\xec\xcd\xcc\xef\xc1\xc0\xe1\xe0\xc9\xc8\xd2\xd3\xf2\xf3\u0150\u0151\xd9\xda\u0170\xfa\u0171\xf1\xd1\xe6\xc6\u0153\u0152\xc3\xc2\xe3\xd4\xf5\u011b\u0161\u010d\u0159\u017e\xfd\xe1\xed\xe9\xf3\xfa\u016f\u0165\u010f\u0148\u011a\u0160\u010c\u0158\u017d\xc1\xcd\xc9\xd3\xda\u0164\u017c\u017a\u015b\xf3\u0144\u0142\u0119\u0107\u0105\u017b\u0179\u015a\xd3\u0143\u0141\u0118\u0106\u0104-\u044f\u0410-\u042f\u0401\u0451]+|\S)$/,label_lastEnglish:/[a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430\xed\xec\xcd\xcc\xef\xc1\xc0\xe1\xe0\xc9\xc8\xd2\xd3\xf2\xf3\u0150\u0151\xd9\xda\u0170\xfa\u0171\xf1\xd1\xe6\xc6\u0153\u0152\xc3\xc2\xe3\xd4\xf5\u011b\u0161\u010d\u0159\u017e\xfd\xe1\xed\xe9\xf3\xfa\u016f\u0165\u010f\u0148\u011a\u0160\u010c\u0158\u017d\xc1\xcd\xc9\xd3\xda\u0164\u017c\u017a\u015b\xf3\u0144\u0142\u0119\u0107\u0105\u017b\u0179\u015a\xd3\u0143\u0141\u0118\u0106\u0104-\u044f\u0410-\u042f\u0401\u0451]+$/,label_firstEnglish:/^[a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430\xed\xec\xcd\xcc\xef\xc1\xc0\xe1\xe0\xc9\xc8\xd2\xd3\xf2\xf3\u0150\u0151\xd9\xda\u0170\xfa\u0171\xf1\xd1\xe6\xc6\u0153\u0152\xc3\xc2\xe3\xd4\xf5\u011b\u0161\u010d\u0159\u017e\xfd\xe1\xed\xe9\xf3\xfa\u016f\u0165\u010f\u0148\u011a\u0160\u010c\u0158\u017d\xc1\xcd\xc9\xd3\xda\u0164\u017c\u017a\u015b\xf3\u0144\u0142\u0119\u0107\u0105\u017b\u0179\u015a\xd3\u0143\u0141\u0118\u0106\u0104-\u044f\u0410-\u042f\u0401\u0451]/,highSurrogateRex:/[\uD800-\uDBFF]/,lowSurrogateRex:/[\uDC00-\uDFFF]/,label_wrapinspection:!0,__CHINESE_REG:/^[\u4E00-\u9FFF\u3400-\u4DFF]+$/,__JAPANESE_REG:/[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g,__KOREAN_REG:/^[\u1100-\u11FF]|[\u3130-\u318F]|[\uA960-\uA97F]|[\uAC00-\uD7AF]|[\uD7B0-\uD7FF]+$/,isUnicodeCJK:function(t){return this.__CHINESE_REG.test(t)||this.__JAPANESE_REG.test(t)||this.__KOREAN_REG.test(t)},isUnicodeSpace:function(t){return(t=t.charCodeAt(0))>=9&&t<=13||32===t||133===t||160===t||5760===t||t>=8192&&t<=8202||8232===t||8233===t||8239===t||8287===t||12288===t},safeMeasureText:function(t,e,i){var n=(i||t.font)+"\ud83c\udfae"+e,r=s.get(n);if(null!==r)return r;var a=t.measureText(e),o=a&&a.width||0;return s.put(n,o),o},_safeSubstring:function(t,e,i){var n=e,r=i,s=t[e];if(this.lowSurrogateRex.test(s)&&n--,void 0!==i)if(i-1!==e){var a=t[i-1];this.highSurrogateRex.test(a)&&r--}else this.highSurrogateRex.test(s)&&r++;return t.substring(n,r)},fragmentText:function(t,e,i,n){var r=[];if(0===t.length||i<0)return r.push(""),r;for(var s=t;e>i&&s.length>1;){for(var a=s.length*(i/e)|0,o=this._safeSubstring(s,a),c=e-n(o),l=o,h=0,u=0;c>i&&u++<10;)a*=i/c,a|=0,c=e-n(o=this._safeSubstring(s,a));for(u=0;c<=i&&u++<10;){if(o){var f=this.label_wordRex.exec(o);h=f?f[0].length:1,l=o}a+=h,c=e-n(o=this._safeSubstring(s,a))}0==(a-=h)?(a=1,l=this._safeSubstring(s,1)):1===a&&this.highSurrogateRex.test(s[0])&&(a=2,l=this._safeSubstring(s,2));var d,_=this._safeSubstring(s,0,a);this.label_wrapinspection&&this.label_symbolRex.test(l||o)&&(0==(a-=(d=this.label_lastWordRex.exec(_))?d[0].length:0)&&(a=1),l=this._safeSubstring(s,a),_=this._safeSubstring(s,0,a)),this.label_firstEnglish.test(l)&&(d=this.label_lastEnglish.exec(_))&&_!==d[0]&&(a-=d[0].length,l=this._safeSubstring(s,a),_=this._safeSubstring(s,0,a)),0===r.length?r.push(_):(_=_.trimLeft()).length>0&&r.push(_),e=n(s=l||o)}return 0===r.length?r.push(s):(s=s.trimLeft()).length>0&&r.push(s),r}};cc.textUtils=e.exports=a}),{"../platform/js":171}],229:[(function(t,e){"use strict";var i=t("../assets/CCTexture2D"),n={loadImage:function(t,e,i){cc.assertID(t,3103);var n=cc.assetManager.assets.get(t);if(n)return n.loaded?(e&&e.call(i,null,n),n):(n.once("load",(function(){e&&e.call(i,null,n)}),i),n);cc.assetManager.loadRemote(t,(function(t,n){e&&e.call(i,t,n)}))},cacheImage:function(t,e){if(t&&e){var n=new i;return n.initWithElement(e),cc.assetManager.assets.add(t,n),n}},postLoadTexture:function(t,e){t.loaded?e&&e():t.nativeUrl?cc.assetManager.postLoadNative(t,e):e&&e()}};e.exports=n}),{"../assets/CCTexture2D":77}],230:[(function(t,e){"use strict";var i=t("./node-unit"),n=t("./node-mem-pool");e.exports={NodeMemPool:new n(i)}}),{"./node-mem-pool":232,"./node-unit":233}],231:[(function(t,e){"use strict";var i=function(t){this._unitClass=t,this._pool=[],this._findOrder=[]},n=i.prototype;n._initNative=function(){this._nativeMemPool=new renderer.MemPool},n._buildUnit=function(t){return new this._unitClass(t,this)},n._destroyUnit=function(t){this._pool[t]=null;for(var e=0,i=this._findOrder.length;e1&&e.isAllFree()&&this._destroyUnit(t.unitID),e},e.exports=i}),{}],232:[(function(t,e){"use strict";var i,n=t("./mem-pool"),r=function(t){n.call(this,t)};(i=function(){}).prototype=n.prototype;var s=r.prototype=new i;s._initNative=function(){this._nativeMemPool=new renderer.NodeMemPool},s._destroyUnit=function(t){n.prototype._destroyUnit.call(this,t)},e.exports=r}),{"./mem-pool":231}],233:[(function(t,e){"use strict";var i,n=t("../../value-types/utils"),r=(Uint32Array,10*n.FLOAT_BYTES),s=16*n.FLOAT_BYTES,a=16*n.FLOAT_BYTES,o=(Uint32Array,Uint32Array,Int32Array,Uint8Array,Uint8Array,Uint32Array,n.FLOAT_BYTES,t("./unit-base")),c=function(t,e){o.call(this,t,e);var i=this._contentNum;this.trsList=new n.FLOAT_ARRAY_TYPE(10*i),this.localMatList=new n.FLOAT_ARRAY_TYPE(16*i),this.worldMatList=new n.FLOAT_ARRAY_TYPE(16*i);for(var c=0;c",e=this._signData[2*e+0];for(var n=0,r="",s=this._contentNum,a=0;a");var o=t+n;console.log("unitID:",this.unitID,"spaceNum:",t,"calc using num:",n,"store using num:",this._data[1],"calc total num:",o,"actually total num:",this._contentNum),console.log("free info:",i),console.log("using info:",r),n!=this._data[1]&&cc.error("using num error","calc using num:",n,"store using num:",this._data[1]),t+n!=this._contentNum&&cc.error("total num error","calc total num:",o,"actually total num:",this._contentNum)},e.exports=i}),{}],235:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("./value-type")),r=a(t("../platform/CCClass")),s=a(t("../utils/misc"));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i>>0)+(n<<16)+(i<<8)+(0|e),s}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n.copy=function(t,e){return t.r=e.r,t.g=e.g,t.b=e.b,t.a=e.a,t},n.clone=function(t){return new n(t.r,t.g,t.b,t.a)},n.set=function(t,e,i,n,r){return void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===r&&(r=255),t.r=e,t.g=i,t.b=n,t.a=r,t},n.fromHex=function(t,e){var i=(e>>24)/255,n=(e>>16&255)/255,r=(e>>8&255)/255,s=(255&e)/255;return t.r=i,t.g=n,t.b=r,t.a=s,t},n.fromHEX=function(t,e){return e=0===e.indexOf("#")?e.substring(1):e,t.r=parseInt(e.substr(0,2),16)||0,t.g=parseInt(e.substr(2,2),16)||0,t.b=parseInt(e.substr(4,2),16)||0,t.a=parseInt(e.substr(6,2),16)||255,t._val=(t.a<<24>>>0)+(t.b<<16)+(t.g<<8)+t.r,t},n.add=function(t,e,i){return t.r=e.r+i.r,t.g=e.g+i.g,t.b=e.b+i.b,t.a=e.a+i.a,t},n.subtract=function(t,e,i){return t.r=e.r-i.r,t.g=e.g-i.g,t.b=e.b-i.b,t.a=e.a-i.a,t},n.multiply=function(t,e,i){return t.r=e.r*i.r,t.g=e.g*i.g,t.b=e.b*i.b,t.a=e.a*i.a,t},n.divide=function(t,e,i){return t.r=e.r/i.r,t.g=e.g/i.g,t.b=e.b/i.b,t.a=e.a/i.a,t},n.scale=function(t,e,i){return t.r=e.r*i,t.g=e.g*i,t.b=e.b*i,t.a=e.a*i,t},n.lerp=function(t,e,i,n){var r=e.r,s=e.g,a=e.b,o=e.a;return t.r=r+n*(i.r-r),t.g=s+n*(i.g-s),t.b=a+n*(i.b-a),t.a=o+n*(i.a-o),t},n.toArray=function(t,e,i){void 0===i&&(i=0);var r=e instanceof n||e.a>1?1/255:1;return t[i+0]=e.r*r,t[i+1]=e.g*r,t[i+2]=e.b*r,t[i+3]=e.a*r,t},n.fromArray=function(t,e,i){return void 0===i&&(i=0),e.r=255*t[i+0],e.g=255*t[i+1],e.b=255*t[i+2],e.a=255*t[i+3],e},n.premultiplyAlpha=function(t,e){var i=e.a/255;return t.r=e.r*i,t.g=e.g*i,t.b=e.b*i,t._fastSetA(e.a),t},c(n,null,[{key:"WHITE",get:function(){return new n(255,255,255,255)}},{key:"BLACK",get:function(){return new n(0,0,0,255)}},{key:"TRANSPARENT",get:function(){return new n(0,0,0,0)}},{key:"GRAY",get:function(){return new n(127.5,127.5,127.5)}},{key:"RED",get:function(){return new n(255,0,0)}},{key:"GREEN",get:function(){return new n(0,255,0)}},{key:"BLUE",get:function(){return new n(0,0,255)}},{key:"YELLOW",get:function(){return new n(255,235,4)}},{key:"ORANGE",get:function(){return new n(255,127,0)}},{key:"CYAN",get:function(){return new n(0,255,255)}},{key:"MAGENTA",get:function(){return new n(255,0,255)}}]);var r=n.prototype;return r.clone=function(){var t=new n;return t._val=this._val,t},r.equals=function(t){return t&&this._val===t._val},r.lerp=function(t,e,i){i=i||new n;var r=this.r,s=this.g,a=this.b,o=this.a;return i.r=r+(t.r-r)*e,i.g=s+(t.g-s)*e,i.b=a+(t.b-a)*e,i.a=o+(t.a-o)*e,i},r.toString=function(){return"rgba("+this.r.toFixed()+", "+this.g.toFixed()+", "+this.b.toFixed()+", "+this.a.toFixed()+")"},r.getR=function(){return 255&this._val},r.setR=function(t){return t=~~s.default.clampf(t,0,255),this._val=(4294967040&this._val|t)>>>0,this},r.getG=function(){return(65280&this._val)>>8},r.setG=function(t){return t=~~s.default.clampf(t,0,255),this._val=(4294902015&this._val|t<<8)>>>0,this},r.getB=function(){return(16711680&this._val)>>16},r.setB=function(t){return t=~~s.default.clampf(t,0,255),this._val=(4278255615&this._val|t<<16)>>>0,this},r.getA=function(){return(4278190080&this._val)>>>24},r.setA=function(t){return t=~~s.default.clampf(t,0,255),this._val=(16777215&this._val|t<<24)>>>0,this},r.toCSS=function(t){return t&&"rgba"!==t?"rgb"===t?"rgb("+this.r+","+this.g+","+this.b+")":"#"+this.toHEX(t):"rgba("+this.r+","+this.g+","+this.b+","+(this.a/255).toFixed(2)+")"},r.fromHEX=function(t){t=0===t.indexOf("#")?t.substring(1):t;var e=parseInt(t.substr(0,2),16)||0,i=parseInt(t.substr(2,2),16)||0,n=parseInt(t.substr(4,2),16)||0,r=parseInt(t.substr(6,2),16)||255;return this._val=(r<<24>>>0)+(n<<16)+(i<<8)+e,this},r.toHEX=function(t){var e=[(this.r<16?"0":"")+this.r.toString(16),(this.g<16?"0":"")+this.g.toString(16),(this.b<16?"0":"")+this.b.toString(16)];return"#rgb"===t?(e[0]=e[0][0],e[1]=e[1][0],e[2]=e[2][0]):"#rrggbbaa"===t&&e.push((this.a<16?"0":"")+this.a.toString(16)),e.join("")},r.toRGBValue=function(){return 16777215&this._val},r.fromHSV=function(t,e,i){var n,r,s;if(0===e)n=r=s=i;else if(0===i)n=r=s=0;else{1===t&&(t=0),t*=6;var a=Math.floor(t),o=t-a,c=i*(1-e),l=i*(1-e*o),h=i*(1-e*(1-o));switch(a){case 0:n=i,r=h,s=c;break;case 1:n=l,r=i,s=c;break;case 2:n=c,r=i,s=h;break;case 3:n=c,r=l,s=i;break;case 4:n=h,r=c,s=i;break;case 5:n=i,r=c,s=l}}return n*=255,r*=255,s*=255,this._val=(this.a<<24>>>0)+(s<<16)+(r<<8)+(0|n),this},r.toHSV=function(){var t=this.r/255,e=this.g/255,i=this.b/255,n={h:0,s:0,v:0},r=Math.max(t,e,i),s=Math.min(t,e,i),a=0;return n.v=r,n.s=r?(r-s)/r:0,n.s?(a=r-s,n.h=t===r?(e-i)/a:e===r?2+(i-t)/a:4+(t-e)/a,n.h/=6,n.h<0&&(n.h+=1)):n.h=0,n},r.set=function(t){return t._val?this._val=t._val:(this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a),this},r._fastSetA=function(t){this._val=(16777215&this._val|t<<24)>>>0},r.multiply=function(t){var e=(255&this._val)*t.r>>8,i=(65280&this._val)*t.g>>8,n=(16711680&this._val)*t.b>>8,r=((4278190080&this._val)>>>8)*t.a;return this._val=4278190080&r|16711680&n|65280&i|255&e,this},c(n,[{key:"r",get:function(){return this.getR()},set:function(t){this.setR(t)}},{key:"g",get:function(){return this.getG()},set:function(t){this.setG(t)}},{key:"b",get:function(){return this.getB()},set:function(t){this.setB(t)}},{key:"a",get:function(){return this.getA()},set:function(t){this.setA(t)}}]),n})(n.default);i.default=l,l.div=l.divide,l.sub=l.subtract,l.mul=l.multiply,l.WHITE_R=l.WHITE,l.BLACK_R=l.BLACK,l.TRANSPARENT_R=l.TRANSPARENT,l.GRAY_R=l.GRAY,l.RED_R=l.RED,l.GREEN_R=l.GREEN,l.BLUE_R=l.BLUE,l.YELLOW_R=l.YELLOW,l.ORANGE_R=l.ORANGE,l.CYAN_R=l.CYAN,l.MAGENTA_R=l.MAGENTA,r.default.fastDefine("cc.Color",l,{r:0,g:0,b:0,a:255}),cc.Color=l,cc.color=function(t,e,i,n){return"string"==typeof t?(new l).fromHEX(t):"object"==typeof t?new l(t.r,t.g,t.b,t.a):new l(t,e,i,n)},e.exports=i.default}),{"../platform/CCClass":150,"../utils/misc":221,"./value-type":244}],236:[(function(t,e,i){"use strict";i.__esModule=!0;var n={Vec2:!0,Vec3:!0,Vec4:!0,Mat4:!0,Mat3:!0,Rect:!0,Size:!0,Color:!0,Quat:!0,Trs:!0};i.Trs=i.Quat=i.Color=i.Size=i.Rect=i.Mat3=i.Mat4=i.Vec4=i.Vec3=i.Vec2=void 0;var r=p(t("./vec2"));i.Vec2=r.default;var s=p(t("./vec3"));i.Vec3=s.default;var a=p(t("./vec4"));i.Vec4=a.default;var o=p(t("./mat4"));i.Mat4=o.default;var c=p(t("./mat3"));i.Mat3=c.default;var l=p(t("./rect"));i.Rect=l.default;var h=p(t("./size"));i.Size=h.default;var u=p(t("./color"));i.Color=u.default;var f=p(t("./quat"));i.Quat=f.default;var d=p(t("./trs"));i.Trs=d.default;var _=t("./utils");function p(t){return t&&t.__esModule?t:{default:t}}Object.keys(_).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||t in i&&i[t]===_[t]||(i[t]=_[t]))})),cc.math=e.exports}),{"./color":235,"./mat3":237,"./mat4":238,"./quat":239,"./rect":240,"./size":241,"./trs":242,"./utils":243,"./vec2":245,"./vec3":246,"./vec4":247}],237:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("../value-types/utils"),s=(n=t("./vec3"))&&n.__esModule?n:{default:n},a=(function(){function t(t,e,i,n,s,a,o,c,l){if(void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=1),void 0===a&&(a=0),void 0===o&&(o=0),void 0===c&&(c=0),void 0===l&&(l=1),this.m=void 0,t instanceof r.FLOAT_ARRAY_TYPE)this.m=t;else{this.m=new r.FLOAT_ARRAY_TYPE(9);var h=this.m;h[0]=t,h[1]=e,h[2]=i,h[3]=n,h[4]=s,h[5]=a,h[6]=o,h[7]=c,h[8]=l}}return t.create=function(e,i,n,r,s,a,o,c,l){return void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=1),void 0===a&&(a=0),void 0===o&&(o=0),void 0===c&&(c=0),void 0===l&&(l=1),new t(e,i,n,r,s,a,o,c,l)},t.clone=function(e){var i=e.m;return new t(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8])},t.copy=function(t,e){return t.m.set(e.m),t},t.set=function(t,e,i,n,r,s,a,o,c,l){var h=t.m;return h[0]=e,h[1]=i,h[2]=n,h[3]=r,h[4]=s,h[5]=a,h[6]=o,h[7]=c,h[8]=l,t},t.identity=function(t){var e=t.m;return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,t},t.transpose=function(t,e){var i=e.m,n=t.m;if(t===e){var r=i[1],s=i[2],a=i[5];n[1]=i[3],n[2]=i[6],n[3]=r,n[5]=i[7],n[6]=s,n[7]=a}else n[0]=i[0],n[1]=i[3],n[2]=i[6],n[3]=i[1],n[4]=i[4],n[5]=i[7],n[6]=i[2],n[7]=i[5],n[8]=i[8];return t},t.invert=function(t,e){var i=e.m,n=t.m,r=i[0],s=i[1],a=i[2],o=i[3],c=i[4],l=i[5],h=i[6],u=i[7],f=i[8],d=f*c-l*u,_=-f*o+l*h,p=u*o-c*h,v=r*d+s*_+a*p;return v?(v=1/v,n[0]=d*v,n[1]=(-f*s+a*u)*v,n[2]=(l*s-a*c)*v,n[3]=_*v,n[4]=(f*r-a*h)*v,n[5]=(-l*r+a*o)*v,n[6]=p*v,n[7]=(-u*r+s*h)*v,n[8]=(c*r-s*o)*v,t):t},t.adjoint=function(t,e){var i=e.m,n=t.m,r=i[0],s=i[1],a=i[2],o=i[3],c=i[4],l=i[5],h=i[6],u=i[7],f=i[8];return n[0]=c*f-l*u,n[1]=a*u-s*f,n[2]=s*l-a*c,n[3]=l*h-o*f,n[4]=r*f-a*h,n[5]=a*o-r*l,n[6]=o*u-c*h,n[7]=s*h-r*u,n[8]=r*c-s*o,t},t.determinant=function(t){var e=t.m,i=e[0],n=e[1],r=e[2],s=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8];return i*(h*a-o*l)+n*(-h*s+o*c)+r*(l*s-a*c)},t.multiply=function(t,e,i){var n=e.m,r=i.m,s=t.m,a=n[0],o=n[1],c=n[2],l=n[3],h=n[4],u=n[5],f=n[6],d=n[7],_=n[8],p=r[0],v=r[1],g=r[2],m=r[3],y=r[4],E=r[5],T=r[6],A=r[7],x=r[8];return s[0]=p*a+v*l+g*f,s[1]=p*o+v*h+g*d,s[2]=p*c+v*u+g*_,s[3]=m*a+y*l+E*f,s[4]=m*o+y*h+E*d,s[5]=m*c+y*u+E*_,s[6]=T*a+A*l+x*f,s[7]=T*o+A*h+x*d,s[8]=T*c+A*u+x*_,t},t.multiplyMat4=function(t,e,i){var n=e.m,r=i.m,s=t.m,a=n[0],o=n[1],c=n[2],l=n[3],h=n[4],u=n[5],f=n[6],d=n[7],_=n[8],p=r[0],v=r[1],g=r[2],m=r[4],y=r[5],E=r[6],T=r[8],A=r[9],x=r[10];return s[0]=p*a+v*l+g*f,s[1]=p*o+v*h+g*d,s[2]=p*c+v*u+g*_,s[3]=m*a+y*l+E*f,s[4]=m*o+y*h+E*d,s[5]=m*c+y*u+E*_,s[6]=T*a+A*l+x*f,s[7]=T*o+A*h+x*d,s[8]=T*c+A*u+x*_,t},t.translate=function(t,e,i){var n=e.m,r=t.m,s=n[0],a=n[1],o=n[2],c=n[3],l=n[4],h=n[5],u=n[6],f=n[7],d=n[8],_=i.x,p=i.y;return r[0]=s,r[1]=a,r[2]=o,r[3]=c,r[4]=l,r[5]=h,r[6]=_*s+p*c+u,r[7]=_*a+p*l+f,r[8]=_*o+p*h+d,t},t.rotate=function(t,e,i){var n=e.m,r=t.m,s=n[0],a=n[1],o=n[2],c=n[3],l=n[4],h=n[5],u=n[6],f=n[7],d=n[8],_=Math.sin(i),p=Math.cos(i);return r[0]=p*s+_*c,r[1]=p*a+_*l,r[2]=p*o+_*h,r[3]=p*c-_*s,r[4]=p*l-_*a,r[5]=p*h-_*o,r[6]=u,r[7]=f,r[8]=d,t},t.scale=function(t,e,i){var n=i.x,r=i.y,s=e.m,a=t.m;return a[0]=n*s[0],a[1]=n*s[1],a[2]=n*s[2],a[3]=r*s[3],a[4]=r*s[4],a[5]=r*s[5],a[6]=s[6],a[7]=s[7],a[8]=s[8],t},t.fromMat4=function(t,e){var i=e.m,n=t.m;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[4],n[4]=i[5],n[5]=i[6],n[6]=i[8],n[7]=i[9],n[8]=i[10],t},t.fromTranslation=function(t,e){var i=t.m;return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=1,i[5]=0,i[6]=e.x,i[7]=e.y,i[8]=1,t},t.fromRotation=function(t,e){var i=Math.sin(e),n=Math.cos(e),r=t.m;return r[0]=n,r[1]=i,r[2]=0,r[3]=-i,r[4]=n,r[5]=0,r[6]=0,r[7]=0,r[8]=1,t},t.fromScaling=function(t,e){var i=t.m;return i[0]=e.x,i[1]=0,i[2]=0,i[3]=0,i[4]=e.y,i[5]=0,i[6]=0,i[7]=0,i[8]=1,t},t.fromQuat=function(t,e){var i=t.m,n=e.x,r=e.y,s=e.z,a=e.w,o=n+n,c=r+r,l=s+s,h=n*o,u=r*o,f=r*c,d=s*o,_=s*c,p=s*l,v=a*o,g=a*c,m=a*l;return i[0]=1-f-p,i[3]=u-m,i[6]=d+g,i[1]=u+m,i[4]=1-h-p,i[7]=_-v,i[2]=d-g,i[5]=_+v,i[8]=1-h-f,t},t.fromViewUp=function(e,i,n){var a,o,c;return(a=new s.default(0,1,0),o=new s.default,c=new s.default,function(e,i,n){return s.default.lengthSqr(i)0?(r=2*Math.sqrt(n+1),t.w=.25*r,t.x=(i[6]-i[9])/r,t.y=(i[8]-i[2])/r,t.z=(i[1]-i[4])/r):i[0]>i[5]&&i[0]>i[10]?(r=2*Math.sqrt(1+i[0]-i[5]-i[10]),t.w=(i[6]-i[9])/r,t.x=.25*r,t.y=(i[1]+i[4])/r,t.z=(i[8]+i[2])/r):i[5]>i[10]?(r=2*Math.sqrt(1+i[5]-i[0]-i[10]),t.w=(i[8]-i[2])/r,t.x=(i[1]+i[4])/r,t.y=.25*r,t.z=(i[6]+i[9])/r):(r=2*Math.sqrt(1+i[10]-i[0]-i[5]),t.w=(i[1]-i[4])/r,t.x=(i[8]+i[2])/r,t.y=(i[6]+i[9])/r,t.z=.25*r),t},r.toRTS=function(t,e,i,n){var r=t.m,o=R.m;n.x=s.default.set(w,r[0],r[1],r[2]).mag(),o[0]=r[0]/n.x,o[1]=r[1]/n.x,o[2]=r[2]/n.x,n.y=s.default.set(w,r[4],r[5],r[6]).mag(),o[3]=r[4]/n.y,o[4]=r[5]/n.y,o[5]=r[6]/n.y,n.z=s.default.set(w,r[8],r[9],r[10]).mag(),o[6]=r[8]/n.z,o[7]=r[9]/n.z,o[8]=r[10]/n.z,c.default.determinant(R)<0&&(n.x*=-1,o[0]*=-1,o[1]*=-1,o[2]*=-1),a.default.fromMat3(e,R),s.default.set(i,r[12],r[13],r[14])},r.fromRTS=function(t,e,i,n){var r=e.x,s=e.y,a=e.z,o=e.w,c=r+r,l=s+s,h=a+a,u=r*c,f=r*l,d=r*h,_=s*l,p=s*h,v=a*h,g=o*c,m=o*l,y=o*h,E=n.x,T=n.y,A=n.z,x=t.m;return x[0]=(1-(_+v))*E,x[1]=(f+y)*E,x[2]=(d-m)*E,x[3]=0,x[4]=(f-y)*T,x[5]=(1-(u+v))*T,x[6]=(p+g)*T,x[7]=0,x[8]=(d+m)*A,x[9]=(p-g)*A,x[10]=(1-(u+_))*A,x[11]=0,x[12]=i.x,x[13]=i.y,x[14]=i.z,x[15]=1,t},r.fromRTSOrigin=function(t,e,i,n,r){var s=e.x,a=e.y,o=e.z,c=e.w,l=s+s,h=a+a,u=o+o,f=s*l,d=s*h,_=s*u,p=a*h,v=a*u,g=o*u,m=c*l,y=c*h,E=c*u,T=n.x,A=n.y,x=n.z,C=r.x,b=r.y,S=r.z,w=t.m;return w[0]=(1-(p+g))*T,w[1]=(d+E)*T,w[2]=(_-y)*T,w[3]=0,w[4]=(d-E)*A,w[5]=(1-(f+g))*A,w[6]=(v+m)*A,w[7]=0,w[8]=(_+y)*x,w[9]=(v-m)*x,w[10]=(1-(f+p))*x,w[11]=0,w[12]=i.x+C-(w[0]*C+w[4]*b+w[8]*S),w[13]=i.y+b-(w[1]*C+w[5]*b+w[9]*S),w[14]=i.z+S-(w[2]*C+w[6]*b+w[10]*S),w[15]=1,t},r.fromQuat=function(t,e){var i=e.x,n=e.y,r=e.z,s=e.w,a=i+i,o=n+n,c=r+r,l=i*a,h=n*a,u=n*o,f=r*a,d=r*o,_=r*c,p=s*a,v=s*o,g=s*c,m=t.m;return m[0]=1-u-_,m[1]=h+g,m[2]=f-v,m[3]=0,m[4]=h-g,m[5]=1-l-_,m[6]=d+p,m[7]=0,m[8]=f+v,m[9]=d-p,m[10]=1-l-u,m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,t},r.frustum=function(t,e,i,n,r,s,a){var o=1/(i-e),c=1/(r-n),l=1/(s-a),h=t.m;return h[0]=2*s*o,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=2*s*c,h[6]=0,h[7]=0,h[8]=(i+e)*o,h[9]=(r+n)*c,h[10]=(a+s)*l,h[11]=-1,h[12]=0,h[13]=0,h[14]=a*s*2*l,h[15]=0,t},r.perspective=function(t,e,i,n,r){var s=1/Math.tan(e/2),a=1/(n-r),o=t.m;return o[0]=s/i,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(r+n)*a,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*r*n*a,o[15]=0,t},r.ortho=function(t,e,i,n,r,s,a){var o=1/(e-i),c=1/(n-r),l=1/(s-a),h=t.m;return h[0]=-2*o,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=-2*c,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=2*l,h[11]=0,h[12]=(e+i)*o,h[13]=(r+n)*c,h[14]=(a+s)*l,h[15]=1,t},r.lookAt=function(t,e,i,n){var r=e.x,s=e.y,a=e.z,o=n.x,c=n.y,l=n.z,h=r-i.x,u=s-i.y,f=a-i.z,d=1/Math.sqrt(h*h+u*u+f*f),_=c*(f*=d)-l*(u*=d),p=l*(h*=d)-o*f,v=o*u-c*h,g=u*(v*=d=1/Math.sqrt(_*_+p*p+v*v))-f*(p*=d),m=f*(_*=d)-h*v,y=h*p-u*_,E=t.m;return E[0]=_,E[1]=g,E[2]=h,E[3]=0,E[4]=p,E[5]=m,E[6]=u,E[7]=0,E[8]=v,E[9]=y,E[10]=f,E[11]=0,E[12]=-(_*r+p*s+v*a),E[13]=-(g*r+m*s+y*a),E[14]=-(h*r+u*s+f*a),E[15]=1,t},r.inverseTranspose=function(t,e){var i=e.m;h=i[0],u=i[1],f=i[2],d=i[3],_=i[4],p=i[5],v=i[6],g=i[7],m=i[8],y=i[9],E=i[10],T=i[11],A=i[12],x=i[13],C=i[14],b=i[15];var n=h*p-u*_,r=h*v-f*_,s=h*g-d*_,a=u*v-f*p,o=u*g-d*p,c=f*g-d*v,l=m*x-y*A,S=m*C-E*A,w=m*b-T*A,R=y*C-E*x,M=y*b-T*x,I=E*b-T*C,D=n*I-r*M+s*R+a*w-o*S+c*l;return D?(D=1/D,(i=t.m)[0]=(p*I-v*M+g*R)*D,i[1]=(v*w-_*I-g*S)*D,i[2]=(_*M-p*w+g*l)*D,i[3]=0,i[4]=(f*M-u*I-d*R)*D,i[5]=(h*I-f*w+d*S)*D,i[6]=(u*w-h*M-d*l)*D,i[7]=0,i[8]=(x*c-C*o+b*a)*D,i[9]=(C*s-A*c-b*r)*D,i[10]=(A*o-x*s+b*n)*D,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,t):null},r.add=function(t,e,i){var n=t.m,r=e.m,s=i.m;return n[0]=r[0]+s[0],n[1]=r[1]+s[1],n[2]=r[2]+s[2],n[3]=r[3]+s[3],n[4]=r[4]+s[4],n[5]=r[5]+s[5],n[6]=r[6]+s[6],n[7]=r[7]+s[7],n[8]=r[8]+s[8],n[9]=r[9]+s[9],n[10]=r[10]+s[10],n[11]=r[11]+s[11],n[12]=r[12]+s[12],n[13]=r[13]+s[13],n[14]=r[14]+s[14],n[15]=r[15]+s[15],t},r.subtract=function(t,e,i){var n=t.m,r=e.m,s=i.m;return n[0]=r[0]-s[0],n[1]=r[1]-s[1],n[2]=r[2]-s[2],n[3]=r[3]-s[3],n[4]=r[4]-s[4],n[5]=r[5]-s[5],n[6]=r[6]-s[6],n[7]=r[7]-s[7],n[8]=r[8]-s[8],n[9]=r[9]-s[9],n[10]=r[10]-s[10],n[11]=r[11]-s[11],n[12]=r[12]-s[12],n[13]=r[13]-s[13],n[14]=r[14]-s[14],n[15]=r[15]-s[15],t},r.multiplyScalar=function(t,e,i){var n=t.m,r=e.m;return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=r[3]*i,n[4]=r[4]*i,n[5]=r[5]*i,n[6]=r[6]*i,n[7]=r[7]*i,n[8]=r[8]*i,n[9]=r[9]*i,n[10]=r[10]*i,n[11]=r[11]*i,n[12]=r[12]*i,n[13]=r[13]*i,n[14]=r[14]*i,n[15]=r[15]*i,t},r.multiplyScalarAndAdd=function(t,e,i,n){var r=t.m,s=e.m,a=i.m;return r[0]=s[0]+a[0]*n,r[1]=s[1]+a[1]*n,r[2]=s[2]+a[2]*n,r[3]=s[3]+a[3]*n,r[4]=s[4]+a[4]*n,r[5]=s[5]+a[5]*n,r[6]=s[6]+a[6]*n,r[7]=s[7]+a[7]*n,r[8]=s[8]+a[8]*n,r[9]=s[9]+a[9]*n,r[10]=s[10]+a[10]*n,r[11]=s[11]+a[11]*n,r[12]=s[12]+a[12]*n,r[13]=s[13]+a[13]*n,r[14]=s[14]+a[14]*n,r[15]=s[15]+a[15]*n,t},r.strictEquals=function(t,e){var i=t.m,n=e.m;return i[0]===n[0]&&i[1]===n[1]&&i[2]===n[2]&&i[3]===n[3]&&i[4]===n[4]&&i[5]===n[5]&&i[6]===n[6]&&i[7]===n[7]&&i[8]===n[8]&&i[9]===n[9]&&i[10]===n[10]&&i[11]===n[11]&&i[12]===n[12]&&i[13]===n[13]&&i[14]===n[14]&&i[15]===n[15]},r.equals=function(t,e,i){void 0===i&&(i=o.EPSILON);var n=t.m,r=e.m;return Math.abs(n[0]-r[0])<=i*Math.max(1,Math.abs(n[0]),Math.abs(r[0]))&&Math.abs(n[1]-r[1])<=i*Math.max(1,Math.abs(n[1]),Math.abs(r[1]))&&Math.abs(n[2]-r[2])<=i*Math.max(1,Math.abs(n[2]),Math.abs(r[2]))&&Math.abs(n[3]-r[3])<=i*Math.max(1,Math.abs(n[3]),Math.abs(r[3]))&&Math.abs(n[4]-r[4])<=i*Math.max(1,Math.abs(n[4]),Math.abs(r[4]))&&Math.abs(n[5]-r[5])<=i*Math.max(1,Math.abs(n[5]),Math.abs(r[5]))&&Math.abs(n[6]-r[6])<=i*Math.max(1,Math.abs(n[6]),Math.abs(r[6]))&&Math.abs(n[7]-r[7])<=i*Math.max(1,Math.abs(n[7]),Math.abs(r[7]))&&Math.abs(n[8]-r[8])<=i*Math.max(1,Math.abs(n[8]),Math.abs(r[8]))&&Math.abs(n[9]-r[9])<=i*Math.max(1,Math.abs(n[9]),Math.abs(r[9]))&&Math.abs(n[10]-r[10])<=i*Math.max(1,Math.abs(n[10]),Math.abs(r[10]))&&Math.abs(n[11]-r[11])<=i*Math.max(1,Math.abs(n[11]),Math.abs(r[11]))&&Math.abs(n[12]-r[12])<=i*Math.max(1,Math.abs(n[12]),Math.abs(r[12]))&&Math.abs(n[13]-r[13])<=i*Math.max(1,Math.abs(n[13]),Math.abs(r[13]))&&Math.abs(n[14]-r[14])<=i*Math.max(1,Math.abs(n[14]),Math.abs(r[14]))&&Math.abs(n[15]-r[15])<=i*Math.max(1,Math.abs(n[15]),Math.abs(r[15]))},r.adjoint=function(t,e){var i=e.m,n=t.m,r=i[0],s=i[1],a=i[2],o=i[3],c=i[4],l=i[5],h=i[6],u=i[7],f=i[8],d=i[9],_=i[10],p=i[11],v=i[12],g=i[13],m=i[14],y=i[15];return n[0]=l*(_*y-p*m)-d*(h*y-u*m)+g*(h*p-u*_),n[1]=-(s*(_*y-p*m)-d*(a*y-o*m)+g*(a*p-o*_)),n[2]=s*(h*y-u*m)-l*(a*y-o*m)+g*(a*u-o*h),n[3]=-(s*(h*p-u*_)-l*(a*p-o*_)+d*(a*u-o*h)),n[4]=-(c*(_*y-p*m)-f*(h*y-u*m)+v*(h*p-u*_)),n[5]=r*(_*y-p*m)-f*(a*y-o*m)+v*(a*p-o*_),n[6]=-(r*(h*y-u*m)-c*(a*y-o*m)+v*(a*u-o*h)),n[7]=r*(h*p-u*_)-c*(a*p-o*_)+f*(a*u-o*h),n[8]=c*(d*y-p*g)-f*(l*y-u*g)+v*(l*p-u*d),n[9]=-(r*(d*y-p*g)-f*(s*y-o*g)+v*(s*p-o*d)),n[10]=r*(l*y-u*g)-c*(s*y-o*g)+v*(s*u-o*l),n[11]=-(r*(l*p-u*d)-c*(s*p-o*d)+f*(s*u-o*l)),n[12]=-(c*(d*m-_*g)-f*(l*m-h*g)+v*(l*_-h*d)),n[13]=r*(d*m-_*g)-f*(s*m-a*g)+v*(s*_-a*d),n[14]=-(r*(l*m-h*g)-c*(s*m-a*g)+v*(s*h-a*l)),n[15]=r*(l*_-h*d)-c*(s*_-a*d)+f*(s*h-a*l),t},r.toArray=function(t,e,i){void 0===i&&(i=0);for(var n=e.m,r=0;r<16;r++)t[i+r]=n[r];return t},r.fromArray=function(t,e,i){void 0===i&&(i=0);for(var n=t.m,r=0;r<16;r++)n[r]=e[i+r];return t},n.clone=function(){var t=this.m;return new r(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},n.set=function(t){var e=this.m,i=t.m;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},n.equals=function(t){return r.strictEquals(this,t)},n.fuzzyEquals=function(t){return r.equals(this,t)},n.toString=function(){var t=this.m;return t?"[\n"+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+",\n"+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+",\n"+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+",\n"+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+"\n]":"[\n1, 0, 0, 0\n0, 1, 0, 0\n0, 0, 1, 0\n0, 0, 0, 1\n]"},n.identity=function(){return r.identity(this)},n.transpose=function(t){return t=t||new r,r.transpose(t,this)},n.invert=function(t){return t=t||new r,r.invert(t,this)},n.adjoint=function(t){return t=t||new r,r.adjoint(t,this)},n.determinant=function(){return r.determinant(this)},n.add=function(t,e){return e=e||new r,r.add(e,this,t)},n.subtract=function(t){return r.subtract(this,this,t)},n.multiply=function(t){return r.multiply(this,this,t)},n.multiplyScalar=function(t){return r.multiplyScalar(this,this,t)},n.translate=function(t,e){return e=e||new r,r.translate(e,this,t)},n.scale=function(t,e){return e=e||new r,r.scale(e,this,t)},n.rotate=function(t,e,i){return i=i||new r,r.rotate(i,this,t,e)},n.getTranslation=function(t){return t=t||new s.default,r.getTranslation(t,this)},n.getScale=function(t){return t=t||new s.default,r.getScaling(t,this)},n.getRotation=function(t){return t=t||new a.default,r.getRotation(t,this)},n.fromRTS=function(t,e,i){return r.fromRTS(this,t,e,i)},n.fromQuat=function(t){return r.fromQuat(this,t)},r})(n.default);i.default=S,S.mul=S.multiply,S.sub=S.subtract,S.IDENTITY=Object.freeze(new S);var w=new s.default,R=new c.default;r.default.fastDefine("cc.Mat4",S,{m00:1,m01:0,m02:0,m03:0,m04:0,m05:1,m06:0,m07:0,m08:0,m09:0,m10:1,m11:0,m12:0,m13:0,m14:0,m15:1});for(var M=function(t){Object.defineProperty(S.prototype,"m"+t,{get:function(){return this.m[t]},set:function(e){this.m[t]=e}})},I=0;I<16;I++)M(I);cc.mat4=function(t,e,i,n,r,s,a,o,c,l,h,u,f,d,_,p){var v=new S(t,e,i,n,r,s,a,o,c,l,h,u,f,d,_,p);return void 0===t&&S.identity(v),v},cc.Mat4=S,e.exports=i.default}),{"../platform/CCClass":150,"./mat3":237,"./quat":239,"./utils":243,"./value-type":244,"./vec3":246}],239:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=c(t("./value-type")),r=c(t("../platform/CCClass")),s=c(t("./vec3")),a=c(t("./mat3")),o=t("./utils");function c(t){return t&&t.__esModule?t:{default:t}}var l=0,h=0,u=0,f=0,d=(function(t){var e,i;i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var n=r.prototype;function r(e,i,n,r){var s;return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=1),(s=t.call(this)||this).x=void 0,s.y=void 0,s.z=void 0,s.w=void 0,e&&"object"==typeof e?(s.x=e.x,s.y=e.y,s.z=e.z,s.w=e.w):(s.x=e,s.y=i,s.z=n,s.w=r),s}return n.mul=function(t,e){return r.multiply(e||new r,this,t)},r.clone=function(t){return new r(t.x,t.y,t.z,t.w)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t},r.set=function(t,e,i,n,r){return t.x=e,t.y=i,t.z=n,t.w=r,t},r.identity=function(t){return t.x=0,t.y=0,t.z=0,t.w=1,t},r.rotationTo=function(t,e,i){var n=s.default.dot(e,i);return n<-.999999?(s.default.cross(v,s.default.RIGHT,e),v.mag()<1e-6&&s.default.cross(v,s.default.UP,e),s.default.normalize(v,v),r.fromAxisAngle(t,v,Math.PI),t):n>.999999?(t.x=0,t.y=0,t.z=0,t.w=1,t):(s.default.cross(v,e,i),t.x=v.x,t.y=v.y,t.z=v.z,t.w=1+n,r.normalize(t,t))},r.getAxisAngle=function(t,e){var i=2*Math.acos(e.w),n=Math.sin(i/2);return 0!==n?(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n):(t.x=1,t.y=0,t.z=0),i},r.multiply=function(t,e,i){return l=e.x*i.w+e.w*i.x+e.y*i.z-e.z*i.y,h=e.y*i.w+e.w*i.y+e.z*i.x-e.x*i.z,u=e.z*i.w+e.w*i.z+e.x*i.y-e.y*i.x,f=e.w*i.w-e.x*i.x-e.y*i.y-e.z*i.z,t.x=l,t.y=h,t.z=u,t.w=f,t},r.multiplyScalar=function(t,e,i){return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=e.w*i,t},r.scaleAndAdd=function(t,e,i,n){return t.x=e.x+i.x*n,t.y=e.y+i.y*n,t.z=e.z+i.z*n,t.w=e.w+i.w*n,t},r.rotateX=function(t,e,i){i*=.5;var n=Math.sin(i),r=Math.cos(i);return l=e.x*r+e.w*n,h=e.y*r+e.z*n,u=e.z*r-e.y*n,f=e.w*r-e.x*n,t.x=l,t.y=h,t.z=u,t.w=f,t},r.rotateY=function(t,e,i){i*=.5;var n=Math.sin(i),r=Math.cos(i);return l=e.x*r-e.z*n,h=e.y*r+e.w*n,u=e.z*r+e.x*n,f=e.w*r-e.y*n,t.x=l,t.y=h,t.z=u,t.w=f,t},r.rotateZ=function(t,e,i){i*=.5;var n=Math.sin(i),r=Math.cos(i);return l=e.x*r+e.y*n,h=e.y*r-e.x*n,u=e.z*r+e.w*n,f=e.w*r-e.z*n,t.x=l,t.y=h,t.z=u,t.w=f,t},r.rotateAround=function(t,e,i,n){return r.invert(_,e),s.default.transformQuat(v,i,_),r.fromAxisAngle(_,v,n),r.multiply(t,e,_),t},r.rotateAroundLocal=function(t,e,i,n){return r.fromAxisAngle(_,i,n),r.multiply(t,e,_),t},r.calculateW=function(t,e){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=Math.sqrt(Math.abs(1-e.x*e.x-e.y*e.y-e.z*e.z)),t},r.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},r.lerp=function(t,e,i,n){return t.x=e.x+n*(i.x-e.x),t.y=e.y+n*(i.y-e.y),t.z=e.z+n*(i.z-e.z),t.w=e.w+n*(i.w-e.w),t},r.slerp=function(t,e,i,n){var r=0,s=0,a=e.x*i.x+e.y*i.y+e.z*i.z+e.w*i.w;if(a<0&&(a=-a,i.x=-i.x,i.y=-i.y,i.z=-i.z,i.w=-i.w),1-a>1e-6){var o=Math.acos(a),c=Math.sin(o);r=Math.sin((1-n)*o)/c,s=Math.sin(n*o)/c}else r=1-n,s=n;return t.x=r*e.x+s*i.x,t.y=r*e.y+s*i.y,t.z=r*e.z+s*i.z,t.w=r*e.w+s*i.w,t},r.sqlerp=function(t,e,i,n,s,a){return r.slerp(_,e,s,a),r.slerp(p,i,n,a),r.slerp(t,_,p,2*a*(1-a)),t},r.invert=function(t,e){var i=e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w,n=i?1/i:0;return t.x=-e.x*n,t.y=-e.y*n,t.z=-e.z*n,t.w=e.w*n,t},r.conjugate=function(t,e){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w)},r.lengthSqr=function(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},r.normalize=function(t,e){var i=e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w;return i>0&&(i=1/Math.sqrt(i),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=e.w*i),t},r.fromAxes=function(t,e,i,n){return a.default.set(g,e.x,e.y,e.z,i.x,i.y,i.z,n.x,n.y,n.z),r.normalize(t,r.fromMat3(t,g))},r.fromViewUp=function(t,e,i){return a.default.fromViewUp(g,e,i),r.normalize(t,r.fromMat3(t,g))},r.fromAxisAngle=function(t,e,i){i*=.5;var n=Math.sin(i);return t.x=n*e.x,t.y=n*e.y,t.z=n*e.z,t.w=Math.cos(i),t},r.fromAngleZ=function(t,e){return e*=m,t.x=t.y=0,t.z=Math.sin(e),t.w=Math.cos(e),t},r.fromMat3=function(t,e){var i=e.m,n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],c=i[5],l=i[6],h=i[7],u=i[8],f=n+o+u;if(f>0){var d=.5/Math.sqrt(f+1);t.w=.25/d,t.x=(c-h)*d,t.y=(l-s)*d,t.z=(r-a)*d}else if(n>o&&n>u){var _=2*Math.sqrt(1+n-o-u);t.w=(c-h)/_,t.x=.25*_,t.y=(a+r)/_,t.z=(l+s)/_}else if(o>u){var p=2*Math.sqrt(1+o-n-u);t.w=(l-s)/p,t.x=(a+r)/p,t.y=.25*p,t.z=(h+c)/p}else{var v=2*Math.sqrt(1+u-n-o);t.w=(r-a)/v,t.x=(l+s)/v,t.y=(h+c)/v,t.z=.25*v}return t},r.fromEuler=function(t,e,i,n){e*=m,i*=m,n*=m;var r=Math.sin(e),s=Math.cos(e),a=Math.sin(i),o=Math.cos(i),c=Math.sin(n),l=Math.cos(n);return t.x=r*o*l+s*a*c,t.y=s*a*l+r*o*c,t.z=s*o*c-r*a*l,t.w=s*o*l-r*a*c,t},r.toAxisX=function(t,e){var i=2*e.y,n=2*e.z;return t.x=1-i*e.y-n*e.z,t.y=i*e.x+n*e.w,t.z=n*e.x+i*e.w,t},r.toAxisY=function(t,e){var i=2*e.x,n=2*e.y,r=2*e.z;return t.x=n*e.x-r*e.w,t.y=1-i*e.x-r*e.z,t.z=r*e.y+i*e.w,t},r.toAxisZ=function(t,e){var i=2*e.x,n=2*e.y,r=2*e.z;return t.x=r*e.x-n*e.w,t.y=r*e.y-i*e.w,t.z=1-i*e.x-n*e.y,t},r.toEuler=function(t,e,i){var n=e.x,r=e.y,s=e.z,a=e.w,c=0,l=0,h=0,u=n*r+s*a;if(u>.499999)c=0,l=(0,o.toDegree)(2*Math.atan2(n,a)),h=90;else if(u<-.499999)c=0,l=-(0,o.toDegree)(2*Math.atan2(n,a)),h=-90;else{var f=n*n,d=r*r,_=s*s;c=(0,o.toDegree)(Math.atan2(2*n*a-2*r*s,1-2*f-2*_)),l=(0,o.toDegree)(Math.atan2(2*r*a-2*n*s,1-2*d-2*_)),h=(0,o.toDegree)(Math.asin(2*u)),i&&(c=-180*Math.sign(c+1e-6)+c,l=-180*Math.sign(l+1e-6)+l,h=180*Math.sign(h+1e-6)-h)}return t.x=c,t.y=l,t.z=h,t},r.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},r.equals=function(t,e,i){return void 0===i&&(i=o.EPSILON),Math.abs(t.x-e.x)<=i*Math.max(1,Math.abs(t.x),Math.abs(e.x))&&Math.abs(t.y-e.y)<=i*Math.max(1,Math.abs(t.y),Math.abs(e.y))&&Math.abs(t.z-e.z)<=i*Math.max(1,Math.abs(t.z),Math.abs(e.z))&&Math.abs(t.w-e.w)<=i*Math.max(1,Math.abs(t.w),Math.abs(e.w))},r.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t[i+2]=e.z,t[i+3]=e.w,t},r.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t.z=e[i+2],t.w=e[i+3],t},n.clone=function(){return new r(this.x,this.y,this.z,this.w)},n.set=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},n.equals=function(t){return t&&this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},n.toEuler=function(t){return r.toEuler(t,this)},n.fromEuler=function(t){return r.fromEuler(this,t.x,t.y,t.z)},n.lerp=function(t,e,i){return i=i||new r,r.slerp(i,this,t,e),i},n.multiply=function(t){return r.multiply(this,this,t)},n.rotateAround=function(t,e,i,n){return n=n||new r,r.rotateAround(n,t,e,i)},r})(n.default);i.default=d,d.mul=d.multiply,d.scale=d.multiplyScalar,d.mag=d.len,d.IDENTITY=Object.freeze(new d);var _=new d,p=new d,v=new s.default,g=new a.default,m=.5*Math.PI/180;r.default.fastDefine("cc.Quat",d,{x:0,y:0,z:0,w:1}),cc.quat=function(t,e,i,n){return new d(t,e,i,n)},cc.Quat=d,e.exports=i.default}),{"../platform/CCClass":150,"./mat3":237,"./utils":243,"./value-type":244,"./vec3":246}],240:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(t("./value-type")),r=o(t("../platform/CCClass")),s=o(t("./vec2")),a=o(t("./size"));function o(t){return t&&t.__esModule?t:{default:t}}function c(t,e){for(var i=0;i=t.x&&this.y<=t.y&&this.y+this.height>=t.y},l.containsRect=function(t){return this.x<=t.x&&this.x+this.width>=t.x+t.width&&this.y<=t.y&&this.y+this.height>=t.y+t.height},l.union=function(t,e){var i=this.x,n=this.y,r=this.width,s=this.height,a=e.x,o=e.y,c=e.width,l=e.height;return t.x=Math.min(i,a),t.y=Math.min(n,o),t.width=Math.max(i+r,a+c)-t.x,t.height=Math.max(n+s,o+l)-t.y,t},l.transformMat4=function(t,e){var i=this.x,n=this.y,r=i+this.width,s=n+this.height,a=e.m,o=a[0]*i+a[4]*n+a[12],c=a[1]*i+a[5]*n+a[13],l=a[0]*r+a[4]*n+a[12],h=a[1]*r+a[5]*n+a[13],u=a[0]*i+a[4]*s+a[12],f=a[1]*i+a[5]*s+a[13],d=a[0]*r+a[4]*s+a[12],_=a[1]*r+a[5]*s+a[13],p=Math.min(o,l,u,d),v=Math.max(o,l,u,d),g=Math.min(c,h,f,_),m=Math.max(c,h,f,_);return t.x=p,t.y=g,t.width=v-p,t.height=m-g,t},l.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.width.toFixed(2)+", "+this.height.toFixed(2)+")"},r=n,(o=[{key:"xMin",get:function(){return this.x},set:function(t){this.width+=this.x-t,this.x=t}},{key:"yMin",get:function(){return this.y},set:function(t){this.height+=this.y-t,this.y=t}},{key:"xMax",get:function(){return this.x+this.width},set:function(t){this.width=t-this.x}},{key:"yMax",get:function(){return this.y+this.height},set:function(t){this.height=t-this.y}},{key:"center",get:function(){return new s.default(this.x+.5*this.width,this.y+.5*this.height)},set:function(t){this.x=t.x-.5*this.width,this.y=t.y-.5*this.height}},{key:"origin",get:function(){return new s.default(this.x,this.y)},set:function(t){this.x=t.x,this.y=t.y}},{key:"size",get:function(){return new a.default(this.width,this.height)},set:function(t){this.width=t.width,this.height=t.height}}])&&c(r.prototype,o),n})(n.default);i.default=l,r.default.fastDefine("cc.Rect",l,{x:0,y:0,width:0,height:0}),cc.Rect=l,cc.rect=function(t,e,i,n){return new l(t,e,i,n)},e.exports=i.default}),{"../platform/CCClass":150,"./size":241,"./value-type":244,"./vec2":245}],241:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(t("./value-type")),r=s(t("../platform/CCClass"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){for(var i=0;ii?i:t},i.clamp01=function(t){return t<0?0:t>1?1:t},i.lerp=function(t,e,i){return t+(e-t)*i},i.toRadian=function(t){return t*n},i.toDegree=function(t){return t*r},i.randomRange=c,i.randomRangeInt=function(t,e){return Math.floor(c(t,e))},i.pseudoRandom=l,i.pseudoRandomRange=h,i.pseudoRandomRangeInt=function(t,e,i){return Math.floor(h(t,e,i))},i.nextPow2=function(t){return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},i.repeat=u,i.pingPong=function(t,e){return t=u(t,2*e),e-Math.abs(t-e)},i.inverseLerp=function(t,e,i){return(i-t)/(e-t)},i.sign=function(t){return(t>0)-(t<0)},i.random=i.FLOAT_BYTES=i.FLOAT_ARRAY_TYPE=i.INT_MIN=i.INT_MAX=i.INT_BITS=i.EPSILON=void 0;var n=Math.PI/180,r=180/Math.PI,s=1e-6;i.EPSILON=s,i.INT_BITS=32,i.INT_MAX=2147483647,i.INT_MIN=-1<<31;var a=Float64Array;i.FLOAT_ARRAY_TYPE=a,i.FLOAT_BYTES=8;var o=Math.random;function c(t,e){return Math.random()*(e-t)+t}function l(t){return(t=(9301*t+49297)%233280)/233280}function h(t,e,i){return l(t)*(i-e)+e}function u(t,e){return t-Math.floor(t/e)*e}i.random=o}),{}],244:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../platform/js"))&&n.__esModule?n:{default:n},s=(function(){function t(){}var e=t.prototype;return e.clone=function(){return cc.errorID("0100",r.default.getClassName(this)+".clone"),null},e.equals=function(){return cc.errorID("0100",r.default.getClassName(this)+".equals"),!1},e.lerp=function(){return cc.errorID("0100",r.default.getClassName(this)+".lerp"),this.clone()},e.set=function(){cc.errorID("0100",r.default.getClassName(this)+".set")},e.toString=function(){return""+{}},t})();i.default=s,r.default.setClassName("cc.ValueType",s),cc.ValueType=s,e.exports=i.default}),{"../platform/js":171}],245:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(t("./value-type")),r=o(t("../platform/CCClass")),s=o(t("../utils/misc")),a=t("./utils");function o(t){return t&&t.__esModule?t:{default:t}}function c(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),t.x=l*i,t.y=h*i),t},u.dot=function(t,e){return t.x*e.x+t.y*e.y},u.cross=function(t,e,i){return t.x=t.y=0,t.z=e.x*i.y-e.y*i.x,t},u.lerp=function(t,e,i,n){return l=e.x,h=e.y,t.x=l+n*(i.x-l),t.y=h+n*(i.y-h),t},u.random=function(t,e){e=e||1;var i=2*(0,a.random)()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t},u.transformMat3=function(t,e,i){l=e.x,h=e.y;var n=i.m;return t.x=n[0]*l+n[3]*h+n[6],t.y=n[1]*l+n[4]*h+n[7],t},u.transformMat4=function(t,e,i){l=e.x,h=e.y;var n=i.m;return t.x=n[0]*l+n[4]*h+n[12],t.y=n[1]*l+n[5]*h+n[13],t},u.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y},u.equals=function(t,e,i){return void 0===i&&(i=a.EPSILON),Math.abs(t.x-e.x)<=i*Math.max(1,Math.abs(t.x),Math.abs(e.x))&&Math.abs(t.y-e.y)<=i*Math.max(1,Math.abs(t.y),Math.abs(e.y))},u.angle=function(t,e){u.normalize(f,t),u.normalize(d,e);var i=u.dot(f,d);return i>1?0:i<-1?Math.PI:Math.acos(i)},u.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t},u.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t},n=u,r=[{key:"ONE",get:function(){return new u(1,1)}},{key:"ZERO",get:function(){return new u(0,0)}},{key:"UP",get:function(){return new u(0,1)}},{key:"RIGHT",get:function(){return new u(1,0)}}],null&&c(n.prototype,null),r&&c(n,r),o.clone=function(){return new u(this.x,this.y)},o.set=function(t){return this.x=t.x,this.y=t.y,this},o.equals=function(t){return t&&this.x===t.x&&this.y===t.y},o.fuzzyEquals=function(t,e){return this.x-e<=t.x&&t.x<=this.x+e&&this.y-e<=t.y&&t.y<=this.y+e},o.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+")"},o.lerp=function(t,e,i){i=i||new u;var n=this.x,r=this.y;return i.x=n+(t.x-n)*e,i.y=r+(t.y-r)*e,i},o.clampf=function(t,e){return this.x=s.default.clampf(this.x,t.x,e.x),this.y=s.default.clampf(this.y,t.y,e.y),this},o.add=function(t,e){return(e=e||new u).x=this.x+t.x,e.y=this.y+t.y,e},o.addSelf=function(t){return this.x+=t.x,this.y+=t.y,this},o.subtract=function(t){return this.x-=t.x,this.y-=t.y,this},o.multiplyScalar=function(t){return this.x*=t,this.y*=t,this},o.multiply=function(t){return this.x*=t.x,this.y*=t.y,this},o.divide=function(t){return this.x/=t,this.y/=t,this},o.negate=function(){return this.x=-this.x,this.y=-this.y,this},o.dot=function(t){return this.x*t.x+this.y*t.y},o.cross=function(t){return this.x*t.y-this.y*t.x},o.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},o.lengthSqr=function(){return this.x*this.x+this.y*this.y},o.normalizeSelf=function(){var t=this.x*this.x+this.y*this.y;if(1===t)return this;if(0===t)return this;var e=1/Math.sqrt(t);return this.x*=e,this.y*=e,this},o.normalize=function(t){return(t=t||new u).x=this.x,t.y=this.y,t.normalizeSelf(),t},o.angle=function(t){var e=this.magSqr(),i=t.magSqr();if(0===e||0===i)return console.warn("Can't get angle between zero vector"),0;var n=this.dot(t)/Math.sqrt(e*i);return n=s.default.clampf(n,-1,1),Math.acos(n)},o.signAngle=function(t){var e=this.angle(t);return this.cross(t)<0?-e:e},o.rotate=function(t,e){return(e=e||new u).x=this.x,e.y=this.y,e.rotateSelf(t)},o.rotateSelf=function(t){var e=Math.sin(t),i=Math.cos(t),n=this.x;return this.x=i*n-e*this.y,this.y=e*n+i*this.y,this},o.project=function(t){return t.multiplyScalar(this.dot(t)/t.dot(t))},o.transformMat4=function(t,e){return e=e||new u,u.transformMat4(e,this,t),e},o.maxAxis=function(){return Math.max(this.x,this.y)},u})(n.default);i.default=u,u.sub=u.subtract,u.mul=u.multiply,u.scale=u.multiplyScalar,u.mag=u.len,u.squaredMagnitude=u.lengthSqr,u.div=u.divide,u.ONE_R=u.ONE,u.ZERO_R=u.ZERO,u.UP_R=u.UP,u.RIGHT_R=u.RIGHT;var f=new u,d=new u;r.default.fastDefine("cc.Vec2",u,{x:0,y:0}),cc.v2=function(t,e){return new u(t,e)},cc.Vec2=u,e.exports=i.default}),{"../platform/CCClass":150,"../utils/misc":221,"./utils":243,"./value-type":244}],246:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=c(t("./value-type")),r=c(t("../platform/CCClass")),s=c(t("../utils/misc")),a=c(t("./vec2")),o=t("./utils");function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),t.x=h*i,t.y=u*i,t.z=f*i),t},d.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},d.cross=function(t,e,i){var n=e.x,r=e.y,s=e.z,a=i.x,o=i.y,c=i.z;return t.x=r*c-s*o,t.y=s*a-n*c,t.z=n*o-r*a,t},d.lerp=function(t,e,i,n){return t.x=e.x+n*(i.x-e.x),t.y=e.y+n*(i.y-e.y),t.z=e.z+n*(i.z-e.z),t},d.random=function(t,e){e=e||1;var i=2*(0,o.random)()*Math.PI,n=2*(0,o.random)()-1,r=Math.sqrt(1-n*n);return t.x=r*Math.cos(i)*e,t.y=r*Math.sin(i)*e,t.z=n*e,t},d.transformMat4=function(t,e,i){h=e.x,u=e.y,f=e.z;var n=i.m,r=n[3]*h+n[7]*u+n[11]*f+n[15];return r=r?1/r:1,t.x=(n[0]*h+n[4]*u+n[8]*f+n[12])*r,t.y=(n[1]*h+n[5]*u+n[9]*f+n[13])*r,t.z=(n[2]*h+n[6]*u+n[10]*f+n[14])*r,t},d.transformMat4Normal=function(t,e,i){h=e.x,u=e.y,f=e.z;var n=i.m,r=n[3]*h+n[7]*u+n[11]*f;return r=r?1/r:1,t.x=(n[0]*h+n[4]*u+n[8]*f)*r,t.y=(n[1]*h+n[5]*u+n[9]*f)*r,t.z=(n[2]*h+n[6]*u+n[10]*f)*r,t},d.transformMat3=function(t,e,i){h=e.x,u=e.y,f=e.z;var n=i.m;return t.x=h*n[0]+u*n[3]+f*n[6],t.y=h*n[1]+u*n[4]+f*n[7],t.z=h*n[2]+u*n[5]+f*n[8],t},d.transformAffine=function(t,e,i){h=e.x,u=e.y,f=e.z;var n=i.m;return t.x=n[0]*h+n[1]*u+n[2]*f+n[3],t.y=n[4]*h+n[5]*u+n[6]*f+n[7],t.x=n[8]*h+n[9]*u+n[10]*f+n[11],t},d.transformQuat=function(t,e,i){var n=i.w*e.x+i.y*e.z-i.z*e.y,r=i.w*e.y+i.z*e.x-i.x*e.z,s=i.w*e.z+i.x*e.y-i.y*e.x,a=-i.x*e.x-i.y*e.y-i.z*e.z;return t.x=n*i.w+a*-i.x+r*-i.z-s*-i.y,t.y=r*i.w+a*-i.y+s*-i.x-n*-i.z,t.z=s*i.w+a*-i.z+n*-i.y-r*-i.x,t},d.transformRTS=function(t,e,i,n,r){var s=e.x*r.x,a=e.y*r.y,o=e.z*r.z,c=i.w*s+i.y*o-i.z*a,l=i.w*a+i.z*s-i.x*o,h=i.w*o+i.x*a-i.y*s,u=-i.x*s-i.y*a-i.z*o;return t.x=c*i.w+u*-i.x+l*-i.z-h*-i.y+n.x,t.y=l*i.w+u*-i.y+h*-i.x-c*-i.z+n.y,t.z=h*i.w+u*-i.z+c*-i.y-l*-i.x+n.z,t},d.transformInverseRTS=function(t,e,i,n,r){var s=e.x-n.x,a=e.y-n.y,o=e.z-n.z,c=i.w*s-i.y*o+i.z*a,l=i.w*a-i.z*s+i.x*o,h=i.w*o-i.x*a+i.y*s,u=i.x*s+i.y*a+i.z*o;return t.x=(c*i.w+u*i.x+l*i.z-h*i.y)/r.x,t.y=(l*i.w+u*i.y+h*i.x-c*i.z)/r.y,t.z=(h*i.w+u*i.z+c*i.y-l*i.x)/r.z,t},d.rotateX=function(t,e,i,n){h=e.x-i.x,u=e.y-i.y,f=e.z-i.z;var r=Math.cos(n),s=Math.sin(n),a=h,o=u*r-f*s,c=u*s+f*r;return t.x=a+i.x,t.y=o+i.y,t.z=c+i.z,t},d.rotateY=function(t,e,i,n){h=e.x-i.x,u=e.y-i.y,f=e.z-i.z;var r=Math.cos(n),s=Math.sin(n),a=f*s+h*r,o=u,c=f*r-h*s;return t.x=a+i.x,t.y=o+i.y,t.z=c+i.z,t},d.rotateZ=function(t,e,i,n){h=e.x-i.x,u=e.y-i.y,f=e.z-i.z;var r=Math.cos(n),s=Math.sin(n),a=h*r-u*s,o=h*s+u*r,c=f;return t.x=a+i.x,t.y=o+i.y,t.z=c+i.z,t},d.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z},d.equals=function(t,e,i){void 0===i&&(i=o.EPSILON);var n=t.x,r=t.y,s=t.z,a=e.x,c=e.y,l=e.z;return Math.abs(n-a)<=i*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-c)<=i*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(s-l)<=i*Math.max(1,Math.abs(s),Math.abs(l))},d.angle=function(t,e){d.normalize(_,t),d.normalize(p,e);var i=d.dot(_,p);return i>1?0:i<-1?Math.PI:Math.acos(i)},d.projectOnPlane=function(t,e,i){return d.subtract(t,e,d.project(t,e,i))},d.project=function(t,e,i){var n=d.lengthSqr(i);return n<1e-6?d.set(t,0,0,0):d.multiplyScalar(t,i,d.dot(e,i)/n)},d.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t[i+2]=e.z,t},d.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t.z=e[i+2],t},n=d,r=[{key:"ONE",get:function(){return new d(1,1,1)}},{key:"ZERO",get:function(){return new d}},{key:"UP",get:function(){return new d(0,1,0)}},{key:"RIGHT",get:function(){return new d(1,0,0)}},{key:"FORWARD",get:function(){return new d(0,0,1)}}],null&&l(n.prototype,null),r&&l(n,r),c.clone=function(){return new d(this.x,this.y,this.z)},c.set=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},c.equals=function(t){return t&&this.x===t.x&&this.y===t.y&&this.z===t.z},c.fuzzyEquals=function(t,e){return this.x-e<=t.x&&t.x<=this.x+e&&this.y-e<=t.y&&t.y<=this.y+e&&this.z-e<=t.z&&t.z<=this.z+e},c.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.z.toFixed(2)+")"},c.lerp=function(t,e,i){return i=i||new d,d.lerp(i,this,t,e),i},c.clampf=function(t,e){return this.x=s.default.clampf(this.x,t.x,e.x),this.y=s.default.clampf(this.y,t.y,e.y),this.z=s.default.clampf(this.z,t.z,e.z),this},c.addSelf=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},c.add=function(t,e){return(e=e||new d).x=this.x+t.x,e.y=this.y+t.y,e.z=this.z+t.z,e},c.subtract=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},c.multiplyScalar=function(t){return this.x*=t,this.y*=t,this.z*=t,this},c.multiply=function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this},c.divide=function(t){return this.x/=t,this.y/=t,this.z/=t,this},c.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},c.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z},c.cross=function(t,e){return e=e||new d,d.cross(e,this,t),e},c.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},c.lengthSqr=function(){return this.x*this.x+this.y*this.y+this.z*this.z},c.normalizeSelf=function(){return d.normalize(this,this),this},c.normalize=function(t){return t=t||new d,d.normalize(t,this),t},c.transformMat4=function(t,e){return e=e||new d,d.transformMat4(e,this,t),e},c.maxAxis=function(){return Math.max(this.x,this.y,this.z)},c.signAngle=function(t){cc.warnID(1408,"vec3.signAngle","v2.1","cc.v2(selfVector).signAngle(vector)");var e=new a.default(this.x,this.y),i=new a.default(t.x,t.y);return e.signAngle(i)},c.rotate=function(t,e){return cc.warnID(1408,"vec3.rotate","v2.1","cc.v2(selfVector).rotate(radians, out)"),a.default.prototype.rotate.call(this,t,e)},c.rotateSelf=function(t){return cc.warnID(1408,"vec3.rotateSelf","v2.1","cc.v2(selfVector).rotateSelf(radians)"),a.default.prototype.rotateSelf.call(this,t)},d})(n.default);i.default=d,d.sub=d.subtract,d.mul=d.multiply,d.scale=d.multiplyScalar,d.mag=d.len,d.squaredMagnitude=d.lengthSqr,d.div=d.divide,d.ONE_R=d.ONE,d.ZERO_R=d.ZERO,d.UP_R=d.UP,d.RIGHT_R=d.RIGHT,d.FRONT_R=d.FORWARD;var _=new d,p=new d;r.default.fastDefine("cc.Vec3",d,{x:0,y:0,z:0}),cc.v3=function(t,e,i){return new d(t,e,i)},cc.Vec3=d,e.exports=i.default}),{"../platform/CCClass":150,"../utils/misc":221,"./utils":243,"./value-type":244,"./vec2":245}],247:[(function(t,e,i){"use strict";i.__esModule=!0,i.v4=d,i.default=void 0;var n=a(t("../platform/CCClass")),r=a(t("./value-type")),s=t("./utils");function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),t.x=c*i,t.y=l*i,t.z=h*i,t.w=u*i),t},f.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},f.lerp=function(t,e,i,n){return t.x=e.x+n*(i.x-e.x),t.y=e.y+n*(i.y-e.y),t.z=e.z+n*(i.z-e.z),t.w=e.w+n*(i.w-e.w),t},f.random=function(t,e){e=e||1;var i=2*(0,s.random)()*Math.PI,n=2*(0,s.random)()-1,r=Math.sqrt(1-n*n);return t.x=r*Math.cos(i)*e,t.y=r*Math.sin(i)*e,t.z=n*e,t.w=0,t},f.transformMat4=function(t,e,i){c=e.x,l=e.y,h=e.z,u=e.w;var n=i.m;return t.x=n[0]*c+n[4]*l+n[8]*h+n[12]*u,t.y=n[1]*c+n[5]*l+n[9]*h+n[13]*u,t.z=n[2]*c+n[6]*l+n[10]*h+n[14]*u,t.w=n[3]*c+n[7]*l+n[11]*h+n[15]*u,t},f.transformAffine=function(t,e,i){c=e.x,l=e.y,h=e.z,u=e.w;var n=i.m;return t.x=n[0]*c+n[1]*l+n[2]*h+n[3]*u,t.y=n[4]*c+n[5]*l+n[6]*h+n[7]*u,t.x=n[8]*c+n[9]*l+n[10]*h+n[11]*u,t.w=e.w,t},f.transformQuat=function(t,e,i){var n=e.x,r=e.y,s=e.z;c=i.x,l=i.y,h=i.z;var a=(u=i.w)*n+l*s-h*r,o=u*r+h*n-c*s,f=u*s+c*r-l*n,d=-c*n-l*r-h*s;return t.x=a*u+d*-c+o*-h-f*-l,t.y=o*u+d*-l+f*-c-a*-h,t.z=f*u+d*-h+a*-l-o*-c,t.w=e.w,t},f.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},f.equals=function(t,e,i){return void 0===i&&(i=s.EPSILON),Math.abs(t.x-e.x)<=i*Math.max(1,Math.abs(t.x),Math.abs(e.x))&&Math.abs(t.y-e.y)<=i*Math.max(1,Math.abs(t.y),Math.abs(e.y))&&Math.abs(t.z-e.z)<=i*Math.max(1,Math.abs(t.z),Math.abs(e.z))&&Math.abs(t.w-e.w)<=i*Math.max(1,Math.abs(t.w),Math.abs(e.w))},f.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t[i+2]=e.z,t[i+3]=e.w,t},f.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t.z=e[i+2],t.w=e[i+3],t},n=f,r=[{key:"ZERO",get:function(){return new f(0,0,0,0)}},{key:"ONE",get:function(){return new f(1,1,1,1)}},{key:"NEG_ONE",get:function(){return new f(-1,-1,-1,-1)}}],null&&o(n.prototype,null),r&&o(n,r),a.clone=function(){return new f(this.x,this.y,this.z,this.w)},a.set=function(t,e,i,n){return t&&"object"==typeof t?(this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},a.equals=function(t,e){return void 0===e&&(e=s.EPSILON),Math.abs(this.x-t.x)<=e*Math.max(1,Math.abs(this.x),Math.abs(t.x))&&Math.abs(this.y-t.y)<=e*Math.max(1,Math.abs(this.y),Math.abs(t.y))&&Math.abs(this.z-t.z)<=e*Math.max(1,Math.abs(this.z),Math.abs(t.z))&&Math.abs(this.w-t.w)<=e*Math.max(1,Math.abs(this.w),Math.abs(t.w))},a.equals4f=function(t,e,i,n,r){return void 0===r&&(r=s.EPSILON),Math.abs(this.x-t)<=r*Math.max(1,Math.abs(this.x),Math.abs(t))&&Math.abs(this.y-e)<=r*Math.max(1,Math.abs(this.y),Math.abs(e))&&Math.abs(this.z-i)<=r*Math.max(1,Math.abs(this.z),Math.abs(i))&&Math.abs(this.w-n)<=r*Math.max(1,Math.abs(this.w),Math.abs(n))},a.strictEquals=function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},a.strictEquals4f=function(t,e,i,n){return this.x===t&&this.y===e&&this.z===i&&this.w===n},a.lerp=function(t,e){return c=this.x,l=this.y,h=this.z,u=this.w,this.x=c+e*(t.x-c),this.y=l+e*(t.y-l),this.z=h+e*(t.z-h),this.w=u+e*(t.w-u),this},a.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.z.toFixed(2)+", "+this.w.toFixed(2)+")"},a.clampf=function(t,e){return this.x=(0,s.clamp)(this.x,t.x,e.x),this.y=(0,s.clamp)(this.y,t.y,e.y),this.z=(0,s.clamp)(this.z,t.z,e.z),this.w=(0,s.clamp)(this.w,t.w,e.w),this},a.addSelf=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},a.add=function(t,e){return(e=e||new f).x=this.x+t.x,e.y=this.y+t.y,e.z=this.z+t.z,e.w=this.w+t.w,e},a.subtract=function(t,e){return(e=e||new f).x=this.x-t.x,e.y=this.y-t.y,e.z=this.z-t.z,e.w=this.w-t.w,e},a.multiplyScalar=function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},a.multiply=function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this},a.divide=function(t){return this.x/=t,this.y/=t,this.z/=t,this.w/=t,this},a.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},a.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},a.cross=function(t,e){e=e||new f;var i=this.x,n=this.y,r=this.z,s=t.x,a=t.y,o=t.z;return e.x=n*o-r*a,e.y=r*s-i*o,e.z=i*a-n*s,e},a.len=function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},a.lengthSqr=function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},a.normalizeSelf=function(){return this.normalize(this),this},a.normalize=function(t){t=t||new f,c=this.x,l=this.y,h=this.z,u=this.w;var e=c*c+l*l+h*h+u*u;return e>0&&(e=1/Math.sqrt(e),t.x=c*e,t.y=l*e,t.z=h*e,t.w=u*e),t},a.transformMat4=function(t,e){e=e||new f,c=this.x,l=this.y,h=this.z,u=this.w;var i=t.m;return e.x=i[0]*c+i[4]*l+i[8]*h+i[12]*u,e.y=i[1]*c+i[5]*l+i[9]*h+i[13]*u,e.z=i[2]*c+i[6]*l+i[10]*h+i[14]*u,e.w=i[3]*c+i[7]*l+i[11]*h+i[15]*u,e},a.maxAxis=function(){return Math.max(this.x,this.y,this.z,this.w)},f})(r.default);function d(t,e,i,n){return new f(t,e,i,n)}i.default=f,f.sub=f.subtract,f.mul=f.multiply,f.div=f.divide,f.scale=f.multiplyScalar,f.mag=f.len,f.squaredMagnitude=f.lengthSqr,f.ZERO_R=f.ZERO,f.ONE_R=f.ONE,f.NEG_ONE_R=f.NEG_ONE,n.default.fastDefine("cc.Vec4",f,{x:0,y:0,z:0,w:0}),cc.v4=d,cc.Vec4=f}),{"../platform/CCClass":150,"./utils":243,"./value-type":244}],248:[(function(){"use strict";cc.js}),{}],249:[(function(t){"use strict";t("./core/CCGame"),t("./actions")}),{"./actions":7,"./core/CCGame":28}],250:[(function(t,e){"use strict";var i=t("../compression/zlib.min"),n=t("../core/CCDebug"),r=function(t){var e,i,r,s,a,o,c,l,h,u,f,d,_;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},a=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":a&&this.animation.frames.push(a),this.pos+=4,a={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},s=this.readUInt16(),r=this.readUInt16()||100,a.delay=1e3*s/r,a.disposeOp=this.data[this.pos++],a.blendOp=this.data[this.pos++],a.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=a?a.data:void 0)||this.imgData,f=0;0<=e?fe;0<=e?++f:--f)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(h=255-this.transparency.indexed.length)>0)for(d=0;0<=h?dh;0<=h?++d:--d)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":o=(u=this.read(e)).indexOf(0),c=String.fromCharCode.apply(String,u.slice(0,o)),this.text[c]=String.fromCharCode.apply(String,u.slice(o+1));break;case"IEND":return a&&this.animation.frames.push(a),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(_=this.colorType)||6===_,i=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*i,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(Uint8Array!=Array&&(this.imgData=new Uint8Array(this.imgData)));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error(n.getError(6017))}};r.prototype={constructor:r,read:function(t){var e,i;for(i=[],e=0;0<=t?et;0<=t?++e:--e)i.push(this.data[this.pos++]);return i},readUInt32:function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},readUInt16:function(){return this.data[this.pos++]<<8|this.data[this.pos++]},decodePixels:function(t){var e,r,s,a,o,c,l,h,u,f,d,_,p,v,g,m,y,E,T,A,x,C,b;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=new i.Inflate(t,{index:0,verify:!1}).decompress(),m=(_=this.pixelBitlength/8)*this.width,p=new Uint8Array(m*this.height),c=t.length,g=0,v=0,r=0;v=this.totalParticles},setTextureWithRect:function(t,e){t instanceof cc.Texture2D&&(this.spriteFrame=new cc.SpriteFrame(t,e))},_applyFile:function(){var t=this._file;if(t){var e=this;cc.assetManager.postLoadNative(t,(function(i){!i&&t._nativeAsset?e.isValid&&(e._plistFile=t.nativeUrl,e._custom||(e._spriteFrame!==t.spriteFrame&&(e.spriteFrame=t.spriteFrame),e._initWithDictionary(t._nativeAsset)),e._spriteFrame?!e._renderSpriteFrame&&e._spriteFrame&&e._applySpriteFrame(e.spriteFrame):t.spriteFrame?e.spriteFrame=t.spriteFrame:e._custom&&e._initTextureWithDictionary(t._nativeAsset)):cc.errorID(6029)}))}},_initTextureWithDictionary:function(t){var e,n=cc.path.changeBasename(this._plistFile,t.textureFileName||"");if(t.textureFileName)c.loadImage(n,(function(e,i){e?(t.textureFileName=void 0,this._initTextureWithDictionary(t)):(cc.assetManager.assets.add(n,i),this.spriteFrame=new cc.SpriteFrame(i))}),this);else if(t.textureImageData){var r=t.textureImageData;if(!(r&&r.length>0))return!1;var l=cc.assetManager.assets.get(n);if(!l){var h=s.unzipBase64AsArray(r,1);if(!h)return cc.warnID(6030,this._file.name),!1;var u=(e=h).length>8&&137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]&&13===e[4]&&10===e[5]&&26===e[6]&&10===e[7]?i.ImageFormat.PNG:e.length>2&&(73===e[0]&&73===e[1]||77===e[0]&&77===e[1]||255===e[0]&&216===e[1])?i.ImageFormat.TIFF:i.ImageFormat.UNKNOWN;if(u!==i.ImageFormat.TIFF&&u!==i.ImageFormat.PNG)return cc.warnID(6031,this._file.name),!1;var f=document.createElement("canvas");u===i.ImageFormat.PNG?new a(h).render(f):o.parseTIFF(h,f),l=c.cacheImage(n,f)}l||cc.warnID(6032,this._file.name),this.spriteFrame=new cc.SpriteFrame(l)}return!0},_initWithDictionary:function(t){this.totalParticles=parseInt(t.maxParticles||0),this.life=parseFloat(t.particleLifespan||0),this.lifeVar=parseFloat(t.particleLifespanVariance||0);var e=t.emissionRate;this.emissionRate=e||Math.min(this.totalParticles/this.life,Number.MAX_VALUE),this.duration=parseFloat(t.duration||0),this.srcBlendFactor=parseInt(t.blendFuncSource||i.SRC_ALPHA),this.dstBlendFactor=parseInt(t.blendFuncDestination||i.ONE_MINUS_SRC_ALPHA);var n=this._startColor;n.r=255*parseFloat(t.startColorRed||0),n.g=255*parseFloat(t.startColorGreen||0),n.b=255*parseFloat(t.startColorBlue||0),n.a=255*parseFloat(t.startColorAlpha||0);var r=this._startColorVar;r.r=255*parseFloat(t.startColorVarianceRed||0),r.g=255*parseFloat(t.startColorVarianceGreen||0),r.b=255*parseFloat(t.startColorVarianceBlue||0),r.a=255*parseFloat(t.startColorVarianceAlpha||0);var s=this._endColor;s.r=255*parseFloat(t.finishColorRed||0),s.g=255*parseFloat(t.finishColorGreen||0),s.b=255*parseFloat(t.finishColorBlue||0),s.a=255*parseFloat(t.finishColorAlpha||0);var a=this._endColorVar;if(a.r=255*parseFloat(t.finishColorVarianceRed||0),a.g=255*parseFloat(t.finishColorVarianceGreen||0),a.b=255*parseFloat(t.finishColorVarianceBlue||0),a.a=255*parseFloat(t.finishColorVarianceAlpha||0),this.startSize=parseFloat(t.startParticleSize||0),this.startSizeVar=parseFloat(t.startParticleSizeVariance||0),this.endSize=parseFloat(t.finishParticleSize||0),this.endSizeVar=parseFloat(t.finishParticleSizeVariance||0),this.positionType=parseFloat(void 0!==t.positionType?t.positionType:f.RELATIVE),this.sourcePos.x=0,this.sourcePos.y=0,this.posVar.x=parseFloat(t.sourcePositionVariancex||0),this.posVar.y=parseFloat(t.sourcePositionVariancey||0),this.angle=parseFloat(t.angle||0),this.angleVar=parseFloat(t.angleVariance||0),this.startSpin=parseFloat(t.rotationStart||0),this.startSpinVar=parseFloat(t.rotationStartVariance||0),this.endSpin=parseFloat(t.rotationEnd||0),this.endSpinVar=parseFloat(t.rotationEndVariance||0),this.emitterMode=parseInt(t.emitterType||u.GRAVITY),this.emitterMode===u.GRAVITY){this.gravity.x=parseFloat(t.gravityx||0),this.gravity.y=parseFloat(t.gravityy||0),this.speed=parseFloat(t.speed||0),this.speedVar=parseFloat(t.speedVariance||0),this.radialAccel=parseFloat(t.radialAcceleration||0),this.radialAccelVar=parseFloat(t.radialAccelVariance||0),this.tangentialAccel=parseFloat(t.tangentialAcceleration||0),this.tangentialAccelVar=parseFloat(t.tangentialAccelVariance||0);var o=t.rotationIsDir||"";null!==o?(o=o.toString().toLowerCase(),this.rotationIsDir="true"===o||"1"===o):this.rotationIsDir=!1}else{if(this.emitterMode!==u.RADIUS)return cc.warnID(6009),!1;this.startRadius=parseFloat(t.maxRadius||0),this.startRadiusVar=parseFloat(t.maxRadiusVariance||0),this.endRadius=parseFloat(t.minRadius||0),this.endRadiusVar=parseFloat(t.minRadiusVariance||0),this.rotatePerS=parseFloat(t.rotatePerSecond||0),this.rotatePerSVar=parseFloat(t.rotatePerSecondVariance||0)}return this._initTextureWithDictionary(t),!0},_validateRender:function(){var t=this._getTexture();t&&t.loaded?this._super():this.disableRender()},_onTextureLoaded:function(){this._simulator.updateUVs(!0),this._syncAspect(),this._updateMaterial(),this.markForRender(!0)},_syncAspect:function(){var t=this._renderSpriteFrame._rect;this._aspectRatio=t.width/t.height},_applySpriteFrame:function(){this._renderSpriteFrame=this._renderSpriteFrame||this._spriteFrame,this._renderSpriteFrame&&(this._renderSpriteFrame.textureLoaded()?this._onTextureLoaded():this._renderSpriteFrame.onTextureLoaded(this._onTextureLoaded,this))},_getTexture:function(){return this._renderSpriteFrame&&this._renderSpriteFrame.getTexture()||this._texture},_updateMaterial:function(){var t=this.getMaterial(0);t&&(t.define("CC_USE_MODEL",this._positionType!==f.FREE),t.setProperty("texture",this._getTexture()),h.prototype._updateMaterial.call(this))},_finishedSimulation:function(){this.resetSystem(),this.stopSystem(),this.disableRender(),this.autoRemoveOnFinish&&this._stopped&&this.node.destroy()}});cc.ParticleSystem=e.exports=_}),{"../compression/ZipUtils":22,"../core/assets/material/CCMaterial":80,"../core/components/CCRenderComponent":115,"../core/platform/CCMacro":155,"../core/renderer/render-flow":182,"../core/utils/blend-func":216,"../core/utils/texture-util":229,"./CCPNGReader":250,"./CCParticleAsset":251,"./CCTIFFReader":253,"./particle-simulator":255,"fire-url":void 0}],253:[(function(t,e){"use strict";var i=t("../core/CCDebug"),n={_littleEndian:!1,_tiffData:null,_fileDirectories:[],getUint8:function(t){return this._tiffData[t]},getUint16:function(t){return this._littleEndian?this._tiffData[t+1]<<8|this._tiffData[t]:this._tiffData[t]<<8|this._tiffData[t+1]},getUint32:function(t){var e=this._tiffData;return this._littleEndian?e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]:e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},checkLittleEndian:function(){var t=this.getUint16(0);if(18761===t)this.littleEndian=!0;else{if(19789!==t)throw console.log(t),TypeError(i.getError(6019));this.littleEndian=!1}return this.littleEndian},hasTowel:function(){if(42!==this.getUint16(2))throw RangeError(i.getError(6020));return!0},getFieldTypeName:function(t){var e=this.fieldTypeNames;return t in e?e[t]:null},getFieldTagName:function(t){var e=this.fieldTagNames;return t in e?e[t]:(cc.logID(6021,t),"Tag"+t)},getFieldTypeLength:function(t){return-1!==["BYTE","ASCII","SBYTE","UNDEFINED"].indexOf(t)?1:-1!==["SHORT","SSHORT"].indexOf(t)?2:-1!==["LONG","SLONG","FLOAT"].indexOf(t)?4:-1!==["RATIONAL","SRATIONAL","DOUBLE"].indexOf(t)?8:null},getFieldValues:function(t,e,i,n){var r=[],s=this.getFieldTypeLength(e);if(s*i<=4)!1===this.littleEndian?r.push(n>>>8*(4-s)):r.push(n);else for(var a=0;a=8?-1!==["RATIONAL","SRATIONAL"].indexOf(e)?(r.push(this.getUint32(n+o)),r.push(this.getUint32(n+o+4))):cc.logID(8e3):r.push(this.getBytes(s,n+o))}return"ASCII"===e&&r.forEach((function(t,e,i){i[e]=String.fromCharCode(t)})),r},getBytes:function(t,e){if(t<=0)cc.logID(8001);else{if(t<=1)return this.getUint8(e);if(t<=2)return this.getUint16(e);if(t<=3)return this.getUint32(e)>>>8;if(t<=4)return this.getUint32(e);cc.logID(8002)}},getBits:function(t,e,i){i=i||0;var n,r,s=e+Math.floor(i/8),a=i+t,o=32-t;return a<=0?cc.logID(6023):a<=8?(n=24+i,r=this.getUint8(s)):a<=16?(n=16+i,r=this.getUint16(s)):a<=32?(n=i,r=this.getUint32(s)):cc.logID(6022),{bits:r<>>o,byteOffset:s+Math.floor(a/8),bitOffset:a%8}},parseFileDirectory:function(t){for(var e=this.getUint16(t),i=[],n=t+2,r=0;r=0&&O<=127?D=O+1:O>=-127&&O<=-1?P=1-O:x=!0}else{var L=this.getUint8(m+E);for(R=0;R0)for(var nt=0;nt1?h=l/u:l=h*u;var f=l/2,d=h/2;if(t.rotation){var _=-f,p=-d,v=f,g=d,m=-n.degreesToRadians(t.rotation),y=Math.cos(m),E=Math.sin(m);s[r]=_*y-p*E+o,s[r+1]=_*E+p*y+c,s[r+5]=v*y-p*E+o,s[r+6]=v*E+p*y+c,s[r+10]=_*y-g*E+o,s[r+11]=_*E+g*y+c,s[r+15]=v*y-g*E+o,s[r+16]=v*E+g*y+c}else s[r]=o-f,s[r+1]=c-d,s[r+5]=o+f,s[r+6]=c-d,s[r+10]=o-f,s[r+11]=c+d,s[r+15]=o+f,s[r+16]=c+d;a[r+4]=t.color._val,a[r+9]=t.color._val,a[r+14]=t.color._val,a[r+19]=t.color._val},u.prototype.step=function(t){t=t>cc.director._maxParticleDeltaTime?cc.director._maxParticleDeltaTime:t;var e=this.sys,i=e.node,n=this.particles,r=4*this.sys._assembler._vfmt._bytes/4,l=cc.ParticleSystem.PositionType;if(i._updateWorldMatrix(),e.positionType===l.FREE){this._worldRotation=f(i);var u=i._worldMatrix.m;s.x=u[12],s.y=u[13]}else e.positionType===l.RELATIVE?(this._worldRotation=i.angle,s.x=i.x,s.y=i.y):this._worldRotation=0;if(this.active&&e.emissionRate){var d=1/e.emissionRate;for(n.lengthd;)this.emitParticle(s),this.emitCounter-=d;this.elapsed+=t,-1!==e.duration&&e.durationthis._uvFilled&&this.updateUVs();for(var v=0;v0){if(e.emitterMode===cc.ParticleSystem.EmitterMode.GRAVITY){var m=c,y=a,E=o;(g.pos.x||g.pos.y)&&(y.set(g.pos),y.normalizeSelf()),E.set(y),y.mulSelf(g.radialAccel);var T=E.x;E.x=-E.y,E.y=T,E.mulSelf(g.tangentialAccel),m.set(y),m.addSelf(E),m.addSelf(e.gravity),m.mulSelf(t),g.dir.addSelf(m),m.set(g.dir),m.mulSelf(t),g.pos.addSelf(m)}else g.angle+=g.degreesPerSecond*t,g.radius+=g.deltaRadius*t,g.pos.x=-Math.cos(g.angle)*g.radius,g.pos.y=-Math.sin(g.angle)*g.radius;var A=g.preciseColor,x=g.deltaColor;A.r+=x.r*t,A.g+=x.g*t,A.b+=x.b*t,A.a+=x.a*t;var C=g.color;C.r=A.r,C.g=A.g,C.b=A.b,C.a=A.a,g.size+=g.deltaSize*t,g.size<0&&(g.size=0),g.rotation+=g.deltaRotation*t;var b=a;b.set(g.pos),e.positionType!==l.GROUPED&&b.addSelf(g.startPos);var S=r*v;this.updateParticleBuffer(g,b,_,S),++v}else{var w=n[v];v!==n.length-1&&(n[v]=n[n.length-1]),h.put(w),n.length--}}e._assembler._ia._count=6*n.length,n.length>0?_.uploadData():this.active||this.readyToPlay||(this.finished=!0,e._finishedSimulation())},e.exports=u}),{"../core/platform/js":171,"../core/utils/misc":221}],256:[(function(t,e){"use strict";var i=r(t("../core/renderer/assembler")),n=r(t("../renderer/core/input-assembler"));function r(t){return t&&t.__esModule?t:{default:t}}var s=t("./CCParticleSystem"),a=t("../core/renderer/"),o=t("../core/renderer/webgl/quad-buffer"),c=t("../core/renderer/webgl/vertex-format").vfmtPosUvColor,l=(function(t){var e,i;function r(e){var i;return(i=t.call(this,e)||this)._buffer=null,i._ia=null,i._vfmt=c,i}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=r.prototype;return s.getBuffer=function(){return this._buffer||(this._buffer=new o(a._handle,c),this._ia=new n.default,this._ia._vertexBuffer=this._buffer._vb,this._ia._indexBuffer=this._buffer._ib,this._ia._start=0,this._ia._count=0),this._buffer},s.fillBuffers=function(t,e){if(this._ia){var i=cc.ParticleSystem.PositionType;t.positionType===i.RELATIVE?e.node=t.node.parent:e.node=t.node,e.material=t._materials[0],e._flushIA(this._ia)}},r})(i.default);i.default.register(s,l),e.exports=l}),{"../core/renderer/":181,"../core/renderer/assembler":178,"../core/renderer/webgl/quad-buffer":208,"../core/renderer/webgl/vertex-format":211,"../renderer/core/input-assembler":259,"./CCParticleSystem":252}],257:[(function(t,e){"use strict";var i,n,r,s,a,o,c,l,h,u,f,d,_,p,v,g,m,y,E,T,A,x,C,b,S,w,R,M,I,D,P,O,L,N,F,B,V,k,U,z,W,H;(function(t){t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL"})(i||(i={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.BUFFER=1]="BUFFER",t[t.TEXTURE=2]="TEXTURE",t[t.TEXTURE_VIEW=3]="TEXTURE_VIEW",t[t.RENDER_PASS=4]="RENDER_PASS",t[t.FRAMEBUFFER=5]="FRAMEBUFFER",t[t.SAMPLER=6]="SAMPLER",t[t.SHADER=7]="SHADER",t[t.PIPELINE_LAYOUT=8]="PIPELINE_LAYOUT",t[t.PIPELINE_STATE=9]="PIPELINE_STATE",t[t.BINDING_LAYOUT=10]="BINDING_LAYOUT",t[t.INPUT_ASSEMBLER=11]="INPUT_ASSEMBLER",t[t.COMMAND_ALLOCATOR=12]="COMMAND_ALLOCATOR",t[t.COMMAND_BUFFER=13]="COMMAND_BUFFER",t[t.QUEUE=14]="QUEUE",t[t.WINDOW=15]="WINDOW"})(n||(n={})),(function(t){t[t.UNREADY=0]="UNREADY",t[t.FAILED=1]="FAILED",t[t.SUCCESS=2]="SUCCESS"})(r||(r={})),(function(){function t(t){this._gfxType=n.UNKNOWN,this._status=r.UNREADY,this._gfxType=t}Object.defineProperty(t.prototype,"gfxType",{get:function(){return this._gfxType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0})})(),(function(t){t.ATTR_POSITION="a_position",t.ATTR_NORMAL="a_normal",t.ATTR_TANGENT="a_tangent",t.ATTR_BITANGENT="a_bitangent",t.ATTR_WEIGHTS="a_weights",t.ATTR_JOINTS="a_joints",t.ATTR_COLOR="a_color",t.ATTR_COLOR1="a_color1",t.ATTR_COLOR2="a_color2",t.ATTR_TEX_COORD="a_texCoord",t.ATTR_TEX_COORD1="a_texCoord1",t.ATTR_TEX_COORD2="a_texCoord2",t.ATTR_TEX_COORD3="a_texCoord3",t.ATTR_TEX_COORD4="a_texCoord4",t.ATTR_TEX_COORD5="a_texCoord5",t.ATTR_TEX_COORD6="a_texCoord6",t.ATTR_TEX_COORD7="a_texCoord7",t.ATTR_TEX_COORD8="a_texCoord8"})(s||(s={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.BOOL=1]="BOOL",t[t.BOOL2=2]="BOOL2",t[t.BOOL3=3]="BOOL3",t[t.BOOL4=4]="BOOL4",t[t.INT=5]="INT",t[t.INT2=6]="INT2",t[t.INT3=7]="INT3",t[t.INT4=8]="INT4",t[t.UINT=9]="UINT",t[t.UINT2=10]="UINT2",t[t.UINT3=11]="UINT3",t[t.UINT4=12]="UINT4",t[t.FLOAT=13]="FLOAT",t[t.FLOAT2=14]="FLOAT2",t[t.FLOAT3=15]="FLOAT3",t[t.FLOAT4=16]="FLOAT4",t[t.COLOR4=17]="COLOR4",t[t.MAT2=18]="MAT2",t[t.MAT2X3=19]="MAT2X3",t[t.MAT2X4=20]="MAT2X4",t[t.MAT3X2=21]="MAT3X2",t[t.MAT3=22]="MAT3",t[t.MAT3X4=23]="MAT3X4",t[t.MAT4X2=24]="MAT4X2",t[t.MAT4X3=25]="MAT4X3",t[t.MAT4=26]="MAT4",t[t.SAMPLER1D=27]="SAMPLER1D",t[t.SAMPLER1D_ARRAY=28]="SAMPLER1D_ARRAY",t[t.SAMPLER2D=29]="SAMPLER2D",t[t.SAMPLER2D_ARRAY=30]="SAMPLER2D_ARRAY",t[t.SAMPLER3D=31]="SAMPLER3D",t[t.SAMPLER_CUBE=32]="SAMPLER_CUBE",t[t.COUNT=33]="COUNT"})(a||(a={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A8=1]="A8",t[t.L8=2]="L8",t[t.LA8=3]="LA8",t[t.R8=4]="R8",t[t.R8SN=5]="R8SN",t[t.R8UI=6]="R8UI",t[t.R8I=7]="R8I",t[t.R16F=8]="R16F",t[t.R16UI=9]="R16UI",t[t.R16I=10]="R16I",t[t.R32F=11]="R32F",t[t.R32UI=12]="R32UI",t[t.R32I=13]="R32I",t[t.RG8=14]="RG8",t[t.RG8SN=15]="RG8SN",t[t.RG8UI=16]="RG8UI",t[t.RG8I=17]="RG8I",t[t.RG16F=18]="RG16F",t[t.RG16UI=19]="RG16UI",t[t.RG16I=20]="RG16I",t[t.RG32F=21]="RG32F",t[t.RG32UI=22]="RG32UI",t[t.RG32I=23]="RG32I",t[t.RGB8=24]="RGB8",t[t.SRGB8=25]="SRGB8",t[t.RGB8SN=26]="RGB8SN",t[t.RGB8UI=27]="RGB8UI",t[t.RGB8I=28]="RGB8I",t[t.RGB16F=29]="RGB16F",t[t.RGB16UI=30]="RGB16UI",t[t.RGB16I=31]="RGB16I",t[t.RGB32F=32]="RGB32F",t[t.RGB32UI=33]="RGB32UI",t[t.RGB32I=34]="RGB32I",t[t.RGBA8=35]="RGBA8",t[t.SRGB8_A8=36]="SRGB8_A8",t[t.RGBA8SN=37]="RGBA8SN",t[t.RGBA8UI=38]="RGBA8UI",t[t.RGBA8I=39]="RGBA8I",t[t.RGBA16F=40]="RGBA16F",t[t.RGBA16UI=41]="RGBA16UI",t[t.RGBA16I=42]="RGBA16I",t[t.RGBA32F=43]="RGBA32F",t[t.RGBA32UI=44]="RGBA32UI",t[t.RGBA32I=45]="RGBA32I",t[t.R5G6B5=46]="R5G6B5",t[t.R11G11B10F=47]="R11G11B10F",t[t.RGB5A1=48]="RGB5A1",t[t.RGBA4=49]="RGBA4",t[t.RGB10A2=50]="RGB10A2",t[t.RGB10A2UI=51]="RGB10A2UI",t[t.RGB9E5=52]="RGB9E5",t[t.D16=53]="D16",t[t.D16S8=54]="D16S8",t[t.D24=55]="D24",t[t.D24S8=56]="D24S8",t[t.D32F=57]="D32F",t[t.D32F_S8=58]="D32F_S8",t[t.BC1=59]="BC1",t[t.BC1_ALPHA=60]="BC1_ALPHA",t[t.BC1_SRGB=61]="BC1_SRGB",t[t.BC1_SRGB_ALPHA=62]="BC1_SRGB_ALPHA",t[t.BC2=63]="BC2",t[t.BC2_SRGB=64]="BC2_SRGB",t[t.BC3=65]="BC3",t[t.BC3_SRGB=66]="BC3_SRGB",t[t.BC4=67]="BC4",t[t.BC4_SNORM=68]="BC4_SNORM",t[t.BC5=69]="BC5",t[t.BC5_SNORM=70]="BC5_SNORM",t[t.BC6H_UF16=71]="BC6H_UF16",t[t.BC6H_SF16=72]="BC6H_SF16",t[t.BC7=73]="BC7",t[t.BC7_SRGB=74]="BC7_SRGB",t[t.ETC_RGB8=75]="ETC_RGB8",t[t.ETC2_RGB8=76]="ETC2_RGB8",t[t.ETC2_SRGB8=77]="ETC2_SRGB8",t[t.ETC2_RGB8_A1=78]="ETC2_RGB8_A1",t[t.ETC2_SRGB8_A1=79]="ETC2_SRGB8_A1",t[t.ETC2_RGBA8=80]="ETC2_RGBA8",t[t.ETC2_SRGB8_A8=81]="ETC2_SRGB8_A8",t[t.EAC_R11=82]="EAC_R11",t[t.EAC_R11SN=83]="EAC_R11SN",t[t.EAC_RG11=84]="EAC_RG11",t[t.EAC_RG11SN=85]="EAC_RG11SN",t[t.PVRTC_RGB2=86]="PVRTC_RGB2",t[t.PVRTC_RGBA2=87]="PVRTC_RGBA2",t[t.PVRTC_RGB4=88]="PVRTC_RGB4",t[t.PVRTC_RGBA4=89]="PVRTC_RGBA4",t[t.PVRTC2_2BPP=90]="PVRTC2_2BPP",t[t.PVRTC2_4BPP=91]="PVRTC2_4BPP"})(o||(o={})),(function(t){t[t.NONE=0]="NONE",t[t.TRANSFER_SRC=1]="TRANSFER_SRC",t[t.TRANSFER_DST=2]="TRANSFER_DST",t[t.INDEX=4]="INDEX",t[t.VERTEX=8]="VERTEX",t[t.UNIFORM=16]="UNIFORM",t[t.STORAGE=32]="STORAGE",t[t.INDIRECT=64]="INDIRECT"})(c||(c={})),(function(t){t[t.NONE=0]="NONE",t[t.DEVICE=1]="DEVICE",t[t.HOST=2]="HOST"})(l||(l={})),(function(t){t[t.NONE=0]="NONE",t[t.READ=1]="READ",t[t.WRITE=2]="WRITE"})(h||(h={})),(function(t){t[t.POINT_LIST=0]="POINT_LIST",t[t.LINE_LIST=1]="LINE_LIST",t[t.LINE_STRIP=2]="LINE_STRIP",t[t.LINE_LOOP=3]="LINE_LOOP",t[t.LINE_LIST_ADJACENCY=4]="LINE_LIST_ADJACENCY",t[t.LINE_STRIP_ADJACENCY=5]="LINE_STRIP_ADJACENCY",t[t.ISO_LINE_LIST=6]="ISO_LINE_LIST",t[t.TRIANGLE_LIST=7]="TRIANGLE_LIST",t[t.TRIANGLE_STRIP=8]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=9]="TRIANGLE_FAN",t[t.TRIANGLE_LIST_ADJACENCY=10]="TRIANGLE_LIST_ADJACENCY",t[t.TRIANGLE_STRIP_ADJACENCY=11]="TRIANGLE_STRIP_ADJACENCY",t[t.TRIANGLE_PATCH_ADJACENCY=12]="TRIANGLE_PATCH_ADJACENCY",t[t.QUAD_PATCH_LIST=13]="QUAD_PATCH_LIST"})(u||(u={})),(function(t){t[t.FILL=0]="FILL",t[t.POINT=1]="POINT",t[t.LINE=2]="LINE"})(f||(f={})),(function(t){t[t.GOURAND=0]="GOURAND",t[t.FLAT=1]="FLAT"})(d||(d={})),(function(t){t[t.NONE=0]="NONE",t[t.FRONT=1]="FRONT",t[t.BACK=2]="BACK"})(_||(_={})),(function(t){t[t.NEVER=0]="NEVER",t[t.LESS=1]="LESS",t[t.EQUAL=2]="EQUAL",t[t.LESS_EQUAL=3]="LESS_EQUAL",t[t.GREATER=4]="GREATER",t[t.NOT_EQUAL=5]="NOT_EQUAL",t[t.GREATER_EQUAL=6]="GREATER_EQUAL",t[t.ALWAYS=7]="ALWAYS"})(p||(p={})),(function(t){t[t.ZERO=0]="ZERO",t[t.KEEP=1]="KEEP",t[t.REPLACE=2]="REPLACE",t[t.INCR=3]="INCR",t[t.DECR=4]="DECR",t[t.INVERT=5]="INVERT",t[t.INCR_WRAP=6]="INCR_WRAP",t[t.DECR_WRAP=7]="DECR_WRAP"})(v||(v={})),(function(t){t[t.ADD=0]="ADD",t[t.SUB=1]="SUB",t[t.REV_SUB=2]="REV_SUB",t[t.MIN=3]="MIN",t[t.MAX=4]="MAX"})(g||(g={})),(function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SRC_ALPHA=2]="SRC_ALPHA",t[t.DST_ALPHA=3]="DST_ALPHA",t[t.ONE_MINUS_SRC_ALPHA=4]="ONE_MINUS_SRC_ALPHA",t[t.ONE_MINUS_DST_ALPHA=5]="ONE_MINUS_DST_ALPHA",t[t.SRC_COLOR=6]="SRC_COLOR",t[t.DST_COLOR=7]="DST_COLOR",t[t.ONE_MINUS_SRC_COLOR=8]="ONE_MINUS_SRC_COLOR",t[t.ONE_MINUS_DST_COLOR=9]="ONE_MINUS_DST_COLOR",t[t.SRC_ALPHA_SATURATE=10]="SRC_ALPHA_SATURATE",t[t.CONSTANT_COLOR=11]="CONSTANT_COLOR",t[t.ONE_MINUS_CONSTANT_COLOR=12]="ONE_MINUS_CONSTANT_COLOR",t[t.CONSTANT_ALPHA=13]="CONSTANT_ALPHA",t[t.ONE_MINUS_CONSTANT_ALPHA=14]="ONE_MINUS_CONSTANT_ALPHA"})(m||(m={})),(function(t){t[t.NONE=0]="NONE",t[t.R=1]="R",t[t.G=2]="G",t[t.B=4]="B",t[t.A=8]="A",t[t.ALL=15]="ALL"})(y||(y={})),(function(t){t[t.NONE=0]="NONE",t[t.POINT=1]="POINT",t[t.LINEAR=2]="LINEAR",t[t.ANISOTROPIC=3]="ANISOTROPIC"})(E||(E={})),(function(t){t[t.WRAP=0]="WRAP",t[t.MIRROR=1]="MIRROR",t[t.CLAMP=2]="CLAMP",t[t.BORDER=3]="BORDER"})(T||(T={})),(function(t){t[t.TEX1D=0]="TEX1D",t[t.TEX2D=1]="TEX2D",t[t.TEX3D=2]="TEX3D"})(A||(A={})),(function(t){t[t.NONE=0]="NONE",t[t.TRANSFER_SRC=1]="TRANSFER_SRC",t[t.TRANSFER_DST=2]="TRANSFER_DST",t[t.SAMPLED=4]="SAMPLED",t[t.STORAGE=8]="STORAGE",t[t.COLOR_ATTACHMENT=16]="COLOR_ATTACHMENT",t[t.DEPTH_STENCIL_ATTACHMENT=32]="DEPTH_STENCIL_ATTACHMENT",t[t.TRANSIENT_ATTACHMENT=64]="TRANSIENT_ATTACHMENT",t[t.INPUT_ATTACHMENT=128]="INPUT_ATTACHMENT"})(x||(x={})),(function(t){t[t.X1=0]="X1",t[t.X2=1]="X2",t[t.X4=2]="X4",t[t.X8=3]="X8",t[t.X16=4]="X16",t[t.X32=5]="X32",t[t.X64=6]="X64"})(C||(C={})),(function(t){t[t.NONE=0]="NONE",t[t.GEN_MIPMAP=1]="GEN_MIPMAP",t[t.CUBEMAP=2]="CUBEMAP",t[t.BAKUP_BUFFER=4]="BAKUP_BUFFER"})(b||(b={})),(function(t){t[t.TV1D=0]="TV1D",t[t.TV2D=1]="TV2D",t[t.TV3D=2]="TV3D",t[t.CUBE=3]="CUBE",t[t.TV1D_ARRAY=4]="TV1D_ARRAY",t[t.TV2D_ARRAY=5]="TV2D_ARRAY"})(S||(S={})),(function(t){t[t.VERTEX=0]="VERTEX",t[t.HULL=1]="HULL",t[t.DOMAIN=2]="DOMAIN",t[t.GEOMETRY=3]="GEOMETRY",t[t.FRAGMENT=4]="FRAGMENT",t[t.COMPUTE=5]="COMPUTE",t[t.COUNT=6]="COUNT"})(w||(w={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.UNIFORM_BUFFER=1]="UNIFORM_BUFFER",t[t.SAMPLER=2]="SAMPLER",t[t.STORAGE_BUFFER=3]="STORAGE_BUFFER"})(R||(R={})),(function(t){t[t.PRIMARY=0]="PRIMARY",t[t.SECONDARY=1]="SECONDARY"})(M||(M={})),(function(t){t[t.LOAD=0]="LOAD",t[t.CLEAR=1]="CLEAR",t[t.DISCARD=2]="DISCARD"})(I||(I={})),(function(t){t[t.STORE=0]="STORE",t[t.DISCARD=1]="DISCARD"})(D||(D={})),(function(t){t[t.UNDEFINED=0]="UNDEFINED",t[t.GENERAL=1]="GENERAL",t[t.COLOR_ATTACHMENT_OPTIMAL=2]="COLOR_ATTACHMENT_OPTIMAL",t[t.DEPTH_STENCIL_ATTACHMENT_OPTIMAL=3]="DEPTH_STENCIL_ATTACHMENT_OPTIMAL",t[t.DEPTH_STENCIL_READONLY_OPTIMAL=4]="DEPTH_STENCIL_READONLY_OPTIMAL",t[t.SHADER_READONLY_OPTIMAL=5]="SHADER_READONLY_OPTIMAL",t[t.TRANSFER_SRC_OPTIMAL=6]="TRANSFER_SRC_OPTIMAL",t[t.TRANSFER_DST_OPTIMAL=7]="TRANSFER_DST_OPTIMAL",t[t.PREINITIALIZED=8]="PREINITIALIZED",t[t.PRESENT_SRC=9]="PRESENT_SRC"})(P||(P={})),(function(t){t[t.GRAPHICS=0]="GRAPHICS",t[t.COMPUTE=1]="COMPUTE",t[t.RAY_TRACING=2]="RAY_TRACING"})(O||(O={})),(function(t){t[t.VIEWPORT=0]="VIEWPORT",t[t.SCISSOR=1]="SCISSOR",t[t.LINE_WIDTH=2]="LINE_WIDTH",t[t.DEPTH_BIAS=3]="DEPTH_BIAS",t[t.BLEND_CONSTANTS=4]="BLEND_CONSTANTS",t[t.DEPTH_BOUNDS=5]="DEPTH_BOUNDS",t[t.STENCIL_WRITE_MASK=6]="STENCIL_WRITE_MASK",t[t.STENCIL_COMPARE_MASK=7]="STENCIL_COMPARE_MASK"})(L||(L={})),(function(t){t[t.FRONT=0]="FRONT",t[t.BACK=1]="BACK",t[t.ALL=2]="ALL"})(N||(N={})),(function(t){t[t.GRAPHICS=0]="GRAPHICS",t[t.COMPUTE=1]="COMPUTE",t[t.TRANSFER=2]="TRANSFER"})(F||(F={})),(function(t){t[t.NONE=0]="NONE",t[t.COLOR=1]="COLOR",t[t.DEPTH=2]="DEPTH",t[t.STENCIL=4]="STENCIL",t[t.DEPTH_STENCIL=6]="DEPTH_STENCIL",t[t.ALL=7]="ALL"})(B||(B={})),(function(t){t[t.DEFAULT=100]="DEFAULT"})(V||(V={})),(function(t){t[t.MIN=0]="MIN",t[t.MAX=255]="MAX",t[t.DEFAULT=128]="DEFAULT"})(k||(k={})),(function(t){t[t.UBO_GLOBAL=23]="UBO_GLOBAL",t[t.UBO_SHADOW=22]="UBO_SHADOW",t[t.UBO_LOCAL=21]="UBO_LOCAL",t[t.UBO_FORWARD_LIGHTS=20]="UBO_FORWARD_LIGHTS",t[t.UBO_SKINNING=19]="UBO_SKINNING",t[t.UBO_SKINNING_TEXTURE=18]="UBO_SKINNING_TEXTURE",t[t.UBO_UI=17]="UBO_UI",t[t.SAMPLER_JOINTS=25]="SAMPLER_JOINTS",t[t.SAMPLER_ENVIRONMENT=26]="SAMPLER_ENVIRONMENT",t[t.CUSTUM_UBO_BINDING_END_POINT=17]="CUSTUM_UBO_BINDING_END_POINT",t[t.CUSTOM_SAMPLER_BINDING_START_POINT=30]="CUSTOM_SAMPLER_BINDING_START_POINT"})(U||(U={})),(function(t){t[t.minFilter=0]="minFilter",t[t.magFilter=1]="magFilter",t[t.mipFilter=2]="mipFilter",t[t.addressU=3]="addressU",t[t.addressV=4]="addressV",t[t.addressW=5]="addressW",t[t.maxAnisotropy=6]="maxAnisotropy",t[t.cmpFunc=7]="cmpFunc",t[t.minLOD=8]="minLOD",t[t.maxLOD=9]="maxLOD",t[t.mipLODBias=10]="mipLODBias",t[t.borderColor=11]="borderColor",t[t.total=15]="total"})(H||(H={}));var G={};G[G.bool=a.BOOL]="bool",G[G.int=a.INT]="int",G[G.ivec2=a.INT2]="ivec2invTypeParams",G[G.ivec3=a.INT3]="ivec3",G[G.ivec4=a.INT4]="ivec4",G[G.float=a.FLOAT]="float",G[G.vec2=a.FLOAT2]="vec2",G[G.vec3=a.FLOAT3]="vec3",G[G.vec4=a.FLOAT4]="vec4",G[G.mat2=a.MAT2]="mat2",G[G.mat3=a.MAT3]="mat3",G[G.mat4=a.MAT4]="mat4",G[G.sampler2D=a.SAMPLER2D]="sampler2D",G[G.samplerCube=a.SAMPLER_CUBE]="samplerCube";var Y=((z={})[a.BOOL]=4,z[a.INT]=4,z[a.INT2]=8,z[a.INT3]=12,z[a.INT4]=16,z[a.FLOAT]=4,z[a.FLOAT2]=8,z[a.FLOAT3]=12,z[a.FLOAT4]=16,z[a.MAT2]=16,z[a.MAT3]=36,z[a.MAT4]=64,z[a.SAMPLER2D]=4,z[a.SAMPLER_CUBE]=4,z),X=((W={})[a.BOOL]=o.R32I,W[a.INT]=o.R32I,W[a.INT2]=o.RG32I,W[a.INT3]=o.RGB32I,W[a.INT4]=o.RGBA32I,W[a.FLOAT]=o.R32F,W[a.FLOAT2]=o.RG32F,W[a.FLOAT3]=o.RGB32F,W[a.FLOAT4]=o.RGBA32F,W),j={BACK:1029,FRONT:1028,NONE:0,ADD:32774,SUB:32778,REV_SUB:32779,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,SRC_ALPHA_SATURATE:776,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,INCR_WRAP:34055,DECR:7683,DECR_WRAP:34056,INVERT:5386};Object.assign(j,V);var q={murmurhash2_32_gc:function(t,e){for(var i,n=t.length,r=e^n,s=0;n>=4;)i=1540483477*(65535&(i=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24))+((1540483477*(i>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),n-=4,++s;switch(n){case 3:r^=(255&t.charCodeAt(s+2))<<16;case 2:r^=(255&t.charCodeAt(s+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(s)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0},SamplerInfoIndex:H,effectStructure:{$techniques:[{$passes:[{depthStencilState:{},rasterizerState:{},blendState:{targets:[{}]},properties:{any:{sampler:{},inspector:{}}}}]}]},typeMap:G,sizeMap:Y,formatMap:X,passParams:j,RenderQueue:{OPAQUE:0,TRANSPARENT:1,OVERLAY:2},RenderPriority:k,GFXGetTypeSize:function(t){switch(t){case a.BOOL:case a.INT:case a.UINT:case a.FLOAT:return 4;case a.BOOL2:case a.INT2:case a.UINT2:case a.FLOAT2:return 8;case a.BOOL3:case a.INT3:case a.UINT3:case a.FLOAT3:return 12;case a.BOOL4:case a.INT4:case a.UINT4:case a.FLOAT4:case a.MAT2:return 16;case a.MAT2X3:return 24;case a.MAT2X4:return 32;case a.MAT3X2:return 24;case a.MAT3:return 36;case a.MAT3X4:return 48;case a.MAT4X2:case a.MAT4X2:return 32;case a.MAT4:return 64;case a.SAMPLER1D:case a.SAMPLER1D_ARRAY:case a.SAMPLER2D:case a.SAMPLER2D_ARRAY:case a.SAMPLER3D:case a.SAMPLER_CUBE:return 4;default:return 0}},UniformBinding:U};e.exports=q}),{}],258:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("../memop"),r=l(t("../enums")),s=t("../../core/value-types"),a=l(t("./program-lib")),o=l(t("./view")),c=l(t("../gfx"));function l(t){return t&&t.__esModule?t:{default:t}}var h=new s.Mat4,u=new n.RecyclePool(function(){return{stage:null,items:null}},8),f=new n.RecyclePool(function(){return new Float32Array(2)},8),d=new n.RecyclePool(function(){return new Float32Array(3)},8),_=new n.RecyclePool(function(){return new Float32Array(4)},8),p=new n.RecyclePool(function(){return new Float32Array(9)},8),v=new n.RecyclePool(function(){return new Float32Array(16)},8),g=new n.RecyclePool(function(){return new Float32Array(64)},8),m=new n.RecyclePool(function(){return new Int32Array(2)},8),y=new n.RecyclePool(function(){return new Int32Array(3)},8),E=new n.RecyclePool(function(){return new Int32Array(4)},8),T=new n.RecyclePool(function(){return new Int32Array(64)},8),A=(function(){function t(t,e){var i;this._device=t,this._programLib=new a.default(t),this._opts=e,this._type2defaultValue=((i={})[r.default.PARAM_INT]=0,i[r.default.PARAM_INT2]=new s.Vec2(0,0),i[r.default.PARAM_INT3]=new s.Vec3(0,0,0),i[r.default.PARAM_INT4]=new s.Vec4(0,0,0,0),i[r.default.PARAM_FLOAT]=0,i[r.default.PARAM_FLOAT2]=new s.Vec2(0,0),i[r.default.PARAM_FLOAT3]=new s.Vec3(0,0,0),i[r.default.PARAM_FLOAT4]=new s.Vec4(0,0,0,0),i[r.default.PARAM_COLOR4]=new s.Color(0,0,0,1),i[r.default.PARAM_MAT3]=new s.Mat3,i[r.default.PARAM_MAT4]=new s.Mat4,i[r.default.PARAM_TEXTURE_2D]=e.defaultTexture,i[r.default.PARAM_TEXTURE_CUBE]=e.defaultTextureCube,i),this._stage2fn={},this._usedTextureUnits=0,this._viewPools=new n.RecyclePool(function(){return new o.default},8),this._drawItemsPools=new n.RecyclePool(function(){return{model:null,node:null,ia:null,effect:null,defines:null,uniforms:null}},100),this._stageItemsPools=new n.RecyclePool(function(){return new n.RecyclePool(function(){return{model:null,node:null,ia:null,effect:null,defines:null,passes:[],sortKey:-1,uniforms:null}},100)},16),this._definesChanged=!1}var e=t.prototype;return e._resetTextuerUnit=function(){this._usedTextureUnits=0},e._allocTextureUnit=function(){var t=this._device,e=this._usedTextureUnits;return e>=t._caps.maxTextureUnits&&console.warn("Trying to use "+e+" texture units while this GPU supports only "+t._caps.maxTextureUnits),this._usedTextureUnits+=1,e},e._registerStage=function(t,e){this._stage2fn[t]=e},e.clear=function(){this._programLib.clear(),this.reset()},e.reset=function(){this._viewPools.reset(),this._stageItemsPools.reset(),this._definesChanged=!1},e._requestView=function(){return this._viewPools.add()},e._render=function(t,e){var i=this._device;i.setFrameBuffer(t._framebuffer),i.setViewport(t._rect.x,t._rect.y,t._rect.w,t._rect.h);var n={};t._clearFlags&r.default.CLEAR_COLOR&&(n.color=s.Vec4.toArray([],t._color)),t._clearFlags&r.default.CLEAR_DEPTH&&(n.depth=t._depth),t._clearFlags&r.default.CLEAR_STENCIL&&(n.stencil=t._stencil),i.clear(n),this._drawItemsPools.reset();for(var a=0;at.count)return void console.error("Failed to set property ["+t.name+"] : The length of texture array ["+i.length+"] is bigger than ["+t.count+"].");for(var n=T.add(),s=0;s0&&n&&n.precision>0}e||cc.warnID(9102),this._highpSupported=e},t})();i.default=h,e.exports=i.default}),{"../gfx":269}],262:[(function(t,e,i){"use strict";function n(t,e){for(var i=0;i>24)/255,(i.blendColor>>16&255)/255,(i.blendColor>>8&255)/255,(255&i.blendColor)/255),void(i.blendSep?(t.blendFuncSeparate(i.blendSrc,i.blendDst,i.blendSrcAlpha,i.blendDstAlpha),t.blendEquationSeparate(i.blendEq,i.blendAlphaEq)):(t.blendFunc(i.blendSrc,i.blendDst),t.blendEquation(i.blendEq)))):void t.disable(t.BLEND);!1!==i.blend&&(e.blendColor!==i.blendColor&&t.blendColor((i.blendColor>>24)/255,(i.blendColor>>16&255)/255,(i.blendColor>>8&255)/255,(255&i.blendColor)/255),e.blendSep===i.blendSep?i.blendSep?(e.blendSrc===i.blendSrc&&e.blendDst===i.blendDst&&e.blendSrcAlpha===i.blendSrcAlpha&&e.blendDstAlpha===i.blendDstAlpha||t.blendFuncSeparate(i.blendSrc,i.blendDst,i.blendSrcAlpha,i.blendDstAlpha),e.blendEq===i.blendEq&&e.blendAlphaEq===i.blendAlphaEq||t.blendEquationSeparate(i.blendEq,i.blendAlphaEq)):(e.blendSrc===i.blendSrc&&e.blendDst===i.blendDst||t.blendFunc(i.blendSrc,i.blendDst),e.blendEq!==i.blendEq&&t.blendEquation(i.blendEq)):i.blendSep?(t.blendFuncSeparate(i.blendSrc,i.blendDst,i.blendSrcAlpha,i.blendDstAlpha),t.blendEquationSeparate(i.blendEq,i.blendAlphaEq)):(t.blendFunc(i.blendSrc,i.blendDst),t.blendEquation(i.blendEq)))}function _(t,e,i){if(e.depthTest!==i.depthTest)return i.depthTest?(t.enable(t.DEPTH_TEST),t.depthFunc(i.depthFunc),void t.depthMask(i.depthWrite)):void t.disable(t.DEPTH_TEST);e.depthWrite!==i.depthWrite&&t.depthMask(i.depthWrite),!1!==i.depthTest?e.depthFunc!==i.depthFunc&&t.depthFunc(i.depthFunc):i.depthWrite&&(i.depthTest=!0,i.depthFunc=a.enums.DS_FUNC_ALWAYS,t.enable(t.DEPTH_TEST),t.depthFunc(i.depthFunc))}function p(t,e,i){if(i.stencilTest!==a.enums.STENCIL_INHERIT)return i.stencilTest!==e.stencilTest?i.stencilTest===a.enums.STENCIL_DISABLE?void t.disable(t.STENCIL_TEST):(t.enable(t.STENCIL_TEST),void(i.stencilSep?(t.stencilFuncSeparate(t.FRONT,i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMaskSeparate(t.FRONT,i.stencilWriteMaskFront),t.stencilOpSeparate(t.FRONT,i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront),t.stencilFuncSeparate(t.BACK,i.stencilFuncBack,i.stencilRefBack,i.stencilMaskBack),t.stencilMaskSeparate(t.BACK,i.stencilWriteMaskBack),t.stencilOpSeparate(t.BACK,i.stencilFailOpBack,i.stencilZFailOpBack,i.stencilZPassOpBack)):(t.stencilFunc(i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMask(i.stencilWriteMaskFront),t.stencilOp(i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront)))):void(i.stencilTest!==a.enums.STENCIL_DISABLE&&(e.stencilSep===i.stencilSep?i.stencilSep?(e.stencilFuncFront===i.stencilFuncFront&&e.stencilRefFront===i.stencilRefFront&&e.stencilMaskFront===i.stencilMaskFront||t.stencilFuncSeparate(t.FRONT,i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),e.stencilWriteMaskFront!==i.stencilWriteMaskFront&&t.stencilMaskSeparate(t.FRONT,i.stencilWriteMaskFront),e.stencilFailOpFront===i.stencilFailOpFront&&e.stencilZFailOpFront===i.stencilZFailOpFront&&e.stencilZPassOpFront===i.stencilZPassOpFront||t.stencilOpSeparate(t.FRONT,i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront),e.stencilFuncBack===i.stencilFuncBack&&e.stencilRefBack===i.stencilRefBack&&e.stencilMaskBack===i.stencilMaskBack||t.stencilFuncSeparate(t.BACK,i.stencilFuncBack,i.stencilRefBack,i.stencilMaskBack),e.stencilWriteMaskBack!==i.stencilWriteMaskBack&&t.stencilMaskSeparate(t.BACK,i.stencilWriteMaskBack),e.stencilFailOpBack===i.stencilFailOpBack&&e.stencilZFailOpBack===i.stencilZFailOpBack&&e.stencilZPassOpBack===i.stencilZPassOpBack||t.stencilOpSeparate(t.BACK,i.stencilFailOpBack,i.stencilZFailOpBack,i.stencilZPassOpBack)):(e.stencilFuncFront===i.stencilFuncFront&&e.stencilRefFront===i.stencilRefFront&&e.stencilMaskFront===i.stencilMaskFront||t.stencilFunc(i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),e.stencilWriteMaskFront!==i.stencilWriteMaskFront&&t.stencilMask(i.stencilWriteMaskFront),e.stencilFailOpFront===i.stencilFailOpFront&&e.stencilZFailOpFront===i.stencilZFailOpFront&&e.stencilZPassOpFront===i.stencilZPassOpFront||t.stencilOp(i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront)):i.stencilSep?(t.stencilFuncSeparate(t.FRONT,i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMaskSeparate(t.FRONT,i.stencilWriteMaskFront),t.stencilOpSeparate(t.FRONT,i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront),t.stencilFuncSeparate(t.BACK,i.stencilFuncBack,i.stencilRefBack,i.stencilMaskBack),t.stencilMaskSeparate(t.BACK,i.stencilWriteMaskBack),t.stencilOpSeparate(t.BACK,i.stencilFailOpBack,i.stencilZFailOpBack,i.stencilZPassOpBack)):(t.stencilFunc(i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMask(i.stencilWriteMaskFront),t.stencilOp(i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront))))}function v(t,e,i){e.cullMode!==i.cullMode&&(i.cullMode!==a.enums.CULL_NONE?(t.enable(t.CULL_FACE),t.cullFace(i.cullMode)):t.disable(t.CULL_FACE))}function g(t,e,i,n){var r=!1;if(-1!==n.maxStream){if(i.maxStream!==n.maxStream)r=!0;else if(i.program!==n.program)r=!0;else for(var s=0;s>>0},n.setBlendFunc=function(t,e){this._next.blendSep=!1,this._next.blendSrc=t,this._next.blendDst=e},n.setBlendFuncSep=function(t,e,i,n){this._next.blendSep=!0,this._next.blendSrc=t,this._next.blendDst=e,this._next.blendSrcAlpha=i,this._next.blendDstAlpha=n},n.setBlendEq=function(t){this._next.blendSep=!1,this._next.blendEq=t},n.setBlendEqSep=function(t,e){this._next.blendSep=!0,this._next.blendEq=t,this._next.blendAlphaEq=e},n.setCullMode=function(t){this._next.cullMode=t},n.setVertexBuffer=function(t,e,i){void 0===i&&(i=0),this._next.vertexBuffers[t]=e,this._next.vertexBufferOffsets[t]=i,this._next.maxStream=this._caps.maxTextureUnits?console.warn("Can not set texture "+t+" at stage "+i+", max texture exceed: "+this._caps.maxTextureUnits):(this._next.textureUnits[i]=e,this.setUniform(t,i),this._next.maxTextureSlot=this._caps.maxTextureUnits)console.warn("Can not set "+n+" textures for "+t+", max texture exceed: "+this._caps.maxTextureUnits);else{for(var r=0;rthis._bytes){if(t)return void console.error("Failed to update data, bytes exceed.");this._needExpandDataStore=!0,this._bytes=t+e.byteLength,this._numIndices=this._bytes/this._bytesPerIndex}var i=this._device._gl,n=this._usage;i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,this._glID),this._needExpandDataStore?(i.bufferData(i.ELEMENT_ARRAY_BUFFER,e,n),this._needExpandDataStore=!1):i.bufferSubData(i.ELEMENT_ARRAY_BUFFER,t,e),this._device._restoreIndexBuffer()}}else console.error("The buffer is destroyed")},n.setUsage=function(t){this._usage=t},e=t,(i=[{key:"count",get:function(){return this._numIndices}}])&&s(e.prototype,i),t})();o.BYTES_PER_INDEX=a;var c=o;i.default=c,e.exports=i.default}),{"./enums":266}],269:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("./enums");n={VertexFormat:t("./vertex-format"),IndexBuffer:t("./index-buffer"),VertexBuffer:t("./vertex-buffer"),Program:t("./program"),Texture:t("./texture"),Texture2D:t("./texture-2d"),TextureCube:t("./texture-cube"),RenderBuffer:t("./render-buffer"),FrameBuffer:t("./frame-buffer"),Device:t("./device"),attrTypeBytes:r.attrTypeBytes,glFilter:r.glFilter,glTextureFmt:r.glTextureFmt},Object.assign(n,r.enums);var s=n;i.default=s,cc.gfx=n,e.exports=i.default}),{"./device":265,"./enums":266,"./frame-buffer":267,"./index-buffer":268,"./program":271,"./render-buffer":272,"./texture":276,"./texture-2d":274,"./texture-cube":275,"./vertex-buffer":277,"./vertex-format":278}],270:[(function(t,e,i){"use strict";i.__esModule=!0,i.isPow2=function(t){return!(t&t-1||!t)}}),{}],271:[(function(t,e,i){"use strict";function n(t,e){for(var i=0;i0&&t.push({type:e,fileID:-1,line:0,message:i})}}))}var a=(function(){function t(t,e){this._device=t,this._attributes=[],this._uniforms=[],this._samplers=[],this._errors=[],this._linked=!1,this._vertSource=e.vert,this._fragSource=e.frag,this._glID=null,this._id=r++}var e,i,a=t.prototype;return a.link=function(){if(!this._linked){var t=this._device._gl,e=o(t,t.VERTEX_SHADER,this._vertSource),i=o(t,t.FRAGMENT_SHADER,this._fragSource),n=t.createProgram();t.attachShader(n,e),t.attachShader(n,i),t.linkProgram(n);var r=!1,a=this._errors;if(t.getShaderParameter(e,t.COMPILE_STATUS)||(s(a,"vs",t.getShaderInfoLog(e)),r=!0),t.getShaderParameter(i,t.COMPILE_STATUS)||(s(a,"fs",t.getShaderInfoLog(i)),r=!0),t.deleteShader(e),t.deleteShader(i),r)return a;if(!t.getProgramParameter(n,t.LINK_STATUS))return a.push({info:"Failed to link shader program: "+t.getProgramInfoLog(n)}),a;this._glID=n;for(var c=t.getProgramParameter(n,t.ACTIVE_ATTRIBUTES),l=0;l=s.enums.TEXTURE_FMT_RGB_DXT1&&this._format<=s.enums.TEXTURE_FMT_RGBA_PVRTC_4BPPV1||this._format>=s.enums.TEXTURE_FMT_RGB_ETC2&&this._format<=s.enums.TEXTURE_FMT_RGBA_ETC2),void 0!==t.genMipmaps&&(this._genMipmap=t.genMipmaps,i=t.genMipmaps);var n=this._device.caps.maxTextureSize||Number.MAX_VALUE,r=Math.max(t.width||0,t.height||0);n1&&(i=!1,(t.width>t.height?t.width:t.height)>>t.images.length-1!=1&&console.error("texture-2d mipmap is invalid, should have a 1x1 mipmap."))}(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height)||(i=!1),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this._glID),void 0!==t.images&&t.images.length>0&&(this._setMipmap(t.images,t.flipY,t.premultiplyAlpha),t.images.length>1&&(this._genMipmap=!0)),i&&(e.hint(e.GENERATE_MIPMAP_HINT,e.NICEST),e.generateMipmap(e.TEXTURE_2D),this._genMipmap=!0),this._setTexInfo(),this._device._restoreTexture(0)},r.updateSubImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this._glID),this._setSubImage(i,t),this._device._restoreTexture(0)},r.updateImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this._glID),this._setImage(i,t),this._device._restoreTexture(0)},r._setSubImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.image;!s||ArrayBuffer.isView(s)||s instanceof ArrayBuffer?(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),this._compressed?i.compressedTexSubImage2D(i.TEXTURE_2D,e.level,e.x,e.y,e.width,e.height,t.format,s):i.texSubImage2D(i.TEXTURE_2D,e.level,e.x,e.y,e.width,e.height,t.format,t.pixelType,s)):(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),i.texSubImage2D(i.TEXTURE_2D,e.level,e.x,e.y,t.format,t.pixelType,s))},r._setImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.image;!s||ArrayBuffer.isView(s)||s instanceof ArrayBuffer?(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),this._compressed?i.compressedTexImage2D(i.TEXTURE_2D,e.level,t.internalFormat,e.width,e.height,0,s):i.texImage2D(i.TEXTURE_2D,e.level,t.internalFormat,e.width,e.height,0,t.format,t.pixelType,s)):(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),i.texImage2D(i.TEXTURE_2D,e.level,t.internalFormat,t.format,t.pixelType,s))},r._setMipmap=function(t,e,i){for(var n=(0,s.glTextureFmt)(this._format),r={width:this._width,height:this._height,flipY:e,premultiplyAlpha:i,level:0,image:null},a=0;a>a,r.height=this._height>>a,r.image=t[a],this._setImage(n,r)},r._setTexInfo=function(){var t=this._device._gl,e=(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height);e||this._wrapS===s.enums.WRAP_CLAMP&&this._wrapT===s.enums.WRAP_CLAMP||(console.warn("WebGL1 doesn't support all wrap modes with NPOT textures"),this._wrapS=s.enums.WRAP_CLAMP,this._wrapT=s.enums.WRAP_CLAMP);var i=this._genMipmap?this._mipFilter:-1;e||-1===i||(console.warn("NPOT textures do not support mipmap filter"),i=-1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,(0,s.glFilter)(t,this._minFilter,i)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,(0,s.glFilter)(t,this._magFilter,-1)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this._wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this._wrapT);var n=this._device.ext("EXT_texture_filter_anisotropic");n&&t.texParameteri(t.TEXTURE_2D,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisotropy)},n})(r.default);i.default=o,e.exports=i.default}),{"./enums":266,"./misc":270,"./texture":276}],275:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("./texture"))&&n.__esModule?n:{default:n},s=t("./enums"),a=t("./misc"),o=(function(t){var e,i;function n(e,i){var n,r=(n=t.call(this,e)||this)._device._gl;return n._target=r.TEXTURE_CUBE_MAP,n._glID=r.createTexture(),n.update(i),n}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.update=function(t){var e=this._device._gl,i=this._genMipmaps;t&&(void 0!==t.width&&(this._width=t.width),void 0!==t.height&&(this._height=t.height),void 0!==t.anisotropy&&(this._anisotropy=t.anisotropy),void 0!==t.minFilter&&(this._minFilter=t.minFilter),void 0!==t.magFilter&&(this._magFilter=t.magFilter),void 0!==t.mipFilter&&(this._mipFilter=t.mipFilter),void 0!==t.wrapS&&(this._wrapS=t.wrapS),void 0!==t.wrapT&&(this._wrapT=t.wrapT),void 0!==t.format&&(this._format=t.format,this._compressed=this._format>=s.enums.TEXTURE_FMT_RGB_DXT1&&this._format<=s.enums.TEXTURE_FMT_RGBA_PVRTC_4BPPV1||this._format>=s.enums.TEXTURE_FMT_RGB_ETC2&&this._format<=s.enums.TEXTURE_FMT_RGBA_ETC2),void 0!==t.genMipmaps&&(this._genMipmaps=t.genMipmaps,i=t.genMipmaps),void 0!==t.images&&t.images.length>1&&(i=!1,t.width!==t.height&&console.warn("texture-cube width and height should be identical."),t.width>>t.images.length-1!=1&&console.error("texture-cube mipmap is invalid. please set mipmap as 1x1, 2x2, 4x4 ... nxn"))),(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height)||(i=!1),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_CUBE_MAP,this._glID),void 0!==t.images&&t.images.length>0&&(this._setMipmap(t.images,t.flipY,t.premultiplyAlpha),t.images.length>1&&(this._genMipmaps=!0)),i&&(e.hint(e.GENERATE_MIPMAP_HINT,e.NICEST),e.generateMipmap(e.TEXTURE_CUBE_MAP),this._genMipmaps=!0),this._setTexInfo(),this._device._restoreTexture(0)},r.updateSubImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_CUBE_MAP,this._glID),this._setSubImage(i,t),this._device._restoreTexture(0)},r.updateImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_CUBE_MAP,this._glID),this._setImage(i,t),this._device._restoreTexture(0)},r._setSubImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.faceIndex,a=e.image;void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),!a||ArrayBuffer.isView(a)||a instanceof ArrayBuffer?this._compressed?i.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,e.x,e.y,e.width,e.height,t.format,a):i.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,e.x,e.y,e.width,e.height,t.format,t.pixelType,a):i.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,e.x,e.y,t.format,t.pixelType,a)},r._setImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.faceIndex,a=e.image;void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),!a||ArrayBuffer.isView(a)||a instanceof ArrayBuffer?this._compressed?i.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,t.internalFormat,e.width,e.height,0,a):i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,t.internalFormat,e.width,e.height,0,t.format,t.pixelType,a):i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,t.internalFormat,t.format,t.pixelType,a)},r._setMipmap=function(t,e,i){for(var n=(0,s.glTextureFmt)(this._format),r={width:this._width,height:this._height,faceIndex:0,flipY:e,premultiplyAlpha:i,level:0,image:null},a=0;a>a,r.height=this._height>>a;for(var c=0;c<6;++c)r.faceIndex=c,r.image=o[c],this._setImage(n,r)}},r._setTexInfo=function(){var t=this._device._gl,e=(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height);e||this._wrapS===s.enums.WRAP_CLAMP&&this._wrapT===s.enums.WRAP_CLAMP||(console.warn("WebGL1 doesn't support all wrap modes with NPOT textures"),this._wrapS=s.enums.WRAP_CLAMP,this._wrapT=s.enums.WRAP_CLAMP);var i=this._genMipmaps?this._mipFilter:-1;e||-1===i||(console.warn("NPOT textures do not support mipmap filter"),i=-1),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,(0,s.glFilter)(t,this._minFilter,i)),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,(0,s.glFilter)(t,this._magFilter,-1)),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_S,this._wrapS),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_T,this._wrapT);var n=this._device.ext("EXT_texture_filter_anisotropic");n&&t.texParameteri(t.TEXTURE_CUBE_MAP,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisotropy)},n})(r.default);i.default=o,e.exports=i.default}),{"./enums":266,"./misc":270,"./texture":276}],276:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("./enums"),r=0,s=(function(){function t(t){this._device=t,this._width=4,this._height=4,this._genMipmaps=!1,this._compressed=!1,this._anisotropy=1,this._minFilter=n.enums.FILTER_LINEAR,this._magFilter=n.enums.FILTER_LINEAR,this._mipFilter=n.enums.FILTER_LINEAR,this._wrapS=n.enums.WRAP_REPEAT,this._wrapT=n.enums.WRAP_REPEAT,this._format=n.enums.TEXTURE_FMT_RGBA8,this._target=-1,this._id=r++}return t.prototype.destroy=function(){null!==this._glID?(this._device._gl.deleteTexture(this._glID),this._device._stats.tex-=this.bytes,this._glID=null):console.error("The texture already destroyed")},t})();i.default=s,e.exports=i.default}),{"./enums":266}],277:[(function(t,e,i){"use strict";function n(t,e){for(var i=0;ithis._bytes){if(t)return void console.error("Failed to update data, bytes exceed.");this._needExpandDataStore=!0,this._bytes=t+e.byteLength,this._numVertices=this._bytes/this._bytesPerVertex}var i=this._device._gl,n=this._usage;i.bindBuffer(i.ARRAY_BUFFER,this._glID),this._needExpandDataStore?(i.bufferData(i.ARRAY_BUFFER,e,n),this._needExpandDataStore=!1):i.bufferSubData(i.ARRAY_BUFFER,t,e),i.bindBuffer(i.ARRAY_BUFFER,null)}}else console.error("The buffer is destroyed")},r.getFormat=function(t){return this._format.element(t)},r.setUsage=function(t){this._usage=t},e=t,(i=[{key:"count",get:function(){return this._numVertices}}])&&n(e.prototype,i),t})();i.default=r,e.exports=i.default}),{"./enums":266}],278:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("./enums"),s=(n=t("../murmurhash2_gc"))&&n.__esModule?n:{default:n},a=(function(){function t(t){this._attr2el={},this._elements=[],this._bytes=0;for(var e="",i=0,n=t.length;ithis._data.length)for(var e=this._data.length;e=this._data.length&&this._resize(2*this._data.length),this._data[this._count]=t,++this._count},n.pop=function(){--this._count,this._count<0&&(this._count=0);var t=this._data[this._count];return this._data[this._count]=void 0,t},n.fastRemove=function(t){if(!(t>=this._count||t<0)){var e=this._count-1;this._data[t]=this._data[e],this._data[e]=void 0,this._count-=1}},n.indexOf=function(t){return this._data.indexOf(t)},n.sort=function(t){return(0,r.default)(this._data,0,this._count,t)},e=t,(i=[{key:"length",get:function(){return this._count}},{key:"data",get:function(){return this._data}}])&&s(e.prototype,i),t})();i.default=a,e.exports=i.default}),{"./timsort":285}],281:[(function(t,e,i){"use strict";i.__esModule=!0,i.TypedArrayPool=i.RecyclePool=i.Pool=i.LinkedArray=i.FixedArray=i.CircularPool=void 0;var n=l(t("./circular-pool"));i.CircularPool=n.default;var r=l(t("./fixed-array"));i.FixedArray=r.default;var s=l(t("./linked-array"));i.LinkedArray=s.default;var a=l(t("./pool"));i.Pool=a.default;var o=l(t("./recycle-pool"));i.RecyclePool=o.default;var c=l(t("./typed-array-pool"));function l(t){return t&&t.__esModule?t:{default:t}}i.TypedArrayPool=c.default}),{"./circular-pool":279,"./fixed-array":280,"./linked-array":282,"./pool":283,"./recycle-pool":284,"./typed-array-pool":286}],282:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("./pool"))&&n.__esModule?n:{default:n};function s(t,e){for(var i=0;ithis._data.length)for(var e=this._data.length;e=this._data.length&&this.resize(2*this._data.length),this._data[this._count++]},n.remove=function(t){if(!(t>=this._count)){var e=this._count-1,i=this._data[t];this._data[t]=this._data[e],this._data[e]=i,this._count-=1}},n.sort=function(t){return(0,r.default)(this._data,0,this._count,t)},e=t,(i=[{key:"length",get:function(){return this._count}},{key:"data",get:function(){return this._data}}])&&s(e.prototype,i),t})();i.default=a,cc.RecyclePool=a,e.exports=i.default}),{"./timsort":285}],285:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e,i,r){if(!Array.isArray(t))throw new TypeError("Can only sort arrays");void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=c);var s=i-e;if(!(s<2)){var a=0;if(su&&(d=u),f(t,e,e+d,e+a,r),a=d}o.pushRun(e,a),o.mergeRuns(),s-=a,e+=a}while(0!==s);o.forceMergeRuns()}};var n=32,r=7,s=256,a=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function o(t){return t<1e5?t<100?t<10?0:1:t<1e4?t<1e3?2:3:4:t<1e7?t<1e6?5:6:t<1e9?t<1e8?7:8:9}function c(t,e){if(t===e)return 0;if(~~t===t&&~~e===e){if(0===t||0===e)return t=0)return-1;if(t>=0)return 1;t=-t,e=-e}var i=o(t),n=o(e),r=0;return in&&(e*=a[i-n-1],t/=10,r=1),t===e?r:t=n;)e|=1&t,t>>=1;return t+e}function h(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function u(t,e,i){for(i--;e>>1;r(s,t[c])<0?o=c:a=c+1}var l=n-a;switch(l){case 3:t[a+3]=t[a+2];case 2:t[a+2]=t[a+1];case 1:t[a+1]=t[a];break;default:for(;l>0;)t[a+l]=t[a+l-1],l--}t[a]=s}}function d(t,e,i,n,r,s){var a=0,o=0,c=1;if(s(t,e[i+r])>0){for(o=n-r;c0;)a=c,(c=1+(c<<1))<=0&&(c=o);c>o&&(c=o),a+=r,c+=r}else{for(o=r+1;co&&(c=o);var l=a;a=r-c,c=r-l}for(a++;a>>1);s(t,e[i+h])>0?a=h+1:c=h}return c}function _(t,e,i,n,r,s){var a=0,o=0,c=1;if(s(t,e[i+r])<0){for(o=r+1;co&&(c=o);var l=a;a=r-c,c=r-l}else{for(o=n-r;c=0;)a=c,(c=1+(c<<1))<=0&&(c=o);c>o&&(c=o),a+=r,c+=r}for(a++;a>>1);s(t,e[i+h])<0?c=h:a=h+1}return c}var p=(function(){function t(t,e){this.array=t,this.compare=e,this.minGallop=r,this.length=t.length,this.tmpStorageLength=s,this.length<2*s&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}var e=t.prototype;return e.pushRun=function(t,e){this.runStart[this.stackSize]=t,this.runLength[this.stackSize]=e,this.stackSize+=1},e.mergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;if(t>=1&&this.runLength[t-1]<=this.runLength[t]+this.runLength[t+1]||t>=2&&this.runLength[t-2]<=this.runLength[t]+this.runLength[t-1])this.runLength[t-1]this.runLength[t+1])break;this.mergeAt(t)}},e.forceMergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;t>0&&this.runLength[t-1]=r||v>=r);if(g)break;f<0&&(f=0),f+=2}if(this.minGallop=f,f<1&&(this.minGallop=1),1===e){for(c=0;c=0;c--)a[p+c]=a[f+c];if(0===e){y=!0;break}}if(a[u--]=o[h--],1==--n){y=!0;break}if(0!=(m=n-d(a[l],o,0,n,n-1,s))){for(n-=m,p=1+(u-=m),f=1+(h-=m),c=0;c=r||m>=r);if(y)break;v<0&&(v=0),v+=2}if(this.minGallop=v,v<1&&(this.minGallop=1),1===n){for(p=1+(u-=e),f=1+(l-=e),c=e-1;c>=0;c--)a[p+c]=a[f+c];a[u]=o[h]}else{if(0===n)throw new Error("mergeHigh preconditions were not respected");for(f=u-(n-1),c=0;c=0;c--)a[p+c]=a[f+c];a[u]=o[h]}else for(f=u-(n-1),c=0;c65535)<<4,e|=i=((t>>>=e)>255)<<3,e|=i=((t>>>=i)>15)<<2,(e|=i=((t>>>=i)>3)<<1)|(t>>>=i)>>1}function o(t){var e=s(t),i=n[a(e)>>2];return i.length>0?i.pop():new ArrayBuffer(e)}var c={alloc_int8:function(t){var e=new Int8Array(o(t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_uint8:function(t){var e=new Uint8Array(o(t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_int16:function(t){var e=new Int16Array(o(2*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_uint16:function(t){var e=new Uint16Array(o(2*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_int32:function(t){var e=new Int32Array(o(4*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_uint32:function(t){var e=new Uint32Array(o(4*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_float32:function(t){var e=new Float32Array(o(4*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_float64:function(t){var e=new Float64Array(o(8*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_dataview:function(t){var e=new DataView(o(t),0,t);return e.length!==t?e.subarray(0,t):e},free:function(t){var e;e=t.buffer,n[a(e.byteLength)>>2].push(e)},reset:function(){for(var t=Array(8),e=0;e<8;++e)t[e]=[]}};i.default=c,e.exports=i.default}),{}],287:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e){for(var i,n=t.length,r=e^n,s=0;n>=4;)i=1540483477*(65535&(i=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24))+((1540483477*(i>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),n-=4,++s;switch(n){case 3:r^=(255&t.charCodeAt(s+2))<<16;case 2:r^=(255&t.charCodeAt(s+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(s)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0},e.exports=i.default}),{}],288:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("../../core/value-types"),r=o(t("../core/base-renderer")),s=o(t("../enums")),a=t("../memop");function o(t){return t&&t.__esModule?t:{default:t}}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var l=new Float32Array(16),h=new Float32Array(16),u=new Float32Array(16),f=new Float32Array(16),d=new Float32Array(4),_=new Float32Array(64),p=[],v=new Float32Array(4),g=new n.Vec4(0,0,0,0),m=new n.Vec3(0,0,0),y=new n.Vec3(0,0,0),E=new a.RecyclePool(function(){return new Float32Array(16)},8);function T(t,e){return t._priority-e._priority}var A=(function(t){var e,i;function r(e,i){var n;return(n=t.call(this,e,i)||this)._time=new Float32Array(4),n._lights=[],n._shadowLights=[],n._numLights=0,n._defines={},n._registerStage("shadowcast",n._shadowStage.bind(c(n))),n._registerStage("opaque",n._opaqueStage.bind(c(n))),n._registerStage("transparent",n._transparentStage.bind(c(n))),n}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var a=r.prototype;return a.reset=function(){E.reset(),t.prototype.reset.call(this)},a.render=function(t,e){this.reset(),e&&(this._time[0]+=e,this._time[1]=e,this._time[2]++),this._device.setUniform("cc_time",this._time),this._updateLights(t);for(var i=this._device._gl.canvas,n=0;n0){for(var e=E.add(),i=E.add(),n=E.add(),r=Math.min(4,this._lights.length),a=0;a":0}),u=cc.Enum({REALTIME:0,SHARED_CACHE:1,PRIVATE_CACHE:2});sp.Skeleton=cc.Class({name:"sp.Skeleton",extends:n,editor:!1,statics:{AnimationCacheMode:u},properties:{paused:{default:!1,visible:!1},skeletonData:{default:null,type:sp.SkeletonData,notify:function(){this.defaultSkin="",this.defaultAnimation="",this._updateSkeletonData()},tooltip:!1},defaultSkin:{default:"",visible:!1},defaultAnimation:{default:"",visible:!1},animation:{get:function(){if(this.isAnimationCached())return this._animationName;var t=this.getCurrent(0);return t&&t.animation.name||""},set:function(t){this.defaultAnimation=t,t?this.setAnimation(0,t,this.loop):this.isAnimationCached()||(this.clearTrack(0),this.setToSetupPose())},visible:!1},_defaultSkinIndex:{get:function(){if(this.skeletonData){var t=this.skeletonData.getSkinsEnum();if(t)if(""===this.defaultSkin){if(t.hasOwnProperty(0))return this._defaultSkinIndex=0,0}else{var e=t[this.defaultSkin];if(void 0!==e)return e}}return 0},set:function(t){var e;if(this.skeletonData&&(e=this.skeletonData.getSkinsEnum()),!e)return cc.errorID("",this.name);var i=e[t];void 0!==i?(this.defaultSkin=i,this.setSkin(this.defaultSkin)):cc.errorID(7501,this.name)},type:l,visible:!0,animatable:!1,displayName:"Default Skin",tooltip:!1},_animationIndex:{get:function(){var t=this.animation;if(this.skeletonData&&t){var e=this.skeletonData.getAnimsEnum();if(e){var i=e[t];if(void 0!==i)return i}}return 0},set:function(t){if(0!==t){var e;if(this.skeletonData&&(e=this.skeletonData.getAnimsEnum()),!e)return cc.errorID(7502,this.name);var i=e[t];void 0!==i?this.animation=i:cc.errorID(7503,this.name)}else this.animation=""},type:h,visible:!0,animatable:!1,displayName:"Animation",tooltip:!1},_preCacheMode:-1,_cacheMode:u.REALTIME,_defaultCacheMode:{default:0,type:u,notify:function(){this.setAnimationCacheMode(this._defaultCacheMode)},editorOnly:!0,visible:!0,animatable:!1,displayName:"Animation Cache Mode",tooltip:!1},loop:{default:!0,tooltip:!1},premultipliedAlpha:{default:!0,tooltip:!1},timeScale:{default:1,tooltip:!1},debugSlots:{default:!1,editorOnly:!0,tooltip:!1,notify:function(){this._updateDebugDraw()}},debugBones:{default:!1,editorOnly:!0,tooltip:!1,notify:function(){this._updateDebugDraw()}},debugMesh:{default:!1,editorOnly:!0,tooltip:!1,notify:function(){this._updateDebugDraw()}},useTint:{default:!1,tooltip:!1,notify:function(){this._updateUseTint()}},enableBatch:{default:!1,notify:function(){this._updateBatch()},tooltip:!1},_accTime:0,_playCount:0,_frameCache:null,_curFrame:null,_skeletonCache:null,_animationName:"",_animationQueue:[],_headAniInfo:null,_playTimes:0,_isAniComplete:!0},ctor:function(){this._effectDelegate=null,this._skeleton=null,this._rootBone=null,this._listener=null,this._materialCache={},this._debugRenderer=null,this._startSlotIndex=-1,this._endSlotIndex=-1,this._startEntry={animation:{name:""},trackIndex:0},this._endEntry={animation:{name:""},trackIndex:0},this.attachUtil=new c},_getDefaultMaterial:function(){return cc.Material.getBuiltinMaterial("2d-spine")},_updateMaterial:function(){var t=this.useTint||this.isAnimationCached()&&!0,e=this.getMaterial(0);if(e){e.define("USE_TINT",t),e.define("CC_USE_MODEL",!this.enableBatch);var i=this.premultipliedAlpha?cc.gfx.BLEND_ONE:cc.gfx.BLEND_SRC_ALPHA,n=cc.gfx.BLEND_ONE_MINUS_SRC_ALPHA;e.setBlend(!0,cc.gfx.BLEND_FUNC_ADD,i,i,cc.gfx.BLEND_FUNC_ADD,n,n)}this._materialCache={}},disableRender:function(){this._super(),this.node._renderFlag&=~a},markForRender:function(t){this._super(t),t?this.node._renderFlag|=a:this.node._renderFlag&=~a},_updateUseTint:function(){var t=this.getMaterial(0);if(t){var e=this.useTint||this.isAnimationCached()&&!0;t.define("USE_TINT",e)}this._materialCache={}},_updateBatch:function(){var t=this.getMaterial(0);t&&t.define("CC_USE_MODEL",!this.enableBatch),this._materialCache={}},_validateRender:function(){var t=this.skeletonData;t&&t.isTexturesLoaded()?this._super():this.disableRender()},setSkeletonData:function(t){if(null!=t.width&&null!=t.height&&this.node.setContentSize(t.width,t.height),this._cacheMode===u.SHARED_CACHE?this._skeletonCache=o.sharedCache:this._cacheMode===u.PRIVATE_CACHE&&(this._skeletonCache=new o,this._skeletonCache.enablePrivateMode()),this.isAnimationCached()){(this.debugBones||this.debugSlots)&&cc.warn("Debug bones or slots is invalid in cached mode");var e=this._skeletonCache.getSkeletonCache(this.skeletonData._uuid,t);this._skeleton=e.skeleton,this._clipper=e.clipper,this._rootBone=this._skeleton.getRootBone()}else this._skeleton=new r.Skeleton(t),this._clipper=new r.SkeletonClipping,this._rootBone=this._skeleton.getRootBone();this.markForRender(!0)},setSlotsRange:function(t,e){this.isAnimationCached()?cc.warn("Slots visible range can not be modified in cached mode."):(this._startSlotIndex=t,this._endSlotIndex=e)},setAnimationStateData:function(t){if(this.isAnimationCached())cc.warn("'setAnimationStateData' interface can not be invoked in cached mode.");else{var e=new r.AnimationState(t);this._listener&&(this._state&&this._state.removeListener(this._listener),e.addListener(this._listener)),this._state=e}},__preload:function(){this._super();for(var t=this.node.children,e=0,i=t.length;ethis._headAniInfo.delay){var n=this._headAniInfo;this._headAniInfo=null,this.setAnimation(0,n.animationName,n.loop)}return}this._updateCache(t)}else this._updateRealtime(t)},_emitCacheCompleteEvent:function(){this._listener&&(this._endEntry.animation.name=this._animationName,this._listener.complete&&this._listener.complete(this._endEntry),this._listener.end&&this._listener.end(this._endEntry))},_updateCache:function(t){var e=this._frameCache;if(e.isInited()){var i=e.frames,n=o.FrameTime;0==this._accTime&&0==this._playCount&&(this._startEntry.animation.name=this._animationName,this._listener&&this._listener.start&&this._listener.start(this._startEntry)),this._accTime+=t;var r=Math.floor(this._accTime/n);if(e.isCompleted||e.updateToFrame(r),e.isCompleted&&r>=i.length){if(this._playCount++,this._playTimes>0&&this._playCount>=this._playTimes)return this._curFrame=i[i.length-1],this._accTime=0,this._playCount=0,this._isAniComplete=!0,void this._emitCacheCompleteEvent();this._accTime=0,r=0,this._emitCacheCompleteEvent()}this._curFrame=i[r]}},_updateRealtime:function(t){var e=this._skeleton,i=this._state;e&&(e.update(t),i&&(i.update(t),i.apply(e)))},setVertexEffectDelegate:function(t){this._effectDelegate=t},updateWorldTransform:function(){this.isAnimationCached()&&this._skeleton&&this._skeleton.updateWorldTransform()},setToSetupPose:function(){this._skeleton&&this._skeleton.setToSetupPose()},setBonesToSetupPose:function(){this._skeleton&&this._skeleton.setBonesToSetupPose()},setSlotsToSetupPose:function(){this._skeleton&&this._skeleton.setSlotsToSetupPose()},updateAnimationCache:function(t){if(this.isAnimationCached()){var e=this.skeletonData._uuid;this._skeletonCache&&this._skeletonCache.updateAnimationCache(e,t)}},invalidAnimationCache:function(){this.isAnimationCached()&&this._skeletonCache&&this._skeletonCache.invalidAnimationCache(this.skeletonData._uuid)},findBone:function(t){return this._skeleton?this._skeleton.findBone(t):null},findSlot:function(t){return this._skeleton?this._skeleton.findSlot(t):null},setSkin:function(t){this._skeleton&&(this._skeleton.setSkinByName(t),this._skeleton.setSlotsToSetupPose()),this.invalidAnimationCache()},getAttachment:function(t,e){return this._skeleton?this._skeleton.getAttachmentByName(t,e):null},setAttachment:function(t,e){this._skeleton&&this._skeleton.setAttachment(t,e),this.invalidAnimationCache()},getTextureAtlas:function(t){return t.region},setMix:function(t,e,i){this._state&&this._state.data.setMix(t,e,i)},setAnimation:function(t,e,i){if(this._playTimes=i?0:1,this._animationName=e,this.isAnimationCached()){if(0!==t&&cc.warn("Track index can not greater than 0 in cached mode."),!this._skeletonCache)return null;var n=this._skeletonCache.getAnimationCache(this.skeletonData._uuid,e);n||(n=this._skeletonCache.initAnimationCache(this.skeletonData._uuid,e)),n&&(this._isAniComplete=!1,this._accTime=0,this._playCount=0,this._frameCache=n,this.attachUtil._hasAttachedNode()&&this._frameCache.enableCacheAttachedInfo(),this._frameCache.updateToFrame(0),this._curFrame=this._frameCache.frames[0])}else if(this._skeleton){var r=this._skeleton.data.findAnimation(e);if(!r)return cc.logID(7509,e),null;var s=this._state.setAnimationWith(t,r,i);return this._state.apply(this._skeleton),s}return null},addAnimation:function(t,e,i,n){if(n=n||0,this.isAnimationCached())0!==t&&cc.warn("Track index can not greater than 0 in cached mode."),this._animationQueue.push({animationName:e,loop:i,delay:n});else if(this._skeleton){var r=this._skeleton.data.findAnimation(e);return r?this._state.addAnimationWith(t,r,i,n):(cc.logID(7510,e),null)}return null},findAnimation:function(t){return this._skeleton?this._skeleton.data.findAnimation(t):null},getCurrent:function(t){if(this.isAnimationCached())cc.warn("'getCurrent' interface can not be invoked in cached mode.");else if(this._state)return this._state.getCurrent(t);return null},clearTracks:function(){this.isAnimationCached()?cc.warn("'clearTracks' interface can not be invoked in cached mode."):this._state&&this._state.clearTracks()},clearTrack:function(t){this.isAnimationCached()?cc.warn("'clearTrack' interface can not be invoked in cached mode."):this._state&&this._state.clearTrack(t)},setStartListener:function(t){this._ensureListener(),this._listener.start=t},setInterruptListener:function(t){this._ensureListener(),this._listener.interrupt=t},setEndListener:function(t){this._ensureListener(),this._listener.end=t},setDisposeListener:function(t){this._ensureListener(),this._listener.dispose=t},setCompleteListener:function(t){this._ensureListener(),this._listener.complete=t},setEventListener:function(t){this._ensureListener(),this._listener.event=t},setTrackStartListener:function(t,e){i.getListeners(t).start=e},setTrackInterruptListener:function(t,e){i.getListeners(t).interrupt=e},setTrackEndListener:function(t,e){i.getListeners(t).end=e},setTrackDisposeListener:function(t,e){i.getListeners(t).dispose=e},setTrackCompleteListener:function(t,e){i.getListeners(t).complete=function(t){var i=Math.floor(t.trackTime/t.animationEnd);e(t,i)}},setTrackEventListener:function(t,e){i.getListeners(t).event=e},getState:function(){return this._state},_updateAnimEnum:!1,_updateSkinEnum:!1,_ensureListener:function(){this._listener||(this._listener=new i,this._state&&this._state.addListener(this._listener))},_updateSkeletonData:function(){if(this.skeletonData){var t=this.skeletonData.getRuntimeData();if(t){try{this.setSkeletonData(t),this.isAnimationCached()||this.setAnimationStateData(new r.AnimationStateData(this._skeleton.data)),this.defaultSkin&&this.setSkin(this.defaultSkin)}catch(e){cc.warn(e)}this.attachUtil.init(this),this.attachUtil._associateAttachedNode(),this._preCacheMode=this._cacheMode,this.animation=this.defaultAnimation}else this.disableRender()}else this.disableRender()},_refreshInspector:function(){this._updateAnimEnum(),this._updateSkinEnum(),Editor.Utils.refreshSelectedInspector("node",this.node.uuid)},_updateDebugDraw:function(){if(this.debugBones||this.debugSlots){if(!this._debugRenderer){var t=new cc.PrivateNode;t.name="DEBUG_DRAW_NODE";var e=t.addComponent(s);e.lineWidth=1,e.strokeColor=cc.color(255,0,0,255),this._debugRenderer=e}this._debugRenderer.node.parent=this.node,this.isAnimationCached()&&cc.warn("Debug bones or slots is invalid in cached mode")}else this._debugRenderer&&(this._debugRenderer.node.parent=null)}}),e.exports=sp.Skeleton}),{"../../cocos2d/core/components/CCRenderComponent":115,"../../cocos2d/core/graphics/graphics":144,"../../cocos2d/core/renderer/render-flow":182,"./AttachUtil":298,"./lib/spine":301,"./skeleton-cache":302,"./track-entry-listeners":306}],300:[(function(t){"use strict";var e="undefined"==typeof window?global:window;e.spine=t("./lib/spine"),e.sp={},sp._timeScale=1,Object.defineProperty(sp,"timeScale",{get:function(){return this._timeScale},set:function(t){this._timeScale=t},configurable:!0}),sp.ATTACHMENT_TYPE={REGION:0,BOUNDING_BOX:1,MESH:2,SKINNED_MESH:3},sp.AnimationEventType=cc.Enum({START:0,INTERRUPT:1,END:2,DISPOSE:3,COMPLETE:4,EVENT:5}),sp.spine=e.spine,t("./skeleton-texture"),t("./skeleton-data"),t("./vertex-effect-delegate"),t("./Skeleton"),t("./spine-assembler")}),{"./Skeleton":299,"./lib/spine":301,"./skeleton-data":303,"./skeleton-texture":304,"./spine-assembler":305,"./vertex-effect-delegate":307}],301:[(function(t,e){"use strict";var i,n,r,s=(i=function(t,e){return(i=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])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});(function(t){var e,i,n,r=(function(){function t(t,e,i){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var n=0;n0&&(e%=this.duration));for(var c=this.timelines,l=0,h=c.length;l>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.linearSearch=function(t,e,i){for(var n=0,r=t.length-i;n<=r;n+=i)if(t[n]>e)return n;return-1},t})();t.Animation=r,(function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"})(e=t.MixBlend||(t.MixBlend={})),(function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"})(i=t.MixDirection||(t.MixDirection={})),(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(n=t.TimelineType||(t.TimelineType={}));var a=(function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var a=.03*(2*-i+r),o=.03*(2*-n+s),c=.006*(3*(i-r)+1),l=.006*(3*(n-s)+1),h=2*a+c,u=2*o+l,f=.3*i+a+.16666667*c,d=.3*n+o+.16666667*l,_=t*e.BEZIER_SIZE,p=this.curves;p[_++]=e.BEZIER;for(var v=f,g=d,m=_+e.BEZIER_SIZE-1;_=n){var h=void 0,u=void 0;return s==c?(h=0,u=0):(h=r[s-2],u=r[s-1]),u+(r[s+1]-u)*(n-h)/(o-h)}var f=r[s-1];return f+(1-f)*(n-o)/(1-o)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e})();t.CurveTimeline=a;var o=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=i},a.prototype.apply=function(t,i,n,s,o,c){var l=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=l[l.length-a.ENTRIES]){var f=l[l.length+a.PREV_ROTATION];switch(c){case e.setup:h.rotation=h.data.rotation+f*o;break;case e.first:case e.replace:f+=h.data.rotation-h.rotation,f-=360*(16384-(16384.499999999996-f/360|0));case e.add:h.rotation+=f*o}}else{var d=r.binarySearch(l,n,a.ENTRIES),_=l[d+a.PREV_ROTATION],p=l[d],v=this.getCurvePercent((d>>1)-1,1-(n-p)/(l[d+a.PREV_TIME]-p)),g=l[d+a.ROTATION]-_;switch(g=_+(g-360*(16384-(16384.499999999996-g/360|0)))*v,c){case e.setup:h.rotation=h.data.rotation+(g-360*(16384-(16384.499999999996-g/360|0)))*o;break;case e.first:case e.replace:g+=h.data.rotation-h.rotation;case e.add:h.rotation+=(g-360*(16384-(16384.499999999996-g/360|0)))*o}}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a})(a);t.RotateTimeline=o;var c=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=i,this.frames[t+a.Y]=n},a.prototype.apply=function(t,i,n,s,o,c){var l=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=l[l.length-a.ENTRIES])u=l[l.length+a.PREV_X],f=l[l.length+a.PREV_Y];else{var d=r.binarySearch(l,n,a.ENTRIES);u=l[d+a.PREV_X],f=l[d+a.PREV_Y];var _=l[d],p=this.getCurvePercent(d/a.ENTRIES-1,1-(n-_)/(l[d+a.PREV_TIME]-_));u+=(l[d+a.X]-u)*p,f+=(l[d+a.Y]-f)*p}switch(c){case e.setup:h.x=h.data.x+u*o,h.y=h.data.y+f*o;break;case e.first:case e.replace:h.x+=(h.data.x+u-h.x)*o,h.y+=(h.data.y+f-h.y)*o;break;case e.add:h.x+=u*o,h.y+=f*o}}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_X=-2,a.PREV_Y=-1,a.X=1,a.Y=2,a})(a);t.TranslateTimeline=c;var l=(function(a){function o(t){return a.call(this,t)||this}return s(o,a),o.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},o.prototype.apply=function(n,s,a,c,l,h,u){var f=this.frames,d=n.bones[this.boneIndex];if(d.active)if(a=f[f.length-o.ENTRIES])_=f[f.length+o.PREV_X]*d.data.scaleX,p=f[f.length+o.PREV_Y]*d.data.scaleY;else{var v=r.binarySearch(f,a,o.ENTRIES);_=f[v+o.PREV_X],p=f[v+o.PREV_Y];var g=f[v],m=this.getCurvePercent(v/o.ENTRIES-1,1-(a-g)/(f[v+o.PREV_TIME]-g));_=(_+(f[v+o.X]-_)*m)*d.data.scaleX,p=(p+(f[v+o.Y]-p)*m)*d.data.scaleY}if(1==l)h==e.add?(d.scaleX+=_-d.data.scaleX,d.scaleY+=p-d.data.scaleY):(d.scaleX=_,d.scaleY=p);else{var y=0,E=0;if(u==i.mixOut)switch(h){case e.setup:y=d.data.scaleX,E=d.data.scaleY,d.scaleX=y+(Math.abs(_)*t.MathUtils.signum(y)-y)*l,d.scaleY=E+(Math.abs(p)*t.MathUtils.signum(E)-E)*l;break;case e.first:case e.replace:y=d.scaleX,E=d.scaleY,d.scaleX=y+(Math.abs(_)*t.MathUtils.signum(y)-y)*l,d.scaleY=E+(Math.abs(p)*t.MathUtils.signum(E)-E)*l;break;case e.add:y=d.scaleX,E=d.scaleY,d.scaleX=y+(Math.abs(_)*t.MathUtils.signum(y)-d.data.scaleX)*l,d.scaleY=E+(Math.abs(p)*t.MathUtils.signum(E)-d.data.scaleY)*l}else switch(h){case e.setup:y=Math.abs(d.data.scaleX)*t.MathUtils.signum(_),E=Math.abs(d.data.scaleY)*t.MathUtils.signum(p),d.scaleX=y+(_-y)*l,d.scaleY=E+(p-E)*l;break;case e.first:case e.replace:y=Math.abs(d.scaleX)*t.MathUtils.signum(_),E=Math.abs(d.scaleY)*t.MathUtils.signum(p),d.scaleX=y+(_-y)*l,d.scaleY=E+(p-E)*l;break;case e.add:y=t.MathUtils.signum(_),E=t.MathUtils.signum(p),d.scaleX=Math.abs(d.scaleX)*y+(_-Math.abs(d.data.scaleX)*y)*l,d.scaleY=Math.abs(d.scaleY)*E+(p-Math.abs(d.data.scaleY)*E)*l}}}},o})(c);t.ScaleTimeline=l;var h=(function(t){function i(e){return t.call(this,e)||this}return s(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,s,a,o,c){var l=this.frames,h=t.bones[this.boneIndex];if(h.active)if(s=l[l.length-i.ENTRIES])u=l[l.length+i.PREV_X],f=l[l.length+i.PREV_Y];else{var d=r.binarySearch(l,s,i.ENTRIES);u=l[d+i.PREV_X],f=l[d+i.PREV_Y];var _=l[d],p=this.getCurvePercent(d/i.ENTRIES-1,1-(s-_)/(l[d+i.PREV_TIME]-_));u+=(l[d+i.X]-u)*p,f+=(l[d+i.Y]-f)*p}switch(c){case e.setup:h.shearX=h.data.shearX+u*o,h.shearY=h.data.shearY+f*o;break;case e.first:case e.replace:h.shearX+=(h.data.shearX+u-h.shearX)*o,h.shearY+=(h.data.shearY+f-h.shearY)*o;break;case e.add:h.shearX+=u*o,h.shearY+=f*o}}},i})(c);t.ShearTimeline=h;var u=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,this.frames[t+a.B]=r,this.frames[t+a.A]=s},a.prototype.apply=function(t,i,n,s,o,c){var l=t.slots[this.slotIndex];if(l.bone.active){var h=this.frames;if(n=h[h.length-a.ENTRIES]){var g=h.length;d=h[g+a.PREV_R],_=h[g+a.PREV_G],p=h[g+a.PREV_B],v=h[g+a.PREV_A]}else{var m=r.binarySearch(h,n,a.ENTRIES);d=h[m+a.PREV_R],_=h[m+a.PREV_G],p=h[m+a.PREV_B],v=h[m+a.PREV_A];var y=h[m],E=this.getCurvePercent(m/a.ENTRIES-1,1-(n-y)/(h[m+a.PREV_TIME]-y));d+=(h[m+a.R]-d)*E,_+=(h[m+a.G]-_)*E,p+=(h[m+a.B]-p)*E,v+=(h[m+a.A]-v)*E}1==o?l.color.set(d,_,p,v):(u=l.color,c==e.setup&&u.setFromColor(l.data.color),u.add((d-u.r)*o,(_-u.g)*o,(p-u.b)*o,(v-u.a)*o))}}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_R=-4,a.PREV_G=-3,a.PREV_B=-2,a.PREV_A=-1,a.R=1,a.G=2,a.B=3,a.A=4,a})(a);t.ColorTimeline=u;var f=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s,o,c,l){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,this.frames[t+a.B]=r,this.frames[t+a.A]=s,this.frames[t+a.R2]=o,this.frames[t+a.G2]=c,this.frames[t+a.B2]=l},a.prototype.apply=function(t,i,n,s,o,c){var l=t.slots[this.slotIndex];if(l.bone.active){var h=this.frames;if(n=h[h.length-a.ENTRIES]){var A=h.length;p=h[A+a.PREV_R],v=h[A+a.PREV_G],g=h[A+a.PREV_B],m=h[A+a.PREV_A],y=h[A+a.PREV_R2],E=h[A+a.PREV_G2],T=h[A+a.PREV_B2]}else{var x=r.binarySearch(h,n,a.ENTRIES);p=h[x+a.PREV_R],v=h[x+a.PREV_G],g=h[x+a.PREV_B],m=h[x+a.PREV_A],y=h[x+a.PREV_R2],E=h[x+a.PREV_G2],T=h[x+a.PREV_B2];var C=h[x],b=this.getCurvePercent(x/a.ENTRIES-1,1-(n-C)/(h[x+a.PREV_TIME]-C));p+=(h[x+a.R]-p)*b,v+=(h[x+a.G]-v)*b,g+=(h[x+a.B]-g)*b,m+=(h[x+a.A]-m)*b,y+=(h[x+a.R2]-y)*b,E+=(h[x+a.G2]-E)*b,T+=(h[x+a.B2]-T)*b}1==o?(l.color.set(p,v,g,m),l.darkColor.set(y,E,T,1)):(u=l.color,f=l.darkColor,c==e.setup&&(u.setFromColor(l.data.color),f.setFromColor(l.data.darkColor)),u.add((p-u.r)*o,(v-u.g)*o,(g-u.b)*o,(m-u.a)*o),f.add((y-f.r)*o,(E-f.g)*o,(T-f.b)*o,0))}}},a.ENTRIES=8,a.PREV_TIME=-8,a.PREV_R=-7,a.PREV_G=-6,a.PREV_B=-5,a.PREV_A=-4,a.PREV_R2=-3,a.PREV_G2=-2,a.PREV_B2=-1,a.R=1,a.G=2,a.B=3,a.A=4,a.R2=5,a.G2=6,a.B2=7,a})(a);t.TwoColorTimeline=f;var d=(function(){function s(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return s.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},s.prototype.getFrameCount=function(){return this.frames.length},s.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},s.prototype.apply=function(t,n,s,a,o,c,l){var h=t.slots[this.slotIndex];if(h.bone.active)if(l!=i.mixOut||c!=e.setup){var u=this.frames;if(s=u[u.length-1]?u.length-1:r.binarySearch(u,s,1)-1;var _=this.attachmentNames[d];t.slots[this.slotIndex].setAttachment(null==_?null:t.getAttachment(this.slotIndex,_))}}else{var p=h.data.attachmentName;h.setAttachment(null==p?null:t.getAttachment(this.slotIndex,p))}},s})();t.AttachmentTimeline=d;var _=null,p=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==_&&(_=t.Utils.newFloatArray(64)),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},a.prototype.apply=function(i,n,s,a,o,c){var l=i.slots[this.slotIndex];if(l.bone.active){var h=l.getAttachment();if(h instanceof t.VertexAttachment&&h.deformAttachment==this.attachment){var u=l.deform;0==u.length&&(c=e.setup);var f=this.frameVertices,d=f[0].length,_=this.frames;if(s<_[0]){var p=h;switch(c){case e.setup:return void(u.length=0);case e.first:if(1==o){u.length=0;break}var v=t.Utils.setArraySize(u,d);if(null==p.bones)for(var g=p.vertices,m=0;m=_[_.length-1]){var E=f[_.length-1];if(1==o)if(c==e.add)if(null==(p=h).bones){g=p.vertices;for(var T=0;Ti)this.apply(t,e,Number.MAX_VALUE,n,s,a,o),e=-1;else if(e>=c[l-1])return;if(!(i0&&c[h-1]==u;)h--;for(;h=c[h];h++)n.push(this.events[h])}}},e})();t.EventTimeline=v;var g=(function(){function s(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return s.prototype.getPropertyId=function(){return n.drawOrder<<24},s.prototype.getFrameCount=function(){return this.frames.length},s.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},s.prototype.apply=function(n,s,a,o,c,l,h){var u=n.drawOrder,f=n.slots;if(h!=i.mixOut||l!=e.setup){var d=this.frames;if(a=d[d.length-1]?d.length-1:r.binarySearch(d,a)-1;var p=this.drawOrders[_];if(null==p)t.Utils.arrayCopy(f,0,u,0,f.length);else for(var v=0,g=p.length;v=u[u.length-o.ENTRIES])l==e.setup?(f.mix=f.data.mix+(u[u.length+o.PREV_MIX]-f.data.mix)*c,f.softness=f.data.softness+(u[u.length+o.PREV_SOFTNESS]-f.data.softness)*c,h==i.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=u[u.length+o.PREV_BEND_DIRECTION],f.compress=0!=u[u.length+o.PREV_COMPRESS],f.stretch=0!=u[u.length+o.PREV_STRETCH])):(f.mix+=(u[u.length+o.PREV_MIX]-f.mix)*c,f.softness+=(u[u.length+o.PREV_SOFTNESS]-f.softness)*c,h==i.mixIn&&(f.bendDirection=u[u.length+o.PREV_BEND_DIRECTION],f.compress=0!=u[u.length+o.PREV_COMPRESS],f.stretch=0!=u[u.length+o.PREV_STRETCH]));else{var d=r.binarySearch(u,s,o.ENTRIES),_=u[d+o.PREV_MIX],p=u[d+o.PREV_SOFTNESS],v=u[d],g=this.getCurvePercent(d/o.ENTRIES-1,1-(s-v)/(u[d+o.PREV_TIME]-v));l==e.setup?(f.mix=f.data.mix+(_+(u[d+o.MIX]-_)*g-f.data.mix)*c,f.softness=f.data.softness+(p+(u[d+o.SOFTNESS]-p)*g-f.data.softness)*c,h==i.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=u[d+o.PREV_BEND_DIRECTION],f.compress=0!=u[d+o.PREV_COMPRESS],f.stretch=0!=u[d+o.PREV_STRETCH])):(f.mix+=(_+(u[d+o.MIX]-_)*g-f.mix)*c,f.softness+=(p+(u[d+o.SOFTNESS]-p)*g-f.softness)*c,h==i.mixIn&&(f.bendDirection=u[d+o.PREV_BEND_DIRECTION],f.compress=0!=u[d+o.PREV_COMPRESS],f.stretch=0!=u[d+o.PREV_STRETCH]))}},o.ENTRIES=6,o.PREV_TIME=-6,o.PREV_MIX=-5,o.PREV_SOFTNESS=-4,o.PREV_BEND_DIRECTION=-3,o.PREV_COMPRESS=-2,o.PREV_STRETCH=-1,o.MIX=1,o.SOFTNESS=2,o.BEND_DIRECTION=3,o.COMPRESS=4,o.STRETCH=5,o})(a);t.IkConstraintTimeline=m;var y=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n,this.frames[t+a.SCALE]=r,this.frames[t+a.SHEAR]=s},a.prototype.apply=function(t,i,n,s,o,c){var l=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=l[l.length-a.ENTRIES]){var v=l.length;f=l[v+a.PREV_ROTATE],d=l[v+a.PREV_TRANSLATE],_=l[v+a.PREV_SCALE],p=l[v+a.PREV_SHEAR]}else{var g=r.binarySearch(l,n,a.ENTRIES);f=l[g+a.PREV_ROTATE],d=l[g+a.PREV_TRANSLATE],_=l[g+a.PREV_SCALE],p=l[g+a.PREV_SHEAR];var m=l[g],y=this.getCurvePercent(g/a.ENTRIES-1,1-(n-m)/(l[g+a.PREV_TIME]-m));f+=(l[g+a.ROTATE]-f)*y,d+=(l[g+a.TRANSLATE]-d)*y,_+=(l[g+a.SCALE]-_)*y,p+=(l[g+a.SHEAR]-p)*y}c==e.setup?(u=h.data,h.rotateMix=u.rotateMix+(f-u.rotateMix)*o,h.translateMix=u.translateMix+(d-u.translateMix)*o,h.scaleMix=u.scaleMix+(_-u.scaleMix)*o,h.shearMix=u.shearMix+(p-u.shearMix)*o):(h.rotateMix+=(f-h.rotateMix)*o,h.translateMix+=(d-h.translateMix)*o,h.scaleMix+=(_-h.scaleMix)*o,h.shearMix+=(p-h.shearMix)*o)}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_ROTATE=-4,a.PREV_TRANSLATE=-3,a.PREV_SCALE=-2,a.PREV_SHEAR=-1,a.ROTATE=1,a.TRANSLATE=2,a.SCALE=3,a.SHEAR=4,a})(a);t.TransformConstraintTimeline=y;var E=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=i},a.prototype.apply=function(t,i,n,s,o,c){var l=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=l[l.length-a.ENTRIES])u=l[l.length+a.PREV_VALUE];else{var f=r.binarySearch(l,n,a.ENTRIES);u=l[f+a.PREV_VALUE];var d=l[f],_=this.getCurvePercent(f/a.ENTRIES-1,1-(n-d)/(l[f+a.PREV_TIME]-d));u+=(l[f+a.VALUE]-u)*_}c==e.setup?h.position=h.data.position+(u-h.data.position)*o:h.position+=(u-h.position)*o}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_VALUE=-1,a.VALUE=1,a})(a);t.PathConstraintPositionTimeline=E;var T=(function(t){function i(e){return t.call(this,e)||this}return s(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,s,a,o,c){var l=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(s=l[l.length-i.ENTRIES])u=l[l.length+i.PREV_VALUE];else{var f=r.binarySearch(l,s,i.ENTRIES);u=l[f+i.PREV_VALUE];var d=l[f],_=this.getCurvePercent(f/i.ENTRIES-1,1-(s-d)/(l[f+i.PREV_TIME]-d));u+=(l[f+i.VALUE]-u)*_}c==e.setup?h.spacing=h.data.spacing+(u-h.data.spacing)*o:h.spacing+=(u-h.spacing)*o}},i})(E);t.PathConstraintSpacingTimeline=T;var A=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n},a.prototype.apply=function(t,i,n,s,o,c){var l=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=l[l.length-a.ENTRIES])u=l[l.length+a.PREV_ROTATE],f=l[l.length+a.PREV_TRANSLATE];else{var d=r.binarySearch(l,n,a.ENTRIES);u=l[d+a.PREV_ROTATE],f=l[d+a.PREV_TRANSLATE];var _=l[d],p=this.getCurvePercent(d/a.ENTRIES-1,1-(n-_)/(l[d+a.PREV_TIME]-_));u+=(l[d+a.ROTATE]-u)*p,f+=(l[d+a.TRANSLATE]-f)*p}c==e.setup?(h.rotateMix=h.data.rotateMix+(u-h.data.rotateMix)*o,h.translateMix=h.data.translateMix+(f-h.data.translateMix)*o):(h.rotateMix+=(u-h.rotateMix)*o,h.translateMix+=(f-h.translateMix)*o)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_ROTATE=-2,a.PREV_TRANSLATE=-1,a.ROTATE=1,a.TRANSLATE=2,a})(a);t.PathConstraintMixTimeline=A})(r||(r={})),(function(t){var e=(function(){function e(e){this.tracks=new Array,this.timeScale=1,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool(function(){return new i}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){if(r.delay-=s,r.delay>0)continue;s=-r.delay,r.delay=0}var a=r.next;if(null!=a){var o=r.trackLast-a.delay;if(o>=0){for(a.delay=0,a.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*a.timeScale,r.trackTime+=s,this.setCurrent(i,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[i]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var c=r.mixingFrom;for(r.mixingFrom=null,null!=c&&(c.mixingTo=null);null!=c;)this.queue.end(c),c=c.mixingFrom}r.trackTime+=s}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,null!=i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=this.events,r=this.tracks,s=!1,a=0,o=r.length;a0)){s=!0;var l=0==a?t.MixBlend.first:c.mixBlend,h=c.alpha;null!=c.mixingFrom?h*=this.applyMixingFrom(c,i,l):c.trackTime>=c.trackEnd&&null==c.next&&(h=0);var u=c.animationLast,f=c.getAnimationTime(),d=c.animation.timelines.length,_=c.animation.timelines;if(0==a&&1==h||l==t.MixBlend.add)for(var p=0;p1&&(a=1),r!=t.MixBlend.first&&(r=s.mixBlend));var o=a0&&this.queueEvents(s,u),this.events.length=0,s.nextAnimationLast=u,s.nextTrackLast=s.trackTime,a},e.prototype.applyRotateTimeline=function(e,i,n,r,s,a,o,c){if(c&&(a[o]=0),1!=r){var l=e,h=l.frames,u=i.bones[l.boneIndex];if(u.active){var f=0,d=0;if(n=h[h.length-t.RotateTimeline.ENTRIES])d=u.data.rotation+h[h.length+t.RotateTimeline.PREV_ROTATION];else{var _=t.Animation.binarySearch(h,n,t.RotateTimeline.ENTRIES),p=h[_+t.RotateTimeline.PREV_ROTATION],v=h[_],g=l.getCurvePercent((_>>1)-1,1-(n-v)/(h[_+t.RotateTimeline.PREV_TIME]-v));d=h[_+t.RotateTimeline.ROTATION]-p,d=p+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0))}var m=0,y=d-f;if(0==(y-=360*(16384-(16384.499999999996-y/360|0))))m=a[o];else{var E=0,T=0;c?(E=0,T=y):(E=a[o],T=a[o+1]);var A=y>0,x=E>=0;t.MathUtils.signum(T)!=t.MathUtils.signum(y)&&Math.abs(T)<=90&&(Math.abs(E)>180&&(E+=360*t.MathUtils.signum(E)),x=A),m=y+E-E%360,x!=A&&(m+=360*t.MathUtils.signum(E)),a[o]=m}a[o+1]=y,f+=m*r,u.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(i,0,n,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,a=this.events,o=0,c=a.length;on||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var i=e;;){var n=i.mixingFrom;if(null==n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,i){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(i&&this.queue.interrupt(n),e.mixingFrom=n,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s=this.trackEntry(t,e,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var a=r.animationEnd-r.animationStart;0!=a?(r.loop?n+=a*(1+(r.trackTime/a|0)):n+=Math.max(a,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i=0;e--)for(var n=this.tracks[e];null!=n;)this.computeNotLast(n),n=n.mixingFrom},e.prototype.computeHold=function(i){var n=i.mixingTo,r=i.animation.timelines,s=i.animation.timelines.length,a=t.Utils.setArraySize(i.timelineMode,s);i.timelineHoldMix.length=0;var o=t.Utils.setArraySize(i.timelineHoldMix,s),c=this.propertyIDs;if(null!=n&&n.holdPrevious)for(var l=0;l0){a[l]=e.HOLD_MIX,o[l]=f;continue t}break}a[l]=e.HOLD}else a[l]=e.SUBSEQUENT}},e.prototype.computeNotLast=function(i){for(var n=i.animation.timelines,r=i.animation.timelines.length,s=i.timelineMode,a=this.propertyIDs,o=0;o=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD=2,e.HOLD_MIX=3,e.NOT_LAST=4,e})();t.AnimationState=e;var i=(function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e})();t.TrackEntry=i;var n,r=(function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,i=0;i=0?i.substring(0,i.lastIndexOf("/")):"";i=this.pathPrefix+i,this.toLoad++,e.downloadText(i,(function(e){var o={count:0},c=new Array;try{new t.TextureAtlas(e,function(e){c.push(a+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)})}catch(d){var l=d;return s.errors[i]="Couldn't load texture atlas "+i+": "+l.message,r&&r(i,"Couldn't load texture atlas "+i+": "+l.message),s.toLoad--,void s.loaded++}for(var h=function(l){var h=!1;s.loadTexture(l,(function(l){if(o.count++,o.count==c.length)if(h)s.errors[i]="Couldn't load texture atlas page "+l+"} of atlas "+i,r&&r(i,"Couldn't load texture atlas page "+l+" of atlas "+i),s.toLoad--,s.loaded++;else try{var u=new t.TextureAtlas(e,function(t){return s.get(a+"/"+t)});s.assets[i]=u,n&&n(i,u),s.toLoad--,s.loaded++}catch(d){var f=d;s.errors[i]="Couldn't load texture atlas "+i+": "+f.message,r&&r(i,"Couldn't load texture atlas "+i+": "+f.message),s.toLoad--,s.loaded++}}),(function(t){h=!0,o.count++,o.count==c.length&&(s.errors[i]="Couldn't load texture atlas page "+t+"} of atlas "+i,r&&r(i,"Couldn't load texture atlas page "+t+" of atlas "+i),s.toLoad--,s.loaded++)}))},u=0,f=c;u0},e.prototype.getErrors=function(){return this.errors},e})();t.AssetManager=e})(r||(r={})),(function(t){var e=(function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)return null;r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)return null;r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e})();t.AtlasAttachmentLoader=e})(r||(r={})),(function(t){(function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"})(t.BlendMode||(t.BlendMode={}))})(r||(r={})),(function(t){var e=(function(){function e(t,e,i){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,i,n,r,s,a,o){this.ax=e,this.ay=i,this.arotation=n,this.ascaleX=r,this.ascaleY=s,this.ashearX=a,this.ashearY=o,this.appliedValid=!0;var c=this.parent;if(null==c){var l=this.skeleton,h=n+90+o,u=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(n+a)*r*u,this.b=t.MathUtils.cosDeg(h)*s*u,this.c=t.MathUtils.sinDeg(n+a)*r*f,this.d=t.MathUtils.sinDeg(h)*s*f,this.worldX=e*u+l.x,void(this.worldY=i*f+l.y)}var d=c.a,_=c.b,p=c.c,v=c.d;switch(this.worldX=d*e+_*i+c.worldX,this.worldY=p*e+v*i+c.worldY,this.data.transformMode){case t.TransformMode.Normal:h=n+90+o;var g=t.MathUtils.cosDeg(n+a)*r,m=t.MathUtils.cosDeg(h)*s,y=t.MathUtils.sinDeg(n+a)*r,E=t.MathUtils.sinDeg(h)*s;return this.a=d*g+_*y,this.b=d*m+_*E,this.c=p*g+v*y,void(this.d=p*m+v*E);case t.TransformMode.OnlyTranslation:h=n+90+o,this.a=t.MathUtils.cosDeg(n+a)*r,this.b=t.MathUtils.cosDeg(h)*s,this.c=t.MathUtils.sinDeg(n+a)*r,this.d=t.MathUtils.sinDeg(h)*s;break;case t.TransformMode.NoRotationOrReflection:var T=0;(C=d*d+p*p)>1e-4?(_=p*(C=Math.abs(d*v-_*p)/C),v=d*C,T=Math.atan2(p,d)*t.MathUtils.radDeg):(d=0,p=0,T=90-Math.atan2(v,_)*t.MathUtils.radDeg);var A=n+a-T,x=n+o-T+90;g=t.MathUtils.cosDeg(A)*r,m=t.MathUtils.cosDeg(x)*s,y=t.MathUtils.sinDeg(A)*r,E=t.MathUtils.sinDeg(x)*s,this.a=d*g-_*y,this.b=d*m-_*E,this.c=p*g+v*y,this.d=p*m+v*E;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var C,b=t.MathUtils.cosDeg(n),S=t.MathUtils.sinDeg(n),w=(d*b+_*S)/this.skeleton.scaleX,R=(p*b+v*S)/this.skeleton.scaleY;(C=Math.sqrt(w*w+R*R))>1e-5&&(C=1/C),w*=C,R*=C,C=Math.sqrt(w*w+R*R),this.data.transformMode==t.TransformMode.NoScale&&d*v-_*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(C=-C);var M=Math.PI/2+Math.atan2(R,w),I=Math.cos(M)*C,D=Math.sin(M)*C;g=t.MathUtils.cosDeg(a)*r,m=t.MathUtils.cosDeg(90+o)*s,y=t.MathUtils.sinDeg(a)*r,E=t.MathUtils.sinDeg(90+o)*s,this.a=w*g+I*y,this.b=w*m+I*E,this.c=R*g+D*y,this.d=R*m+D*E}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var i=e.a,n=e.b,r=e.c,s=e.d,a=1/(i*s-n*r),o=this.worldX-e.worldX,c=this.worldY-e.worldY;this.ax=o*s*a-c*n*a,this.ay=c*i*a-o*r*a;var l=a*s,h=a*i,u=a*n,f=a*r,d=l*this.a-u*this.c,_=l*this.b-u*this.d,p=h*this.c-f*this.a,v=h*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(d*d+p*p),this.ascaleX>1e-4){var g=d*v-_*p;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(d*_+p*v,g)*t.MathUtils.radDeg,this.arotation=Math.atan2(p,d)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(_*_+v*v),this.ashearY=0,this.arotation=90-Math.atan2(v,_)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*i*s,t.y=o*e*s-a*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,a=t.MathUtils.cosDeg(e),o=t.MathUtils.sinDeg(e);this.a=a*i-o*r,this.b=a*n-o*s,this.c=o*i+a*r,this.d=o*n+a*s,this.appliedValid=!1},e})();t.Bone=e})(r||(r={})),(function(t){var e;t.BoneData=function(i,n,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,i<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=i,this.name=n,this.parent=r},(function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"})(e=t.TransformMode||(t.TransformMode={}))})(r||(r={})),(function(t){t.ConstraintData=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i}})(r||(r={})),(function(t){t.Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}})(r||(r={})),(function(t){t.EventData=function(t){this.name=t}})(r||(r={})),(function(t){var e=(function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var i=0;i180?_-=360:_<-180&&(_+=360);var p=e.ascaleX,v=e.ascaleY;if(r||s){var g=e.data.length*p,m=Math.sqrt(f*f+d*d);if(r&&mg&&g>1e-4){var y=(m/g-1)*o+1;p*=y,a&&(v*=y)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+_*o,p,v,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,a,o,c){if(0!=c){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var l=e.ax,h=e.ay,u=e.ascaleX,f=u,d=e.ascaleY,_=i.ascaleX,p=0,v=0,g=0;u<0?(u=-u,p=180,g=-1):(p=0,g=1),d<0&&(d=-d,g=-g),_<0?(_=-_,v=180):v=0;var m=i.ax,y=0,E=0,T=0,A=e.a,x=e.b,C=e.c,b=e.d,S=Math.abs(u-d)<=1e-4;S?(E=A*m+x*(y=i.ay)+e.worldX,T=C*m+b*y+e.worldY):(y=0,E=A*m+e.worldX,T=C*m+e.worldY);var w=e.parent;A=w.a,x=w.b,C=w.c;var R,M,I=1/(A*(b=w.d)-x*C),D=E-w.worldX,P=T-w.worldY,O=(D*b-P*x)*I-l,L=(P*A-D*C)*I-h,N=Math.sqrt(O*O+L*L),F=i.data.length*_;if(N<1e-4)return this.apply1(e,n,r,!1,a,!1,c),void i.updateWorldTransformWith(m,y,0,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY);var B=((D=n-w.worldX)*b-(P=r-w.worldY)*x)*I-l,V=(P*A-D*C)*I-h,k=B*B+V*V;if(0!=o){o*=u*(_+1)/2;var U=Math.sqrt(k),z=U-N-F*u+o;if(z>0){var W=Math.min(1,z/(2*o))-1;k=(B-=(W=(z-o*(1-W*W))/U)*B)*B+(V-=W*V)*V}}t:if(S){var H=(k-N*N-(F*=u)*F)/(2*N*F);H<-1?H=-1:H>1&&(H=1,a&&(f*=(Math.sqrt(k)/(N+F)-1)*c+1)),M=Math.acos(H)*s,A=N+F*H,x=F*Math.sin(M),R=Math.atan2(V*A-B*x,B*A+V*x)}else{var G=(A=u*F)*A,Y=(x=d*F)*x,X=Math.atan2(V,B),j=-2*Y*N,q=Y-G;if((b=j*j-4*q*(C=Y*N*N+G*k-G*Y))>=0){var Z=Math.sqrt(b);j<0&&(Z=-Z);var K=(Z=-(j+Z)/2)/q,Q=C/Z,J=Math.abs(K)=-1&&C<=1&&(C=Math.acos(C),(b=(D=A*Math.cos(C)+N)*D+(P=x*Math.sin(C))*P)st&&(nt=C,st=b,rt=D,at=P)),k<=(et+st)/2?(R=X-Math.atan2(it*s,tt),M=$*s):(R=X-Math.atan2(at*s,rt),M=nt*s)}var ot=Math.atan2(y,m)*g,ct=e.arotation;(R=(R-ot)*t.MathUtils.radDeg+p-ct)>180?R-=360:R<-180&&(R+=360),e.updateWorldTransformWith(l,h,ct+R*c,f,e.ascaleY,0,0),ct=i.arotation,(M=((M+ot)*t.MathUtils.radDeg-i.ashearX)*g+v-ct)>180?M-=360:M<-180&&(M+=360),i.updateWorldTransformWith(m,y,ct+M*c,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e})();t.IkConstraint=e})(r||(r={})),(function(t){var e=(function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.bendDirection=1,i.compress=!1,i.stretch=!1,i.uniform=!1,i.mix=1,i.softness=0,i}return s(e,t),e})(t.ConstraintData);t.IkConstraintData=e})(r||(r={})),(function(t){var e=(function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var i=0,n=t.bones.length;i0;if(r>0||s){var a=this.data,o=a.spacingMode==t.SpacingMode.Percent,c=a.rotateMode,l=c==t.RotateMode.Tangent,h=c==t.RotateMode.ChainScale,u=this.bones.length,f=l?u:u+1,d=this.bones,_=t.Utils.setArraySize(this.spaces,f),p=null,v=this.spacing;if(h||!o){h&&(p=t.Utils.setArraySize(this.lengths,u));for(var g=a.spacingMode==t.SpacingMode.Length,m=0,y=f-1;m0?t.MathUtils.degRad:-t.MathUtils.degRad),m=0;for(var I=3;mt.MathUtils.PI?U-=t.MathUtils.PI2:U<-t.MathUtils.PI&&(U+=t.MathUtils.PI2),U*=n,z=Math.cos(U),W=Math.sin(U),D.a=z*F-W*V,D.b=z*B-W*k,D.c=W*F+z*V,D.d=W*B+z*k}D.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,a){var o=this.target,c=this.position,l=this.spaces,h=t.Utils.setArraySize(this.positions,3*n+2),u=null,f=i.closed,d=i.worldVerticesLength,_=d/6,p=e.NONE;if(!i.constantSpeed){var v=i.lengths,g=v[_-=f?1:2];if(s&&(c*=g),a)for(var m=1;mg){p!=e.AFTER&&(p=e.AFTER,i.computeWorldVertices(o,d-6,4,u,0,2)),this.addAfterPosition(T-g,u,0,h,y);continue}}for(;;E++){var A=v[E];if(!(T>A)){0==E?T/=A:T=(T-(Z=v[E-1]))/(A-Z);break}}E!=p&&(p=E,f&&E==_?(i.computeWorldVertices(o,d-4,4,u,0,2),i.computeWorldVertices(o,0,4,u,4,2)):i.computeWorldVertices(o,6*E+2,8,u,0,2)),this.addCurvePosition(T,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],h,y,r||m>0&&0==Y)}return h}f?(d+=2,u=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(o,2,d-4,u,0,2),i.computeWorldVertices(o,0,2,u,d-4,2),u[d-2]=u[0],u[d-1]=u[1]):(_--,d-=4,u=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(o,2,d,u,0,2));for(var x=t.Utils.setArraySize(this.curves,_),C=0,b=u[0],S=u[1],w=0,R=0,M=0,I=0,D=0,P=0,O=0,L=0,N=0,F=0,B=0,V=0,k=0,U=0,z=(m=0,2);m<_;m++,z+=6)w=u[z],R=u[z+1],M=u[z+2],I=u[z+3],B=2*(O=.1875*(b-2*w+M))+(N=.09375*(3*(w-M)-b+(D=u[z+4]))),V=2*(L=.1875*(S-2*R+I))+(F=.09375*(3*(R-I)-S+(P=u[z+5]))),k=.75*(w-b)+O+.16666667*N,U=.75*(R-S)+L+.16666667*F,C+=Math.sqrt(k*k+U*U),k+=B,U+=V,B+=N,V+=F,C+=Math.sqrt(k*k+U*U),k+=B,U+=V,C+=Math.sqrt(k*k+U*U),k+=B+N,U+=V+F,C+=Math.sqrt(k*k+U*U),x[m]=C,b=D,S=P;if(c*=s?C:C/i.lengths[_-1],a)for(m=1;mC){this.addAfterPosition(T-C,u,d-4,h,y);continue}}for(;;E++){var X=x[E];if(!(T>X)){0==E?T/=X:T=(T-(Z=x[E-1]))/(X-Z);break}}if(E!=p){p=E;var j=6*E;for(b=u[j],S=u[j+1],w=u[j+2],R=u[j+3],M=u[j+4],I=u[j+5],B=2*(O=.03*(b-2*w+M))+(N=.006*(3*(w-M)-b+(D=u[j+6]))),V=2*(L=.03*(S-2*R+I))+(F=.006*(3*(R-I)-S+(P=u[j+7]))),k=.3*(w-b)+O+.16666667*N,U=.3*(R-S)+L+.16666667*F,H=Math.sqrt(k*k+U*U),W[0]=H,j=1;j<8;j++)k+=B,U+=V,B+=N,V+=F,H+=Math.sqrt(k*k+U*U),W[j]=H;k+=B,U+=V,H+=Math.sqrt(k*k+U*U),W[8]=H,k+=B+N,U+=V+F,H+=Math.sqrt(k*k+U*U),W[9]=H,G=0}for(T*=H;;G++){var q=W[G];if(!(T>q)){var Z;0==G?T/=q:T=G+(T-(Z=W[G-1]))/(q-Z);break}}this.addCurvePosition(.1*T,b,S,w,R,M,I,D,P,h,y,r||m>0&&0==Y)}return h},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],a=e[i+1],o=e[i+2]-s,c=e[i+3]-a,l=Math.atan2(c,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],a=e[i+3],o=s-e[i],c=a-e[i+1],l=Math.atan2(c,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},e.prototype.addCurvePosition=function(t,e,i,n,r,s,a,o,c,l,h,u){if(0==t||isNaN(t))return l[h]=e,l[h+1]=i,void(l[h+2]=Math.atan2(r-i,n-e));var f=t*t,d=f*t,_=1-t,p=_*_,v=p*_,g=_*t,m=3*g,y=_*m,E=m*t,T=e*v+n*y+s*E+o*d,A=i*v+r*y+a*E+c*d;l[h]=T,l[h+1]=A,u&&(l[h+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(A-(i*p+r*g*2+a*f),T-(e*p+n*g*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e})();t.PathConstraint=e})(r||(r={})),(function(t){var e=(function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i}return s(e,t),e})(t.ConstraintData);t.PathConstraintData=e,(function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"})(t.PositionMode||(t.PositionMode={})),(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(t.SpacingMode||(t.SpacingMode={})),(function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"})(t.RotateMode||(t.RotateMode={}))})(r||(r={})),(function(t){var e=(function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t})(),i=(function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,i,n){var r=this.clientAssets[t];return null==r&&(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i)){var r=new Image;r.src=i,r.crossOrigin="anonymous",r.onload=function(){n.rawAssets[i]=r},r.onerror=function(){n.errors[i]="Couldn't load image "+i}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t})();t.SharedAssetManager=i})(r||(r={})),(function(t){var e=(function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var i=0;i1){var s=n[n.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),n[n.length-1].sorted=!0}},e.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),e.active){var i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,a=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){E=new t.DrawOrderTimeline(F);var B=r.slots.length;for(h=0;h=0;d--)k[d]=-1;var U=t.Utils.newArray(B-V,0),z=0,W=0;for(d=0;d=0;d--)-1==k[d]&&(k[d]=U[--W]);E.setFrame(h,m,k)}s.push(E),o=Math.max(o,E.frames[F-1])}var H=i.readInt(!0);if(H>0){for(E=new t.EventTimeline(H),h=0;h>>1^-(1&i)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(n),i++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t})(),n=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},r=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}})(r||(r={})),(function(t){var e=(function(){function e(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool(function(){return t.Utils.newFloatArray(16)})}return e.prototype.update=function(e,i){if(null==e)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,s=this.polygonPool,a=e.slots,o=a.length;n.length=0,s.freeAll(r),r.length=0;for(var c=0;c=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=a&&i>=a||e>=o&&n>=o)return!1;var c=(n-e)/(i-t),l=c*(r-t)+e;if(l>s&&ls&&lr&&hr&&ht.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n=i||l=i){var h=n[o];h+(i-c)/(l-c)*(n[s]-h)=h&&y<=d||y>=d&&y<=h)&&(y>=e&&y<=n||y>=n&&y<=e)){var E=(l*g-c*p)/m;if((E>=u&&E<=_||E>=_&&E<=u)&&(E>=i&&E<=r||E>=r&&E<=i))return!0}h=d,u=_}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e})();t.SkeletonBounds=e})(r||(r={})),(function(t){var e=(function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,0,r,s,0,2);var a=this.clippingPolygon;e.makeClockwise(a);for(var o=this.clippingPolygons=this.triangulator.decompose(a,this.triangulator.triangulate(a)),c=0,l=o.length;c>1,X=this.clipOutput,j=t.Utils.setArraySize(_,V+Y*m),q=0;q=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(n),h.push(r),h.push(s),h.push(t),h.push(e),o.length=0;for(var u=a,f=a.length-4,d=0;;d+=2){for(var _=u[d],p=u[d+1],v=u[d+2],g=u[d+3],m=_-v,y=p-g,E=h,T=h.length-2,A=o.length,x=0;x0;if(m*(b-g)-y*(C-v)>0){if(R){o.push(S),o.push(w);continue}var M=(D=w-b)*(v-_)-(P=S-C)*(g-p);if(Math.abs(M)>1e-6){var I=(P*(p-b)-D*(_-C))/M;o.push(_+(v-_)*I),o.push(p+(g-p)*I)}else o.push(_),o.push(p)}else if(R){var D,P;M=(D=w-b)*(v-_)-(P=S-C)*(g-p),Math.abs(M)>1e-6?(I=(P*(p-b)-D*(_-C))/M,o.push(_+(v-_)*I),o.push(p+(g-p)*I)):(o.push(_),o.push(p)),o.push(S),o.push(w)}l=!0}if(A==o.length)return c.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var O=o;(o=h).length=0,h=O}if(c!=o){c.length=0,d=0;for(var L=o.length-2;d>1;o=0;f--)-1==X[f]&&(X[f]=q[--K])}E.setFrame(u++,this.getValue(Y,"time",0),X)}s.push(E),a=Math.max(a,E.frames[E.getFrameCount()-1])}if(e.events){for(E=new t.EventTimeline(e.events.length),u=0,f=0;f=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},i.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n}})(r||(r={})),(function(t){var e,i,n=(function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t})();t.Texture=n,(function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"})(e=t.TextureFilter||(t.TextureFilter={})),(function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"})(i=t.TextureWrap||(t.TextureWrap={}));t.TextureRegion=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0};var r=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.setFilters=function(){},e.prototype.setWraps=function(){},e.prototype.dispose=function(){},e})(n);t.FakeTexture=r})(r||(r={})),(function(t){var e=(function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,s){if(null==s)throw new Error("textureLoader cannot be null.");for(var a=new i(e),o=new Array(4),c=null;;){var l=a.readLine();if(null==l)break;if(0==(l=l.trim()).length)c=null;else if(c){var h=new r;h.name=l,h.page=c;var u=a.readValue();"true"==u.toLocaleLowerCase()?h.degrees=90:"false"==u.toLocaleLowerCase()?h.degrees=0:h.degrees=parseFloat(u),h.rotate=90==h.degrees,a.readTuple(o);var f=parseInt(o[0]),d=parseInt(o[1]);a.readTuple(o);var _=parseInt(o[0]),p=parseInt(o[1]);h.u=f/c.width,h.v=d/c.height,h.rotate?(h.u2=(f+p)/c.width,h.v2=(d+_)/c.height):(h.u2=(f+_)/c.width,h.v2=(d+p)/c.height),h.x=f,h.y=d,h.width=Math.abs(_),h.height=Math.abs(p),4==a.readTuple(o)&&4==a.readTuple(o)&&a.readTuple(o),h.originalWidth=parseInt(o[0]),h.originalHeight=parseInt(o[1]),a.readTuple(o),h.offsetX=parseInt(o[0]),h.offsetY=parseInt(o[1]),h.index=parseInt(a.readValue()),h.texture=c.texture,this.regions.push(h)}else{(c=new n).name=l,2==a.readTuple(o)&&(c.width=parseInt(o[0]),c.height=parseInt(o[1]),a.readTuple(o)),a.readTuple(o),c.minFilter=t.Texture.filterFromString(o[0]),c.magFilter=t.Texture.filterFromString(o[1]);var v=a.readValue();c.uWrap=t.TextureWrap.ClampToEdge,c.vWrap=t.TextureWrap.ClampToEdge,"x"==v?c.uWrap=t.TextureWrap.Repeat:"y"==v?c.vWrap=t.TextureWrap.Repeat:"xy"==v&&(c.uWrap=c.vWrap=t.TextureWrap.Repeat),c.texture=s(l),c.texture.setFilters(c.minFilter,c.magFilter),c.texture.setWraps(c.uWrap,c.vWrap),c.width=c.texture.getImage().width,c.height=c.texture.getImage().height,this.pages.push(c)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),i=e.indexOf(":");if(-1==i)throw new Error("Invalid line: "+e);for(var n=0,r=i+1;n<3;n++){var s=e.indexOf(",",r);if(-1==s)break;t[n]=e.substr(r,s-r).trim(),r=s+1}return t[n]=e.substring(r).trim(),n+1},t})(),n=function(){};t.TextureAtlasPage=n;var r=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e})(t.TextureRegion);t.TextureAtlasRegion=r})(r||(r={})),(function(t){var e=(function(){function e(e,i){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==i)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*h,f=this.data.offsetShearY*h,d=this.bones,_=0,p=d.length;_t.MathUtils.PI?w-=t.MathUtils.PI2:w<-t.MathUtils.PI&&(w+=t.MathUtils.PI2),w*=e;var A=Math.cos(w),x=Math.sin(w);v.a=A*m-x*E,v.b=A*y-x*T,v.c=x*m+A*E,v.d=x*y+A*T,g=!0}if(0!=i){var C=this.temp;s.localToWorld(C.set(this.data.offsetX,this.data.offsetY)),v.worldX+=(C.x-v.worldX)*i,v.worldY+=(C.y-v.worldY)*i,g=!0}if(n>0){var b=Math.sqrt(v.a*v.a+v.c*v.c),S=Math.sqrt(a*a+c*c);b>1e-5&&(b=(b+(S-b+this.data.offsetScaleX)*n)/b),v.a*=b,v.c*=b,b=Math.sqrt(v.b*v.b+v.d*v.d),S=Math.sqrt(o*o+l*l),b>1e-5&&(b=(b+(S-b+this.data.offsetScaleY)*n)/b),v.b*=b,v.d*=b,g=!0}if(r>0){y=v.b,T=v.d;var w,R=Math.atan2(T,y);(w=Math.atan2(l,o)-Math.atan2(c,a)-(R-Math.atan2(v.c,v.a)))>t.MathUtils.PI?w-=t.MathUtils.PI2:w<-t.MathUtils.PI&&(w+=t.MathUtils.PI2),w=R+(w+f)*r,b=Math.sqrt(y*y+T*T),v.b=Math.cos(w)*b,v.d=Math.sin(w)*b,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,i=this.translateMix,n=this.scaleMix,r=this.shearMix,s=this.target,a=s.a,o=s.b,c=s.c,l=s.d,h=a*l-o*c>0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*h,f=this.data.offsetShearY*h,d=this.bones,_=0,p=d.length;_t.MathUtils.PI?v-=t.MathUtils.PI2:v<-t.MathUtils.PI&&(v+=t.MathUtils.PI2),v*=e;var x=Math.cos(v),C=Math.sin(v);g.a=x*y-C*T,g.b=x*E-C*A,g.c=C*y+x*T,g.d=C*E+x*A,m=!0}if(0!=i){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=b.x*i,g.worldY+=b.y*i,m=!0}if(n>0){var S=(Math.sqrt(a*a+c*c)-1+this.data.offsetScaleX)*n+1;g.a*=S,g.c*=S,S=(Math.sqrt(o*o+l*l)-1+this.data.offsetScaleY)*n+1,g.b*=S,g.d*=S,m=!0}if(r>0)(v=Math.atan2(l,o)-Math.atan2(c,a))>t.MathUtils.PI?v-=t.MathUtils.PI2:v<-t.MathUtils.PI&&(v+=t.MathUtils.PI2),E=g.b,A=g.d,v=Math.atan2(A,E)+(v-t.MathUtils.PI/2+f)*r,S=Math.sqrt(E*E+A*A),g.b=Math.cos(v)*S,g.d=Math.sin(v)*S,m=!0;m&&(g.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*i)/d),_>1e-5&&(_=(_+(r.ascaleY-_+this.data.offsetScaleY)*i)/_));var p=c.ashearY;0!=n&&(h=r.ashearY-p+this.data.offsetShearY,h-=360*(16384-(16384.499999999996-h/360|0)),c.shearY+=h*n),c.updateWorldTransformWith(u,f,l,d,_,c.ashearX,p)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var _=c.ashearY;0!=n&&(_+=(r.ashearY+this.data.offsetShearY)*n),c.updateWorldTransformWith(h,u,l,f,d,c.ashearX,_)}},e})();t.TransformConstraint=e})(r||(r={})),(function(t){var e=(function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.rotateMix=0,i.translateMix=0,i.scaleMix=0,i.shearMix=0,i.offsetRotation=0,i.offsetX=0,i.offsetY=0,i.offsetScaleX=0,i.offsetScaleY=0,i.offsetShearY=0,i.relative=!1,i.local=!1,i}return s(e,t),e})(t.ConstraintData);t.TransformConstraintData=e})(r||(r={})),(function(t){var e=(function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool(function(){return new Array}),this.polygonIndicesPool=new t.Pool(function(){return new Array})}return e.prototype.triangulate=function(t){var i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=n-1,h=(s=0,1);;){t:if(!a[s]){for(var u=r[l]<<1,f=r[s]<<1,d=r[h]<<1,_=i[u],p=i[u+1],v=i[f],g=i[f+1],m=i[d],y=i[d+1],E=(h+1)%n;E!=l;E=(E+1)%n)if(a[E]){var T=r[E]<<1,A=i[T],x=i[T+1];if(e.positiveArea(m,y,_,p,A,x)&&e.positiveArea(_,p,v,g,A,x)&&e.positiveArea(v,g,m,y,A,x))break t}break}if(0==h){do{if(!a[s])break;s--}while(s>0);break}l=s,s=h,h=(h+1)%n}c.push(r[(n+s-1)%n]),c.push(r[s]),c.push(r[(s+1)%n]),r.splice(s,1),a.splice(s,1);var C=(--n+s-1)%n,b=s==n?0:s;a[C]=e.isConcave(C,n,i,r),a[b]=e.isConcave(b,n,i,r)}return 3==n&&(c.push(r[2]),c.push(r[0]),c.push(r[1])),c},e.prototype.decompose=function(t,i){var n=t,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var s=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(s),s.length=0;var a=this.polygonIndicesPool.obtain();a.length=0;var o=this.polygonPool.obtain();o.length=0;for(var c=-1,l=0,h=0,u=i.length;h0?(r.push(o),s.push(a)):(this.polygonPool.free(o),this.polygonIndicesPool.free(a)),(o=this.polygonPool.obtain()).length=0,o.push(p),o.push(v),o.push(g),o.push(m),o.push(y),o.push(E),(a=this.polygonIndicesPool.obtain()).length=0,a.push(f),a.push(d),a.push(_),l=e.winding(p,v,g,m,y,E),c=f)}for(o.length>0&&(r.push(o),s.push(a)),h=0,u=r.length;h=0;h--)0==(o=r[h]).length&&(r.splice(h,1),this.polygonPool.free(o),a=s[h],s.splice(h,1),this.polygonIndicesPool.free(a));return r},e.isConcave=function(t,e,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,a=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[a],i[a+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var a=i-t,o=n-e;return r*o-s*a+a*e-t*o>=0?1:-1},e})();t.Triangulator=e})(r||(r={})),(function(t){var e=(function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return null!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t})();t.IntSet=e;var i=(function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.r=t,this.g=e,this.b=i,this.a=n}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t})();t.Color=i;var n=(function(){function t(){}return t.clamp=function(t,e,i){return ti?i:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t})();t.MathUtils=n;var r=(function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t})();t.Interpolation=r;var a=(function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}return s(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e})(r);t.Pow=a;var o=(function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e})(a);t.PowOut=o;var c=(function(){function t(){}return t.arrayCopy=function(t,e,i,n,r){for(var s=e,a=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t})();t.TimeKeeper=f;var d=(function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,c=this.vertices,l=this.bones;if(null!=l){for(var h=0,u=0,f=0;f0&&(c=o);for(var E,T=(E=t.bone).worldX,A=E.worldY,x=E.a,C=E.b,b=E.c,S=E.d,w=e,R=r;R0&&(s[E-1].vfOffset=_),s.length=E,a.length=f;var o=y-1;if(o>=0)if(m>0){var c=r[o];c.indexCount=m,c.vfCount=6*g,c.vertexCount=g,r.length=y}else r.length=y-1;if(0!=r.length){var l=n.vertices,x=n.uintVert;(!l||l.length<_)&&(l=n.vertices=new Float32Array(_),x=n.uintVert=new Uint32Array(l.buffer));for(var C=0,b=0;C<_;)l[C++]=h[b++],l[C++]=h[b++],l[C++]=h[b++],l[C++]=h[b++],x[C++]=h[b++],x[C++]=h[b++];var S=n.indices;(!S||S.length>>0)+(b.b<<16)+(b.g<<8)+b.r,o=(S.a<<24>>>0)+(S.b<<16)+(S.g<<8)+S.r,T!==a||A!==o){var p=this._tempColors;T=a,A=o,E>0&&(p[E-1].vfOffset=_),p[E++]={fr:b.r,fg:b.g,fb:b.b,fa:b.a,dr:S.r,dg:S.g,db:S.b,da:S.a,vfOffset:0}}if(l.isClipping()){l.clipTriangles(h,x,u,C,h,b,S,!0,6,d,_,_+2);var v=l.clippedVertices,g=l.clippedTriangles;C=g.length,x=v.length/12*6;for(var m=0,y=d,w=g.length;m=0&&(m>0?((A=R[T]).indexCount=m,A.vertexCount=g,A.vfCount=6*g):y--),R[y]={tex:E,blendMode:b,indexCount:0,vertexCount:0,vfCount:0},y++,m=0,g=0),o?(a=w,x=24,C=6,i.computeWorldVertices(S.bone,h,_,6)):c&&(a=i.triangles,x=6*(i.worldVerticesLength>>1),C=a.length,i.computeWorldVertices(S,0,i.worldVerticesLength,h,_,6)),0!=x&&0!=C){for(var V=0,k=d,U=a.length;V0){for(var G=d,Y=d+C;G=n&&(t&&t.call(e,!0),t=null)},a=0;a0)&&this.textureNames&&this.textureNames.length>0)return t||cc.errorID(7507,this.name),null;var e=this._getAtlas(t);if(!e)return null;var i=new sp.spine.AtlasAttachmentLoader(e),n=null,r=null;return this.skeletonJson?(r=new sp.spine.SkeletonJson(i),n=this.skeletonJson):(r=new sp.spine.SkeletonBinary(i),n=new Uint8Array(this._nativeAsset)),r.scale=this.scale,this._skeletonCache=r.readSkeletonData(n),e.dispose(),this._skeletonCache},getSkinsEnum:!1,getAnimsEnum:!1,_getTexture:function(t){for(var e=this.textureNames,i=0;i>>0)+(nt<<16)+(it<<8)+et,st=t.dr*J,at=t.dg*$,ot=t.db*tt,g=((r?255:0)<<24>>>0)+(ot<<16)+(at<<8)+st}function xt(t){return(t.a<<24>>>0)+(t.b<<16)+(t.g<<8)+t.r}var Ct=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var T=n.prototype;return T.updateRenderData=function(t){if(!t.isAnimationCached()){var e=t._skeleton;e&&e.updateWorldTransform()}},T.fillVertices=function(t,e,i,n,a){var o,l=lt._vData,h=lt._iData,u=lt._uintVData;if(N.a=i.a*e.a*t.a*p*255,s=r?N.a:255,k=f*e.r*t.r*s,U=d*e.g*t.g*s,z=_*e.b*t.b*s,N.r=k*i.r,N.g=U*i.g,N.b=z*i.b,null==a.darkColor?F.set(0,0,0,1):(F.r=a.darkColor.r*k,F.g=a.darkColor.g*U,F.b=a.darkColor.b*z),F.a=r?255:0,n.isClipping()){var m=l.subarray(vt+2);n.clipTriangles(l.subarray(vt),_t,h.subarray(yt),mt,m,N,F,c,y);var T=new Float32Array(n.clippedVertices),A=n.clippedTriangles;if(mt=A.length,_t=T.length/E*y,o=lt.request(_t/y,mt),yt=o.indiceOffset,gt=o.vertexOffset,vt=o.byteOffset>>2,l=lt._vData,h=lt._iData,u=lt._uintVData,h.set(A,yt),dt)for(var x=0,C=T.length,b=vt;x>>0)+(T[S+4]<<16)+(T[S+3]<<8)+T[S+2],u[R+4]=v,c&&(g=(T[S+11]<<24>>>0)+(T[S+10]<<16)+(T[S+9]<<8)+T[S+8],u[R+5]=g)}else if(dt)for(var M=vt,I=vt+_t;M=0&&a==g.data.index&&(W=!0),W)if(o>=0&&o==g.data.index&&(W=!1),_t=0,mt=0,n=g.getAttachment())if(_=n instanceof x.RegionAttachment,p=n instanceof x.MeshAttachment,n instanceof x.ClippingAttachment)b.clipStart(g,n);else if(_||p)if(S=Tt(n.region.texture._texture,g.data.blendMode)){if((H||S.getHash()!==ht.material.getHash())&&(H=!1,ht._flush(),ht.node=ut,ht.material=S),_){if(d=I,_t=4*y,mt=6,v=lt.request(4,6),yt=v.indiceOffset,gt=v.vertexOffset,vt=v.byteOffset>>2,e=lt._vData,i=lt._iData,n.computeWorldVertices(g.bone,e,vt,y),C&&l){C.strokeColor=D,C.moveTo(e[vt],e[vt+1]);for(var M=vt+y,N=vt+_t;M>1)*y,mt=d.length,v=lt.request(_t/y,mt),yt=v.indiceOffset,gt=v.vertexOffset,vt=v.byteOffset>>2,e=lt._vData,i=lt._iData,n.computeWorldVertices(g,0,n.worldVerticesLength,e,vt,y),C&&u)){C.strokeColor=L;for(var F=0,B=d.length;F0){for(var tt=yt,et=yt+mt;tt>2,n=lt._vData,r=lt._iData,s=lt._uintVData;for(var b=yt,S=yt+mt;b=T&&(At(E=y[m++]),T=E.vfOffset),s[O]=v,s[O+1]=g}}}}},T.fillBuffers=function(t,e){var i=t.node;if(i._renderFlag|=C.FLAG_UPDATE_RENDER_DATA,t._skeleton){var n=i._color;f=n.r/255,d=n.g/255,_=n.b/255,p=n.a/255,c=t.useTint||t.isAnimationCached(),m=c?w:S,y=c?6:5,ut=t.node,lt=e.getBuffer("spine",m),ht=e,ct=t,H=!0,r=t.premultipliedAlpha,s=1,M=0,ft=!1,dt=t._effectDelegate&&t._effectDelegate._vertexEffect,(4294967295!==n._val||r)&&(ft=!0),c&&(M|=1);var a=void 0;ct.enableBatch&&(a=ut._worldMatrix,H=!1,M|=16),t.isAnimationCached()?this.cacheTraverse(a):(dt&&dt.begin(t._skeleton),this.realTimeTraverse(a),dt&&dt.end()),e.worldMatDirty++,t.attachUtil._syncAttachedNode(),ut=void 0,lt=void 0,ht=void 0,ct=void 0,dt=null}},T.postFillBuffers=function(t,e){e.worldMatDirty--},n})(T.default);i.default=Ct,T.default.register(A,Ct),e.exports=i.default}),{"../../cocos2d/core/renderer/assembler":178,"../../cocos2d/core/renderer/render-flow":182,"../../cocos2d/core/renderer/webgl/vertex-format":211,"./Skeleton":299,"./lib/spine":301}],306:[(function(t,e){"use strict";var i=function(){this.start=null,this.end=null,this.complete=null,this.event=null,this.interrupt=null,this.dispose=null};i.getListeners=function(t){return t.listener||(t.listener=new i),t.listener},e.exports=i}),{}],307:[(function(t,e){"use strict";var i=t("./lib/spine");sp.VertexEffectDelegate=cc.Class({name:"sp.VertexEffectDelegate",ctor:function(){this._vertexEffect=null,this._interpolation=null,this._effectType="none"},clear:function(){this._vertexEffect=null,this._interpolation=null,this._effectType="none"},initJitter:function(t,e){return this._effectType="jitter",this._vertexEffect=new i.JitterEffect(t,e),this._vertexEffect},initSwirlWithPow:function(t,e){return this._interpolation=new i.Pow(e),this._vertexEffect=new i.SwirlEffect(t,this._interpolation),this._vertexEffect},initSwirlWithPowOut:function(t,e){return this._interpolation=new i.PowOut(e),this._vertexEffect=new i.SwirlEffect(t,this._interpolation),this._vertexEffect},getJitterVertexEffect:function(){return this._vertexEffect},getSwirlVertexEffect:function(){return this._vertexEffect},getVertexEffect:function(){return this._vertexEffect},getEffectType:function(){return this._effectType}}),e.exports=sp.VertexEffectDelegate}),{"./lib/spine":301}],308:[(function(t,e){"use strict";var i="undefined"==typeof window?global:window;i.cc=i.cc||{},cc.internal=cc.internal||{},t("./predefine"),t("./polyfill/string"),t("./polyfill/misc"),t("./polyfill/array"),t("./polyfill/object"),t("./polyfill/array-buffer"),t("./polyfill/number"),t("./polyfill/typescript"),t("./cocos2d/core/predefine"),t("./cocos2d"),t("./extends"),e.exports=i.cc}),{"./cocos2d":249,"./cocos2d/core/predefine":175,"./extends":296,"./package":void 0,"./polyfill/array":310,"./polyfill/array-buffer":309,"./polyfill/misc":311,"./polyfill/number":312,"./polyfill/object":313,"./polyfill/string":314,"./polyfill/typescript":315,"./predefine":316}],309:[(function(){"use strict";if(!ArrayBuffer.isView){var t=Object.getPrototypeOf(Int8Array);ArrayBuffer.isView="function"==typeof t?function(e){return e instanceof t}:function(t){if("object"!=typeof t)return!1;var e=t.constructor;return e===Float64Array||e===Float32Array||e===Uint8Array||e===Uint32Array||e===Int8Array}}}),{}],310:[(function(){"use strict";Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.find||(Array.prototype.find=function(t){for(var e=this.length,i=0;i0?1:-1}),Math.log2||(Math.log2=function(t){return Math.log(t)*Math.LOG2E}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),!console.time){var t=window.performance||Date,e=Object.create(null);console.time=function(i){e[i]=t.now()},console.timeEnd=function(i){var n=e[i],r=t.now()-n;console.log(i+": "+r+"ms")}}}),{}],312:[(function(){"use strict";Number.parseFloat=Number.parseFloat||parseFloat,Number.parseInt=Number.parseInt||parseInt}),{}],313:[(function(){"use strict";Object.assign||(Object.assign=function(t,e){return cc.js.mixin(t,e)}),Object.getOwnPropertyDescriptors||(Object.getOwnPropertyDescriptors=function(t){var e={},i=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t)));for(var n=0;nthis.length)&&(e=this.length),e-=t.length;var i=this.indexOf(t,e);return-1!==i&&i===e}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/,"")})}),{}],315:[(function(){"use strict";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])};window.__extends=function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)},window.__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},window.__param=function(t,e){return function(i,n){e(i,n,t)}},window.__metadata=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},window.__awaiter=function(t,e,i,n){return new(i||(i=Promise))(function(r,s){function a(t){try{c(n.next(t))}catch(e){s(e)}}function o(t){try{c(n.throw(t))}catch(e){s(e)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,o)}c((n=n.apply(t,e||[])).next())})},window.__generator=function(t,e){var i,n,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return c([t,e])}}function c(s){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},window.__read=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,s=i.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(o){r={error:o}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a},window.__spread=function(){for(var t=[],e=0;e1||o(t,e)})})}function o(t,e){try{(i=r[t](e)).value instanceof __await?Promise.resolve(i.value.v).then(c,l):h(s[0][2],i)}catch(n){h(s[0][3],n)}var i}function c(t){o("next",t)}function l(t){o("throw",t)}function h(t,e){t(e),s.shift(),s.length&&o(s[0][0],s[0][1])}},window.__asyncDelegator=function(t){var e,i;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,r){e[n]=t[n]?function(e){return(i=!i)?{value:__await(t[n](e)),done:"return"===n}:r?r(e):e}:r}},window.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=t[i]&&function(e){return new Promise(function(n,s){r(n,s,(e=t[i](e)).done,e.value)})}}function r(t,e,i,n){Promise.resolve(n).then((function(e){t({value:e,done:i})}),e)}},window.__makeTemplateObject=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};var e=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};window.__importStar=function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&__createBinding(i,t,n);return e(i,t),i},window.__importDefault=function(t){return t&&t.__esModule?t:{default:t}},window.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},window.__classPrivateFieldSet=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i}}),{}],316:[(function(){"use strict";var t="undefined"==typeof window?global:window;function e(e,i){void 0===t[e]&&Object.defineProperty(t,e,{get:function(){var t;return"CC_WECHATGAMESUB"===e?t="cc.sys.platform === cc.sys.WECHAT_GAME_SUB":"CC_WECHATGAME"===e?t="cc.sys.platform === cc.sys.WECHAT_GAME":"CC_QQPLAY"===e&&(t="cc.sys.platform === cc.sys.QQ_PLAY"),cc.warnID(1400,e,t),i}})}function i(e){return"object"==typeof t[e]}(function(e,i){void 0===t[e]&&(t[e]=i)})("CC_BUILD",!1),t.CC_BUILD=!0,t.CC_DEV=!1,t.CC_DEBUG=!1,t.CC_JSB=!1,t.CC_NATIVERENDERER=!1,t.CC_SUPPORT_JIT=!0,t.CC_PHYSICS_BUILTIN=!1,t.CC_PHYSICS_CANNON=!1,t.CC_EDITOR=!1,t.CC_PREVIEW=!1,t.CC_TEST=!1,t.CC_RUNTIME=!1,t.CC_JSB=!1;var n=!(!i("wx")||!wx.getSharedCanvas),r=!(!i("wx")||!wx.getSystemInfoSync&&!wx.getSharedCanvas),s=i("bk");e("CC_WECHATGAMESUB",n),e("CC_WECHATGAME",r),e("CC_QQPLAY",s),t.CocosEngine=cc.ENGINE_VERSION="2.4.4"}),{}]},{},[308]); \ No newline at end of file diff --git a/cocos2d-js-min.af4b0.js b/cocos2d-js-min.af4b0.js new file mode 100644 index 0000000..2edc081 --- /dev/null +++ b/cocos2d-js-min.af4b0.js @@ -0,0 +1 @@ +(function(t,e,i){function n(i){var r=e[i];if(!r){var s=t[i];if(!s)return;var a={};r=e[i]={exports:a},s[0]((function(t){return n(s[1][t]||t)}),r,a)}return r.exports}for(var r=0;r=0;i--)e.push(cc.v2(t[i].x,t[i].y));return e}function n(t){for(var e=[],i=0;i=this._duration},_cloneDecoration:function(t){t._repeatForever=this._repeatForever,t._speed=this._speed,t._timesForRepeat=this._timesForRepeat,t._easeList=this._easeList,t._speedMethod=this._speedMethod,t._repeatMethod=this._repeatMethod},_reverseEaseList:function(t){if(this._easeList){t._easeList=[];for(var e=0;e1.192092896e-7?this._duration:1.192092896e-7);e=1>e?e:1,this.update(e>0?e:0),this._repeatMethod&&this._timesForRepeat>1&&this.isDone()&&(this._repeatForever||this._timesForRepeat--,this.startWithTarget(this.target),this.step(this._elapsed-this._duration))},startWithTarget:function(t){cc.Action.prototype.startWithTarget.call(this,t),this._elapsed=0,this._firstTick=!0},reverse:function(){return cc.logID(1010),null},setAmplitudeRate:function(){cc.logID(1011)},getAmplitudeRate:function(){return cc.logID(1012),0},speed:function(t){return t<=0?(cc.logID(1013),this):(this._speedMethod=!0,this._speed*=t,this)},getSpeed:function(){return this._speed},setSpeed:function(t){return this._speed=t,this},repeat:function(t){return t=Math.round(t),isNaN(t)||t<1?(cc.logID(1014),this):(this._repeatMethod=!0,this._timesForRepeat*=t,this)},repeatForever:function(){return this._repeatMethod=!0,this._timesForRepeat=this.MAX_VALUE,this._repeatForever=!0,this}}),cc.actionInterval=function(t){return new cc.ActionInterval(t)},cc.Sequence=cc.Class({name:"cc.Sequence",extends:cc.ActionInterval,ctor:function(t){this._actions=[],this._split=null,this._last=0,this._reversed=!1;var e=t instanceof Array?t:arguments;if(1!==e.length){var i=e.length-1;if(i>=0&&null==e[i]&&cc.logID(1015),i>=0){for(var n,r=e[0],s=1;s1?e%1:e),this._last=n)},reverse:function(){var t=cc.Sequence._actionOneTwo(this._actions[1].reverse(),this._actions[0].reverse());return this._cloneDecoration(t),this._reverseEaseList(t),t._reversed=!0,t}}),cc.sequence=function(t){var e=t instanceof Array?t:arguments;if(1===e.length)return cc.errorID(1019),null;var i=e.length-1;i>=0&&null==e[i]&&cc.logID(1015);var n=null;if(i>=0){n=e[0];for(var r=1;r<=i;r++)e[r]&&(n=cc.Sequence._actionOneTwo(n,e[r]))}return n},cc.Sequence._actionOneTwo=function(t,e){var i=new cc.Sequence;return i.initWithTwoActions(t,e),i},cc.Repeat=cc.Class({name:"cc.Repeat",extends:cc.ActionInterval,ctor:function(t,e){this._times=0,this._total=0,this._nextDt=0,this._actionInstant=!1,this._innerAction=null,void 0!==e&&this.initWithAction(t,e)},initWithAction:function(t,e){var i=t._duration*e;return!!this.initWithDuration(i)&&(this._times=e,this._innerAction=t,t instanceof cc.ActionInstant&&(this._actionInstant=!0,this._times-=1),this._total=0,!0)},clone:function(){var t=new cc.Repeat;return this._cloneDecoration(t),t.initWithAction(this._innerAction.clone(),this._times),t},startWithTarget:function(t){this._total=0,this._nextDt=this._innerAction._duration/this._duration,cc.ActionInterval.prototype.startWithTarget.call(this,t),this._innerAction.startWithTarget(t)},stop:function(){this._innerAction.stop(),cc.Action.prototype.stop.call(this)},update:function(t){t=this._computeEaseTime(t);var e=this._innerAction,i=this._duration,n=this._times,r=this._nextDt;if(t>=r){for(;t>r&&this._total1?1:r;t>=1&&this._total=0&&null==e[i]&&cc.logID(1015),i>=0){for(var n,r=e[0],s=1;sr?this._two=cc.Sequence._actionOneTwo(e,cc.delayTime(n-r)):n0&&null==e[e.length-1]&&cc.logID(1015);for(var i=e[0],n=1;n180&&(i-=360),i<-180&&(i+=360),this._startAngle=e,this._angle=cc.RotateTo._reverse?i:-i},reverse:function(){cc.logID(1016)},update:function(t){t=this._computeEaseTime(t),this.target&&(this.target.angle=this._startAngle+this._angle*t)}}),cc.rotateTo=function(t,e){return new cc.RotateTo(t,e)},cc.RotateBy=cc.Class({name:"cc.RotateBy",extends:cc.ActionInterval,statics:{_reverse:!1},ctor:function(t,e){e*=cc.RotateBy._reverse?1:-1,this._deltaAngle=0,this._startAngle=0,void 0!==e&&this.initWithDuration(t,e)},initWithDuration:function(t,e){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._deltaAngle=e,!0)},clone:function(){var t=new cc.RotateBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._deltaAngle),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._startAngle=t.angle},update:function(t){t=this._computeEaseTime(t),this.target&&(this.target.angle=this._startAngle+this._deltaAngle*t)},reverse:function(){var t=new cc.RotateBy;return t.initWithDuration(this._duration,-this._deltaAngle),this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.rotateBy=function(t,e){return new cc.RotateBy(t,e)},cc.MoveBy=cc.Class({name:"cc.MoveBy",extends:cc.ActionInterval,ctor:function(t,e,i){this._positionDelta=cc.v2(0,0),this._startPosition=cc.v2(0,0),this._previousPosition=cc.v2(0,0),void 0!==e&&cc.MoveBy.prototype.initWithDuration.call(this,t,e,i)},initWithDuration:function(t,e,i){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(void 0!==e.x&&(i=e.y,e=e.x),this._positionDelta.x=e,this._positionDelta.y=i,!0)},clone:function(){var t=new cc.MoveBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._positionDelta),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t);var e=t.x,i=t.y;this._previousPosition.x=e,this._previousPosition.y=i,this._startPosition.x=e,this._startPosition.y=i},update:function(t){if(t=this._computeEaseTime(t),this.target){var e=this._positionDelta.x*t,i=this._positionDelta.y*t,n=this._startPosition;if(cc.macro.ENABLE_STACKABLE_ACTIONS){var r=this.target.x,s=this.target.y,a=this._previousPosition;n.x=n.x+r-a.x,n.y=n.y+s-a.y,e+=n.x,i+=n.y,a.x=e,a.y=i,this.target.setPosition(e,i)}else this.target.setPosition(n.x+e,n.y+i)}},reverse:function(){var t=new cc.MoveBy(this._duration,cc.v2(-this._positionDelta.x,-this._positionDelta.y));return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.moveBy=function(t,e,i){return new cc.MoveBy(t,e,i)},cc.MoveTo=cc.Class({name:"cc.MoveTo",extends:cc.MoveBy,ctor:function(t,e,i){this._endPosition=cc.v2(0,0),void 0!==e&&this.initWithDuration(t,e,i)},initWithDuration:function(t,e,i){return!!cc.MoveBy.prototype.initWithDuration.call(this,t,e,i)&&(void 0!==e.x&&(i=e.y,e=e.x),this._endPosition.x=e,this._endPosition.y=i,!0)},clone:function(){var t=new cc.MoveTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._endPosition),t},startWithTarget:function(t){cc.MoveBy.prototype.startWithTarget.call(this,t),this._positionDelta.x=this._endPosition.x-t.x,this._positionDelta.y=this._endPosition.y-t.y}}),cc.moveTo=function(t,e,i){return new cc.MoveTo(t,e,i)},cc.SkewTo=cc.Class({name:"cc.SkewTo",extends:cc.ActionInterval,ctor:function(t,e,i){this._skewX=0,this._skewY=0,this._startSkewX=0,this._startSkewY=0,this._endSkewX=0,this._endSkewY=0,this._deltaX=0,this._deltaY=0,void 0!==i&&cc.SkewTo.prototype.initWithDuration.call(this,t,e,i)},initWithDuration:function(t,e,i){var n=!1;return cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._endSkewX=e,this._endSkewY=i,n=!0),n},clone:function(){var t=new cc.SkewTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._endSkewX,this._endSkewY),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._startSkewX=t.skewX%180,this._deltaX=this._endSkewX-this._startSkewX,this._deltaX>180&&(this._deltaX-=360),this._deltaX<-180&&(this._deltaX+=360),this._startSkewY=t.skewY%360,this._deltaY=this._endSkewY-this._startSkewY,this._deltaY>180&&(this._deltaY-=360),this._deltaY<-180&&(this._deltaY+=360)},update:function(t){t=this._computeEaseTime(t),this.target.skewX=this._startSkewX+this._deltaX*t,this.target.skewY=this._startSkewY+this._deltaY*t}}),cc.skewTo=function(t,e,i){return new cc.SkewTo(t,e,i)},cc.SkewBy=cc.Class({name:"cc.SkewBy",extends:cc.SkewTo,ctor:function(t,e,i){void 0!==i&&this.initWithDuration(t,e,i)},initWithDuration:function(t,e,i){var n=!1;return cc.SkewTo.prototype.initWithDuration.call(this,t,e,i)&&(this._skewX=e,this._skewY=i,n=!0),n},clone:function(){var t=new cc.SkewBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._skewX,this._skewY),t},startWithTarget:function(t){cc.SkewTo.prototype.startWithTarget.call(this,t),this._deltaX=this._skewX,this._deltaY=this._skewY,this._endSkewX=this._startSkewX+this._deltaX,this._endSkewY=this._startSkewY+this._deltaY},reverse:function(){var t=new cc.SkewBy(this._duration,-this._skewX,-this._skewY);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.skewBy=function(t,e,i){return new cc.SkewBy(t,e,i)},cc.JumpBy=cc.Class({name:"cc.JumpBy",extends:cc.ActionInterval,ctor:function(t,e,i,n,r){this._startPosition=cc.v2(0,0),this._previousPosition=cc.v2(0,0),this._delta=cc.v2(0,0),this._height=0,this._jumps=0,void 0!==n&&cc.JumpBy.prototype.initWithDuration.call(this,t,e,i,n,r)},initWithDuration:function(t,e,i,n,r){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(void 0===r&&(r=n,n=i,i=e.y,e=e.x),this._delta.x=e,this._delta.y=i,this._height=n,this._jumps=r,!0)},clone:function(){var t=new cc.JumpBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._delta,this._height,this._jumps),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t);var e=t.x,i=t.y;this._previousPosition.x=e,this._previousPosition.y=i,this._startPosition.x=e,this._startPosition.y=i},update:function(t){if(t=this._computeEaseTime(t),this.target){var e=t*this._jumps%1,i=4*this._height*e*(1-e);i+=this._delta.y*t;var n=this._delta.x*t,r=this._startPosition;if(cc.macro.ENABLE_STACKABLE_ACTIONS){var s=this.target.x,a=this.target.y,o=this._previousPosition;r.x=r.x+s-o.x,r.y=r.y+a-o.y,n+=r.x,i+=r.y,o.x=n,o.y=i,this.target.setPosition(n,i)}else this.target.setPosition(r.x+n,r.y+i)}},reverse:function(){var t=new cc.JumpBy(this._duration,cc.v2(-this._delta.x,-this._delta.y),this._height,this._jumps);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.jumpBy=function(t,e,i,n,r){return new cc.JumpBy(t,e,i,n,r)},cc.JumpTo=cc.Class({name:"cc.JumpTo",extends:cc.JumpBy,ctor:function(t,e,i,n,r){this._endPosition=cc.v2(0,0),void 0!==n&&this.initWithDuration(t,e,i,n,r)},initWithDuration:function(t,e,i,n,r){return!!cc.JumpBy.prototype.initWithDuration.call(this,t,e,i,n,r)&&(void 0===r&&(i=e.y,e=e.x),this._endPosition.x=e,this._endPosition.y=i,!0)},startWithTarget:function(t){cc.JumpBy.prototype.startWithTarget.call(this,t),this._delta.x=this._endPosition.x-this._startPosition.x,this._delta.y=this._endPosition.y-this._startPosition.y},clone:function(){var t=new cc.JumpTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._endPosition,this._height,this._jumps),t}}),cc.jumpTo=function(t,e,i,n,r){return new cc.JumpTo(t,e,i,n,r)},cc.BezierBy=cc.Class({name:"cc.BezierBy",extends:cc.ActionInterval,ctor:function(t,e){this._config=[],this._startPosition=cc.v2(0,0),this._previousPosition=cc.v2(0,0),e&&cc.BezierBy.prototype.initWithDuration.call(this,t,e)},initWithDuration:function(t,e){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._config=e,!0)},clone:function(){var t=new cc.BezierBy;this._cloneDecoration(t);for(var e=[],i=0;ie/2?255:0}},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._originalState=t.opacity},stop:function(){this.target.opacity=this._originalState,cc.ActionInterval.prototype.stop.call(this)},reverse:function(){var t=new cc.Blink(this._duration,this._times);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.blink=function(t,e){return new cc.Blink(t,e)},cc.FadeTo=cc.Class({name:"cc.FadeTo",extends:cc.ActionInterval,ctor:function(t,e){this._toOpacity=0,this._fromOpacity=0,void 0!==e&&cc.FadeTo.prototype.initWithDuration.call(this,t,e)},initWithDuration:function(t,e){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._toOpacity=e,!0)},clone:function(){var t=new cc.FadeTo;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._toOpacity),t},update:function(t){t=this._computeEaseTime(t);var e=void 0!==this._fromOpacity?this._fromOpacity:255;this.target.opacity=e+(this._toOpacity-e)*t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._fromOpacity=t.opacity}}),cc.fadeTo=function(t,e){return new cc.FadeTo(t,e)},cc.FadeIn=cc.Class({name:"cc.FadeIn",extends:cc.FadeTo,ctor:function(t){null==t&&(t=0),this._reverseAction=null,this.initWithDuration(t,255)},reverse:function(){var t=new cc.FadeOut;return t.initWithDuration(this._duration,0),this._cloneDecoration(t),this._reverseEaseList(t),t},clone:function(){var t=new cc.FadeIn;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._toOpacity),t},startWithTarget:function(t){this._reverseAction&&(this._toOpacity=this._reverseAction._fromOpacity),cc.FadeTo.prototype.startWithTarget.call(this,t)}}),cc.fadeIn=function(t){return new cc.FadeIn(t)},cc.FadeOut=cc.Class({name:"cc.FadeOut",extends:cc.FadeTo,ctor:function(t){null==t&&(t=0),this._reverseAction=null,this.initWithDuration(t,0)},reverse:function(){var t=new cc.FadeIn;return t._reverseAction=this,t.initWithDuration(this._duration,255),this._cloneDecoration(t),this._reverseEaseList(t),t},clone:function(){var t=new cc.FadeOut;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._toOpacity),t}}),cc.fadeOut=function(t){return new cc.FadeOut(t)},cc.TintTo=cc.Class({name:"cc.TintTo",extends:cc.ActionInterval,ctor:function(t,e,i,n){this._to=cc.color(0,0,0),this._from=cc.color(0,0,0),e instanceof cc.Color&&(n=e.b,i=e.g,e=e.r),void 0!==n&&this.initWithDuration(t,e,i,n)},initWithDuration:function(t,e,i,n){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._to=cc.color(e,i,n),!0)},clone:function(){var t=new cc.TintTo;this._cloneDecoration(t);var e=this._to;return t.initWithDuration(this._duration,e.r,e.g,e.b),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._from=this.target.color},update:function(t){t=this._computeEaseTime(t);var e=this._from,i=this._to;e&&(this.target.color=cc.color(e.r+(i.r-e.r)*t,e.g+(i.g-e.g)*t,e.b+(i.b-e.b)*t))}}),cc.tintTo=function(t,e,i,n){return new cc.TintTo(t,e,i,n)},cc.TintBy=cc.Class({name:"cc.TintBy",extends:cc.ActionInterval,ctor:function(t,e,i,n){this._deltaR=0,this._deltaG=0,this._deltaB=0,this._fromR=0,this._fromG=0,this._fromB=0,void 0!==n&&this.initWithDuration(t,e,i,n)},initWithDuration:function(t,e,i,n){return!!cc.ActionInterval.prototype.initWithDuration.call(this,t)&&(this._deltaR=e,this._deltaG=i,this._deltaB=n,!0)},clone:function(){var t=new cc.TintBy;return this._cloneDecoration(t),t.initWithDuration(this._duration,this._deltaR,this._deltaG,this._deltaB),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t);var e=t.color;this._fromR=e.r,this._fromG=e.g,this._fromB=e.b},update:function(t){t=this._computeEaseTime(t),this.target.color=cc.color(this._fromR+this._deltaR*t,this._fromG+this._deltaG*t,this._fromB+this._deltaB*t)},reverse:function(){var t=new cc.TintBy(this._duration,-this._deltaR,-this._deltaG,-this._deltaB);return this._cloneDecoration(t),this._reverseEaseList(t),t}}),cc.tintBy=function(t,e,i,n){return new cc.TintBy(t,e,i,n)},cc.DelayTime=cc.Class({name:"cc.DelayTime",extends:cc.ActionInterval,update:function(){},reverse:function(){var t=new cc.DelayTime(this._duration);return this._cloneDecoration(t),this._reverseEaseList(t),t},clone:function(){var t=new cc.DelayTime;return this._cloneDecoration(t),t.initWithDuration(this._duration),t}}),cc.delayTime=function(t){return new cc.DelayTime(t)},cc.ReverseTime=cc.Class({name:"cc.ReverseTime",extends:cc.ActionInterval,ctor:function(t){this._other=null,t&&this.initWithAction(t)},initWithAction:function(t){return t?t===this._other?(cc.errorID(1029),!1):!!cc.ActionInterval.prototype.initWithDuration.call(this,t._duration)&&(this._other=t,!0):(cc.errorID(1028),!1)},clone:function(){var t=new cc.ReverseTime;return this._cloneDecoration(t),t.initWithAction(this._other.clone()),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._other.startWithTarget(t)},update:function(t){t=this._computeEaseTime(t),this._other&&this._other.update(1-t)},reverse:function(){return this._other.clone()},stop:function(){this._other.stop(),cc.Action.prototype.stop.call(this)}}),cc.reverseTime=function(t){return new cc.ReverseTime(t)},cc.TargetedAction=cc.Class({name:"cc.TargetedAction",extends:cc.ActionInterval,ctor:function(t,e){this._action=null,this._forcedTarget=null,e&&this.initWithTarget(t,e)},initWithTarget:function(t,e){return!!this.initWithDuration(e._duration)&&(this._forcedTarget=t,this._action=e,!0)},clone:function(){var t=new cc.TargetedAction;return this._cloneDecoration(t),t.initWithTarget(this._forcedTarget,this._action.clone()),t},startWithTarget:function(t){cc.ActionInterval.prototype.startWithTarget.call(this,t),this._action.startWithTarget(this._forcedTarget)},stop:function(){this._action.stop()},update:function(t){t=this._computeEaseTime(t),this._action.update(t)},getForcedTarget:function(){return this._forcedTarget},setForcedTarget:function(t){this._forcedTarget!==t&&(this._forcedTarget=t)}}),cc.targetedAction=function(t,e){return new cc.TargetedAction(t,e)}}),{}],6:[(function(t){"use strict";t("../core/platform/CCClass");var e=t("../core/platform/js"),i=function(){this.actions=[],this.target=null,this.actionIndex=0,this.currentAction=null,this.paused=!1,this.lock=!1};cc.ActionManager=function(){this._hashTargets=e.createMap(!0),this._arrayTargets=[],this._currentTarget=null,cc.director._scheduler&&cc.director._scheduler.enableForTarget(this)},cc.ActionManager.prototype={constructor:cc.ActionManager,_elementPool:[],_searchElementByTarget:function(t,e){for(var i=0;i=n&&i.actionIndex--;break}}},_removeActionByTag:function(t,e,i){for(var n=0,r=e.actions.length;n=t&&e.actionIndex--,0===e.actions.length&&this._deleteHashElement(e)},_deleteHashElement:function(t){var e=!1;if(t&&!t.lock&&this._hashTargets[t.target._id]){delete this._hashTargets[t.target._id];for(var i=this._arrayTargets,n=0,r=i.length;n=1?t:r%n>n/2?255:0},this.to(t,{opacity:1},i)}});var a=[];function o(t){return function(){a.length=0;for(var e=arguments.length,i=0;i=0?d=c.events[p]:(d=new a,c.ratios.push(f),c.events.push(d)),d.add(_.func,_.params)}}h.playState=function(t,e){t.clip&&(t.curveLoaded||u(this.target,t),t.animator=this,t.play(),"number"==typeof e&&t.setTime(e),this.play())},h.stopStatesExcept=function(t){var e=this._anims,i=e.array;for(e.i=0;e.i=0?(this._anims.fastRemoveAt(e),0===this._anims.array.length&&this.stop()):cc.errorID(3907),t.animator=null},h.sample=function(){var t=this._anims,e=t.array;for(t.i=0;t.i1e-6){g=!1;break}c._findFrameIndex=g?s:o;var x=c.values[0];return null==x||c._lerp||("number"==typeof x?c._lerp=r.prototype._lerpNumber:x instanceof cc.Quat?c._lerp=r.prototype._lerpQuat:x instanceof cc.Vec2?c._lerp=r.prototype._lerpVector2:x instanceof cc.Vec3?c._lerp=r.prototype._lerpVector3:x.lerp&&(c._lerp=r.prototype._lerpObject)),c},createTargetCurves:function(t,e,i){var n=e.props,r=e.comps;if(n)for(var s in n){var a=n[s],o=this.createPropCurve(t,s,a);i.push(o)}if(r)for(var l in r){var c=t.getComponent(l);if(c){var h=r[l];for(var u in h){var _=h[u],f=this.createPropCurve(c,u,_);i.push(f)}}}},createCurves:function(t,e){var i=this.curveData,n=i.paths,r=[];for(var s in this.createTargetCurves(e,i,r),n){var a=cc.find(s,e);if(a){var o=n[s];this.createTargetCurves(a,o,r)}}return r}});cc.AnimationClip=e.exports=l}),{"../core/utils/binary-search":316,"./animation-curves":11,"./motion-path-helper":17,"./types":19}],11:[(function(t,e){"use strict";var i=t("./bezier").bezierByTime,n=t("../core/utils/binary-search").binarySearchEpsilon,r=t("./types").WrapModeMask,s=t("./types").WrappedInfo;function a(t,e){if("string"==typeof e){var n=cc.easing[e];n?t=n(t):cc.errorID(3906,e)}else Array.isArray(e)&&(t=i(e,t));return t}var o=cc.Class({name:"cc.AnimCurve",sample:function(){},onTimeChangedManually:void 0});var l,c=cc.Class({name:"cc.DynamicAnimCurve",extends:o,ctor:function(){this._cachedIndex=0},properties:{target:null,prop:"",values:[],ratios:[],types:[]},_findFrameIndex:n,_lerp:void 0,_lerpNumber:function(t,e,i){return t+(e-t)*i},_lerpObject:function(t,e,i){return t.lerp(e,i)},_lerpQuat:(l=cc.quat(),function(t,e,i){return t.lerp(e,i,l)}),_lerpVector2:(function(){var t=cc.v2();return function(e,i,n){return e.lerp(i,n,t)}})(),_lerpVector3:(function(){var t=cc.v3();return function(e,i,n){return e.lerp(i,n,t)}})(),sample:function(t,e){var i=this.values,n=this.ratios,r=n.length;if(0!==r){var s,o=!0,l=this._cachedIndex;if(l<0&&(l=~l)>0&&lc&&e=r)s=i[r-1];else{var _=i[u-1];if(this._lerp){var f=n[u-1],d=n[u],p=this.types[u-1],m=(e-f)/(d-f);p&&(m=a(m,p));var y=i[u];s=this._lerp(_,y,m)}else s=_}else s=i[u];this.target[this.prop]=s}}});c.Linear=null,c.Bezier=function(t){return t};var h=function(){this.events=[]};h.prototype.add=function(t,e){this.events.push({func:t||"",params:e||[]})};var u=cc.Class({name:"cc.EventAnimCurve",extends:o,properties:{target:null,ratios:[],events:[],_wrappedInfo:{default:function(){return new s}},_lastWrappedInfo:null,_ignoreIndex:NaN},_wrapIterations:function(t){return t-(0|t)==0&&(t-=1),0|t},sample:function(t,e,i){var a=this.ratios.length,o=i.getWrappedInfo(i.time,this._wrappedInfo),l=o.direction,c=n(this.ratios,o.ratio);if(c<0&&(c=~c-1,l<0&&(c+=1)),this._ignoreIndex!==c&&(this._ignoreIndex=NaN),o.frameIndex=c,!this._lastWrappedInfo)return this._fireEvent(c),void(this._lastWrappedInfo=new s(o));var h=i.wrapMode,u=this._wrapIterations(o.iterations),_=this._lastWrappedInfo,f=this._wrapIterations(_.iterations),d=_.frameIndex,p=_.direction,m=-1!==f&&u!==f;if(d===c&&m&&1===a)this._fireEvent(0);else if(d!==c||m){l=p;do{if(d!==c){if(-1===l&&0===d&&c>0?((h&r.PingPong)===r.PingPong?l*=-1:d=a,f++):1===l&&d===a-1&&cu)break}d+=l,cc.director.getAnimationManager().pushDelayEvent(this,"_fireEvent",[d])}while(d!==c&&d>-1&&d=this.events.length||this._ignoreIndex===t)){var e=this.events[t].events;if(this.target.isValid)for(var i=this.target._components,n=0;nr)return~t.length;var s=(e=(e-n)/(r-n))/(1/i),a=0|s;return s-a<1e-6?a:a+1-s<1e-6?a+1:~(a+1)}}}),{"../core/utils/binary-search":316,"./bezier":14,"./types":19}],12:[(function(t,e){"use strict";var i=cc.js,n=cc.Class({ctor:function(){this._anims=new i.array.MutableForwardIterator([]),this._delayEvents=[],cc.director._scheduler&&cc.director._scheduler.enableForTarget(this)},update:function(t){var e=this._anims,i=e.array;for(e.i=0;e.i=0?this._anims.fastRemoveAt(e):cc.errorID(3907)},pushDelayEvent:function(t,e,i){this._delayEvents.push({target:t,func:e,args:i})}});cc.AnimationManager=e.exports=n}),{}],13:[(function(t,e){"use strict";var i=cc.js,n=t("./playable"),r=t("./types"),s=r.WrappedInfo,a=r.WrapMode,o=r.WrapModeMask;function l(t,e){n.call(this),this._currentFramePlayed=!1,this._delay=0,this._delayTime=0,this._wrappedInfo=new s,this._lastWrappedInfo=null,this._process=h,this._clip=t,this._name=e||t&&t.name,this.animator=null,this.curves=[],this.delay=0,this.repeatCount=1,this.duration=1,this.speed=1,this.wrapMode=a.Normal,this.time=0,this._target=null,this._lastframeEventOn=!1,this.emit=function(){for(var t=new Array(arguments.length),e=0,i=t.length;e1&&(0|e.iterations)>(0|t.iterations)&&this.emit("lastframe",this),t.set(e)),e.stopped&&(this.stop(),this.emit("finished",this))}function u(){var t=this.time,e=this.duration;t>e?0==(t%=e)&&(t=e):t<0&&0!=(t%=e)&&(t+=e);for(var i=t/e,n=this.curves,r=0,s=n.length;r0&&this._lastIterations>i||this.time<0&&this._lastIterations0&&(this._delayTime-=t,this._delayTime>0)||(this._currentFramePlayed?this.time+=t*this.speed:this._currentFramePlayed=!0,this._process())},c._needRevers=function(t){var e=this.wrapMode,i=!1;return(e&o.PingPong)===o.PingPong&&(t-(0|t)==0&&t>0&&(t-=1),1&t&&(i=!i)),(e&o.Reverse)===o.Reverse&&(i=!i),i},c.getWrappedInfo=function(t,e){e=e||new s;var i=!1,n=this.duration,r=this.repeatCount,a=t>0?t/n:-t/n;if(a>=r){a=r,i=!0;var l=r-(0|r);0===l&&(l=1),t=l*n*(t>0?1:-1)}if(t>n){var c=t%n;t=0===c?n:c}else t<0&&0!=(t%=n)&&(t+=n);var h=!1,u=this._wrapMode&o.ShouldWrap;u&&(h=this._needRevers(a));var _=h?-1:1;return this.speed<0&&(_*=-1),u&&h&&(t=n-t),e.ratio=t/n,e.time=t,e.direction=_,e.stopped=i,e.iterations=a,e},c.sample=function(){for(var t=this.getWrappedInfo(this.time,this._wrappedInfo),e=this.curves,i=0,n=e.length;i0}),(function(){this.curves.length=0})),i.getset(c,"wrapMode",(function(){return this._wrapMode}),(function(t){this._wrapMode=t,this.time=0,t&o.Loop?this.repeatCount=1/0:this.repeatCount=1})),i.getset(c,"repeatCount",(function(){return this._repeatCount}),(function(t){this._repeatCount=t;var e=this._wrapMode&o.ShouldWrap,i=(this.wrapMode&o.Reverse)===o.Reverse;this._process=t!==1/0||e||i?h:u})),i.getset(c,"delay",(function(){return this._delay}),(function(t){this._delayTime=this._delay=t})),cc.AnimationState=e.exports=l}),{"./playable":18,"./types":19}],14:[(function(t,e){"use strict";var i=Math.cos,n=Math.acos,r=Math.max,s=2*Math.PI,a=Math.sqrt;function o(t){return t<0?-Math.pow(-t,1/3):Math.pow(t,1/3)}function l(t,e){var l,c,h,u,_=e-0,f=e-t[0],d=3*_,p=3*f,m=3*(e-t[2]),y=1/(-_+p-m+(e-1)),v=(d-6*f+m)*y,g=v*(1/3),b=(-d+p)*y,A=1/3*(3*b-v*v),x=A*(1/3),C=(2*v*v*v-9*v*b+_*y*27)/27,T=C/2,S=T*T+x*x*x;if(S<0){var w=1/3*-A,E=a(w*w*w),M=-C/(2*E),D=n(M<-1?-1:M>1?1:M),B=2*o(E);return c=B*i(D*(1/3))-g,h=B*i((D+s)*(1/3))-g,u=B*i((D+2*s)*(1/3))-g,0<=c&&c<=1?0<=h&&h<=1?0<=u&&u<=1?r(c,h,u):r(c,h):0<=u&&u<=1?r(c,u):c:0<=h&&h<=1?0<=u&&u<=1?r(h,u):h:u}if(0===S)return h=-(l=T<0?o(-T):-o(T))-g,0<=(c=2*l-g)&&c<=1?0<=h&&h<=1?r(c,h):c:h;var I=a(S);return(l=o(-T+I))-o(T+I)-g}e.exports={bezier:function(t,e,i,n,r){var s=1-r;return s*(s*(t+(3*e-t)*r)+3*i*r*r)+n*r*r*r},bezierByTime:function(t,e){var i=l(t,e),n=t[1];return((1-i)*(n+(t[3]-n)*i)*3+i*i)*i}}}),{}],15:[(function(t,e){"use strict";var i={constant:function(){return 0},linear:function(t){return t},quadIn:function(t){return t*t},quadOut:function(t){return t*(2-t)},quadInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quartIn:function(t){return t*t*t*t},quartOut:function(t){return 1- --t*t*t*t},quartInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quintIn:function(t){return t*t*t*t*t},quintOut:function(t){return--t*t*t*t*t+1},quintInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sineIn:function(t){return 1-Math.cos(t*Math.PI/2)},sineOut:function(t){return Math.sin(t*Math.PI/2)},sineInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},expoIn:function(t){return 0===t?0:Math.pow(1024,t-1)},expoOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},expoInOut: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)))},circIn:function(t){return 1-Math.sqrt(1-t*t)},circOut:function(t){return Math.sqrt(1- --t*t)},circInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut: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)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut: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},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5},smooth:function(t){return t<=0?0:t>=1?1:t*t*(3-2*t)},fade:function(t){return t<=0?0:t>=1?1:t*t*t*(t*(6*t-15)+10)}};function n(t,e){return function(i){return i<.5?e(2*i)/2:t(2*i-1)/2+.5}}i.quadOutIn=n(i.quadIn,i.quadOut),i.cubicOutIn=n(i.cubicIn,i.cubicOut),i.quartOutIn=n(i.quartIn,i.quartOut),i.quintOutIn=n(i.quintIn,i.quintOut),i.sineOutIn=n(i.sineIn,i.sineOut),i.expoOutIn=n(i.expoIn,i.expoOut),i.circOutIn=n(i.circIn,i.circOut),i.backOutIn=n(i.backIn,i.backOut),i.bounceIn=function(t){return 1-i.bounceOut(1-t)},i.bounceInOut=function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5},i.bounceOutIn=n(i.bounceIn,i.bounceOut),cc.easing=e.exports=i}),{}],16:[(function(t){"use strict";t("./bezier"),t("./easing"),t("./types"),t("./motion-path-helper"),t("./animation-curves"),t("./animation-clip"),t("./animation-manager"),t("./animation-state"),t("./animation-animator")}),{"./animation-animator":9,"./animation-clip":10,"./animation-curves":11,"./animation-manager":12,"./animation-state":13,"./bezier":14,"./easing":15,"./motion-path-helper":17,"./types":19}],17:[(function(t,e){"use strict";var i=t("./animation-curves").DynamicAnimCurve,n=t("./animation-curves").computeRatioByType,r=t("./bezier").bezier,s=t("../core/utils/binary-search").binarySearchEpsilon,a=cc.v2;function o(t){this.points=t||[],this.beziers=[],this.ratios=[],this.progresses=[],this.length=0,this.computeBeziers()}function l(){this.start=a(),this.end=a(),this.startCtrlPoint=a(),this.endCtrlPoint=a()}function c(t){if(!Array.isArray(t))return!1;for(var e=0,i=t.length;e0)){l=r;break}l=r-1}if(n[r=l]===i)return r/(s-1);var c=n[r];return(r+(i-c)/(n[r+1]-c))/(s-1)},e.exports={sampleMotionPaths:function(t,e,r,l,h){function u(t){return t instanceof cc.Vec2?{in:t,pos:t,out:t}:Array.isArray(t)&&6===t.length?{in:a(t[2],t[3]),pos:a(t[0],t[1]),out:a(t[4],t[5])}:{in:cc.Vec2.ZERO,pos:cc.Vec2.ZERO,out:cc.Vec2.ZERO}}var _=e.values=e.values.map((function(t){return Array.isArray(t)&&(t=2===t.length?cc.v2(t[0],t[1]):cc.v3(t[0],t[1],t[2])),t}));if(0!==t.length&&0!==_.length){for(var f=!1,d=0;d0){f=!0;break}}if(f&&1!==_.length){for(var m=e.types,y=e.ratios,v=e.values=[],g=e.types=[],b=e.ratios=[],A=0,x=i.Linear,C=0,T=t.length;C0){var L=[];L.push(u(D));for(var F=0,V=w.length;F1e-6;){var G,U,j,H;if((S=n(S=R,I))<0)H=(0-S)*(U=k.beziers[0]).getLength(),j=U.start.sub(U.endCtrlPoint).normalize(),G=U.start.add(j.mul(H));else if(S>1)H=(S-1)*(U=k.beziers[k.beziers.length-1]).getLength(),j=U.end.sub(U.startCtrlPoint).normalize(),G=U.end.add(j.mul(H));else{var W=s(z,S);W<0&&(W=~W),S-=W>0?z[W-1]:0,S/=k.ratios[W],G=k.beziers[W].getPointAt(S)}P.push(G),R+=O}}else for(;1-R>1e-6;)S=n(S=R,I),P.push(D.lerp(B,S)),R+=O;for(x="constant"===I?I:i.Linear,F=0,V=P.length;F1e-6?(R-1)*M:0}y[y.length-1]!==b[b.length-1]&&Y(_[_.length-1],x,y[y.length-1])}}function Y(t,e,i){v.push(t),g.push(e),b.push(i)}},Curve:o,Bezier:l}}),{"../core/utils/binary-search":316,"./animation-curves":11,"./bezier":14}],18:[(function(t,e){"use strict";var i=cc.js,n=t("../core/CCDebug");function r(){this._isPlaying=!1,this._isPaused=!1,this._stepOnce=!1}var s=r.prototype;i.get(s,"isPlaying",(function(){return this._isPlaying}),!0),i.get(s,"isPaused",(function(){return this._isPaused}),!0);var a=function(){};s.onPlay=a,s.onPause=a,s.onResume=a,s.onStop=a,s.onError=a,s.play=function(){this._isPlaying?this._isPaused?(this._isPaused=!1,this.onResume()):this.onError(n.getError(3912)):(this._isPlaying=!0,this.onPlay())},s.stop=function(){this._isPlaying&&(this._isPlaying=!1,this.onStop(),this._isPaused=!1)},s.pause=function(){this._isPlaying&&!this._isPaused&&(this._isPaused=!0,this.onPause())},s.resume=function(){this._isPlaying&&this._isPaused&&(this._isPaused=!1,this.onResume())},s.step=function(){this.pause(),this._stepOnce=!0,this._isPlaying||this.play()},e.exports=r}),{"../core/CCDebug":69}],19:[(function(t,e){"use strict";var i={Loop:2,ShouldWrap:4,PingPong:22,Reverse:36},n=cc.Enum({Default:0,Normal:1,Reverse:i.Reverse,Loop:i.Loop,LoopReverse:i.Loop|i.Reverse,PingPong:i.PingPong,PingPongReverse:i.PingPong|i.Reverse});function r(t){t?this.set(t):(this.ratio=0,this.time=0,this.direction=1,this.stopped=!0,this.iterations=0,this.frameIndex=void 0)}cc.WrapMode=n,r.prototype.set=function(t){this.ratio=t.ratio,this.time=t.time,this.direction=t.direction,this.stopped=t.stopped,this.iterations=t.iterations,this.frameIndex=t.frameIndex},e.exports={WrapModeMask:i,WrapMode:n,WrappedInfo:r}}),{}],20:[(function(t,e){"use strict";var i,n,r=t("../core/event/event-target"),s=t("../core/platform/CCSys"),a=t("../core/assets/CCAudioClip").LoadMode,o=!1,l=[],c=function t(e){r.call(this),this._shouldRecycleOnEnded=!1,this._src=e,this._element=null,this.id=0,this._state=t.State.INITIALZING;var i=this;this._onended=function(){i._state=t.State.STOPPED,i.emit("ended")},this._onendedSecond=function(){i._unbindEnded(i._onendedSecond),i._bindEnded()}};cc.js.extend(c,r),c.State={ERROR:-1,INITIALZING:0,PLAYING:1,PAUSED:2,STOPPED:3},(i=c.prototype)._bindEnded=function(t){if(!(t=t||this._onended)._binded){t._binded=!0;var e=this._element;this._src&&e instanceof HTMLAudioElement?e.addEventListener("ended",t):e.onended=t}},i._unbindEnded=function(t){if((t=t||this._onended)._binded){t._binded=!1;var e=this._element;e instanceof HTMLAudioElement?e.removeEventListener("ended",t):e&&(e.onended=null)}},i._onLoaded=function(){this._createElement(),this._state=c.State.INITIALZING,this.setVolume(1),this.setLoop(!1)},i._createElement=function(){var t=this._src._nativeAsset;t instanceof HTMLAudioElement?(this._element||(this._element=document.createElement("audio")),this._element.src=t.src):this._element=new h(t,this)},i.play=function(){var t=this;this._src&&this._src._ensureLoaded((function(){t._state=c.State.PLAYING,t._bindEnded();var e=t._element.play();window.Promise&&e instanceof Promise&&e.catch((function(){})),t._touchToPlay()}))},i._touchToPlay=function(){if(this._src&&this._src.loadMode===a.DOM_AUDIO&&this._element.paused&&l.push({instance:this,offset:0,audio:this._element}),!o){o=!0;var t="ontouchend"in window?"touchend":"mousedown";cc.game.canvas.addEventListener(t,(function(){for(var t;t=l.pop();)t.audio.play(t.offset)}))}},i.destroy=function(){this._element=null},i.pause=function(){if(this.getState()===c.State.PLAYING){var t=this;this._src&&this._src._ensureLoaded((function(){t._unbindEnded(),t._element.pause(),t._state=c.State.PAUSED}))}},i.resume=function(){if(this.getState()===c.State.PAUSED){var t=this;this._src&&this._src._ensureLoaded((function(){t._bindEnded(),t._element.play(),t._state=c.State.PLAYING}))}},i.stop=function(){var t=this;this._src&&this._src._ensureLoaded((function(){t._element.pause(),t._element.currentTime=0;for(var e=0;ethis._buffer.duration)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"loop",{get:function(){return this._loop},set:function(t){return this._currentSource&&(this._currentSource.loop=t),this._loop=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"volume",{get:function(){return this._volume},set:function(t){if(this._volume=t,this._gainObj.gain.setTargetAtTime)try{this._gainObj.gain.setTargetAtTime(t,this._context.currentTime,n)}catch(e){this._gainObj.gain.setTargetAtTime(t,this._context.currentTime,.01)}else this._gainObj.gain.value=t;s.os===s.OS_IOS&&!this.paused&&this._currentSource&&(this._currentSource.onended=null,this.pause(),this.play())},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTime",{get:function(){return this.paused?this.playedLength:(this.playedLength=this._context.currentTime-this._startTime,this.playedLength%=this._buffer.duration,this.playedLength)},set:function(t){return this.paused?this.playedLength=t:(this.pause(),this.playedLength=t,this.play()),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"duration",{get:function(){return this._buffer.duration},enumerable:!0,configurable:!0})})(h.prototype),e.exports=cc._Audio=c}),{"../core/assets/CCAudioClip":106,"../core/event/event-target":185,"../core/platform/CCSys":247}],21:[(function(t,e){"use strict";var i=t("./CCAudio"),n=t("../core/assets/CCAudioClip"),r=cc.js,s=0,a=r.createMap(!0),o={},l=[],c=function(t){t._shouldRecycleOnEnded&&(t._finishCallback=null,t.off("ended"),t.off("stop"),t.src=null,l.includes(t)||(l.length<32?l.push(t):t.destroy()),t._shouldRecycleOnEnded=!1)},h=function(t){var e=s++,n=o[t];if(n||(n=o[t]=[]),f._maxAudioInstance<=n.length){var r=n.shift();u(r).stop()}var h=l.pop()||new i,_=function(){if(u(this.id)){delete a[this.id];var t=n.indexOf(this.id);cc.js.array.fastRemoveAt(n,t)}c(this)};return h.on("ended",(function(){this._finishCallback&&this._finishCallback(),this.getLoop()||_.call(this)}),h),h.on("stop",_,h),h.id=e,a[e]=h,n.push(e),h},u=function(t){return a[t]},_=function(t){return void 0===t?t=1:"string"==typeof t&&(t=Number.parseFloat(t)),t},f={AudioState:i.State,_maxAudioInstance:24,_id2audio:a,play:function(t,e,i){if(!(t instanceof n))return cc.error("Wrong type of AudioClip.");var r=t.nativeUrl,s=h(r);return s.src=t,t._ensureLoaded(),s._shouldRecycleOnEnded=!0,s.setLoop(e||!1),i=_(i),s.setVolume(i),s.play(),s.id},setLoop:function(t,e){var i=u(t);i&&i.setLoop&&i.setLoop(e)},isLoop:function(t){var e=u(t);return!(!e||!e.getLoop)&&e.getLoop()},setVolume:function(t,e){var i=u(t);i&&i.setVolume(e)},getVolume:function(t){var e=u(t);return e?e.getVolume():1},setCurrentTime:function(t,e){var i=u(t);return!!i&&(i.setCurrentTime(e),!0)},getCurrentTime:function(t){var e=u(t);return e?e.getCurrentTime():0},getDuration:function(t){var e=u(t);return e?e.getDuration():0},getState:function(t){var e=u(t);return e?e.getState():this.AudioState.ERROR},setFinishCallback:function(t,e){var i=u(t);i&&(i._finishCallback=e)},pause:function(t){var e=u(t);return!!e&&(e.pause(),!0)},_pauseIDCache:[],pauseAll:function(){for(var t in a){var e=a[t];e.getState()===i.State.PLAYING&&(this._pauseIDCache.push(t),e.pause())}},resume:function(t){var e=u(t);e&&e.resume()},resumeAll:function(){for(var t=0;t0;){var n=i.pop(),r=a[n];r&&(r.stop(),delete a[n])}},uncacheAll:function(){var t;for(var e in this.stopAll(),a)(t=a[e])&&t.destroy();for(;t=l.pop();)t.destroy();a=r.createMap(!0),o={}},_breakCache:null,_break:function(){for(var t in this._breakCache=[],a){var e=a[t];e.getState()===i.State.PLAYING&&(this._breakCache.push(t),e.pause())}},_restore:function(){if(this._breakCache){for(;this._breakCache.length>0;){var t=this._breakCache.pop(),e=u(t);e&&e.resume&&e.resume()}this._breakCache=null}},_music:{id:-1,loop:!1,volume:1},_effect:{volume:1,pauseCache:[]},playMusic:function(t,e){var i=this._music;return this.stop(i.id),i.id=this.play(t,e,i.volume),i.loop=e,i.id},stopMusic:function(){this.stop(this._music.id)},pauseMusic:function(){return this.pause(this._music.id),this._music.id},resumeMusic:function(){return this.resume(this._music.id),this._music.id},getMusicVolume:function(){return this._music.volume},setMusicVolume:function(t){t=_(t);var e=this._music;return e.volume=t,this.setVolume(e.id,e.volume),e.volume},isMusicPlaying:function(){return this.getState(this._music.id)===this.AudioState.PLAYING},playEffect:function(t,e){return this.play(t,e||!1,this._effect.volume)},setEffectsVolume:function(t){t=_(t);var e=this._music.id;for(var i in this._effect.volume=t,a){var n=a[i];n&&n.id!==e&&f.setVolume(i,t)}},getEffectsVolume:function(){return this._effect.volume},pauseEffect:function(t){return this.pause(t)},pauseAllEffects:function(){var t=this._music.id,e=this._effect;for(var i in e.pauseCache.length=0,a){var n=a[i];n&&n.id!==t&&n.getState()===this.AudioState.PLAYING&&(e.pauseCache.push(i),n.pause())}},resumeEffect:function(t){this.resume(t)},resumeAllEffects:function(){for(var t=this._effect.pauseCache,e=0;e=0;--n)a[i]+=s.charCodeAt(i*e+n)<<8*n;return a},i.unzipAsArray=function(t,e){e=e||1;var i,n,r,s=this.unzip(t),a=[];for(i=0,r=s.length/e;i=0;--n)a[i]+=s.charCodeAt(i*e+n)<<8*n;return a},cc.codec=e.exports=i}),{"./base64":23,"./gzip":24}],23:[(function(t,e){"use strict";var i=t("../core/utils/misc").BASE64_VALUES,n={name:"Jacob__Codec__Base64",decode:function(t){var e,n,r,s,a,o,l=[],c=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,n=(15&s)<<4|(a=i[t.charCodeAt(c++)])>>2,r=(3&a)<<6|(o=i[t.charCodeAt(c++)]),l.push(String.fromCharCode(e)),64!==a&&l.push(String.fromCharCode(n)),64!==o&&l.push(String.fromCharCode(r));return l.join("")},decodeAsArray:function(t,e){var i,n,r,s=this.decode(t),a=[];for(i=0,r=s.length/e;i=0;--n)a[i]+=s.charCodeAt(i*e+n)<<8*n;return a}};e.exports=n}),{"../core/utils/misc":323}],24:[(function(t,e){"use strict";var i=function(t){this.data=t,this.debug=!1,this.gpflags=void 0,this.files=0,this.unzipped=[],this.buf32k=new Array(32768),this.bIdx=0,this.modeZIP=!1,this.bytepos=0,this.bb=1,this.bits=0,this.nameBuf=[],this.fileout=void 0,this.literalTree=new Array(i.LITERALS),this.distanceTree=new Array(32),this.treepos=0,this.Places=null,this.len=0,this.fpos=new Array(17),this.fpos[0]=0,this.flens=void 0,this.fmax=void 0};i.gunzip=function(t){return t.constructor===Array||(t.constructor,String),new i(t).gunzip()[0][0]},i.HufNode=function(){this.b0=0,this.b1=0,this.jump=null,this.jumppos=-1},i.LITERALS=288,i.NAMEMAX=256,i.bitReverse=[0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,8,136,72,200,40,168,104,232,24,152,88,216,56,184,120,248,4,132,68,196,36,164,100,228,20,148,84,212,52,180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,3,131,67,195,35,163,99,227,19,147,83,211,51,179,115,243,11,139,75,203,43,171,107,235,27,155,91,219,59,187,123,251,7,135,71,199,39,167,103,231,23,151,87,215,55,183,119,247,15,143,79,207,47,175,111,239,31,159,95,223,63,191,127,255],i.cplens=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i.cplext=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],i.cpdist=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],i.cpdext=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],i.border=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],i.prototype.gunzip=function(){return this.outputArr=[],this.nextFile(),this.unzipped},i.prototype.readByte=function(){return this.bits+=8,this.bytepos>=1,0===this.bb&&(this.bb=this.readByte(),t=1&this.bb,this.bb=this.bb>>1|128),t},i.prototype.readBits=function(t){for(var e=0,n=t;n--;)e=e<<1|this.readBit();return t&&(e=i.bitReverse[e]>>8-t),e},i.prototype.flushBuffer=function(){this.bIdx=0},i.prototype.addBuffer=function(t){this.buf32k[this.bIdx++]=t,this.outputArr.push(String.fromCharCode(t)),32768===this.bIdx&&(this.bIdx=0)},i.prototype.IsPat=function(){for(;;){if(this.fpos[this.len]>=this.fmax)return-1;if(this.flens[this.fpos[this.len]]===this.len)return this.fpos[this.len]++;this.fpos[this.len]++}},i.prototype.Rec=function(){var t,e=this.Places[this.treepos];if(17===this.len)return-1;if(this.treepos++,this.len++,(t=this.IsPat())>=0)e.b0=t;else if(e.b0=32768,this.Rec())return-1;if((t=this.IsPat())>=0)e.b1=t,e.jump=null;else if(e.b1=32768,e.jump=this.Places[this.treepos],e.jumppos=this.treepos,this.Rec())return-1;return this.len--,0},i.prototype.CreateTree=function(t,e,i){var n;for(this.Places=t,this.treepos=0,this.flens=i,this.fmax=e,n=0;n<17;n++)this.fpos[n]=0;return this.len=0,this.Rec()?-1:0},i.prototype.DecodeValue=function(t){for(var e,i,n=0,r=t[n];;)if(this.readBit()){if(!(32768&r.b1))return r.b1;for(r=r.jump,e=t.length,i=0;i>1)>23?(o=o<<1|this.readBit())>199?o=(o-=128)<<1|this.readBit():(o-=48)>143&&(o+=136):o+=256,o<256)this.addBuffer(o);else{if(256===o)break;for(o-=257,p=this.readBits(i.cplext[o])+i.cplens[o],o=i.bitReverse[this.readBits(5)]>>3,i.cpdext[o]>8?(m=this.readBits(8),m|=this.readBits(i.cpdext[o]-8)<<8):m=this.readBits(i.cpdext[o]),m+=i.cpdist[o],o=0;ol)return this.flushBuffer(),1;for(f=n?_[n-1]:0;o--;)_[n++]=f}else{if(n+(o=17===o?3+this.readBits(3):11+this.readBits(7))>l)return this.flushBuffer(),1;for(;o--;)_[n++]=0}for(p=this.literalTree.length,n=0;n=256){var p,m;if(0==(o-=256))break;for(o--,p=this.readBits(i.cplext[o])+i.cplens[o],o=this.DecodeValue(this.distanceTree),i.cpdext[o]>8?(m=this.readBits(8),m|=this.readBits(i.cpdext[o]-8)<<8):m=this.readBits(i.cpdext[o]),m+=i.cpdist[o];p--;)a=this.buf32k[this.bIdx-m&32767],this.addBuffer(a)}else this.addBuffer(o)}}while(!t);return this.flushBuffer(),this.byteAlign(),0},i.prototype.unzipFile=function(t){var e;for(this.gunzip(),e=0;e>>0;t=n}for(var r,s=1,a=0,o=t.length,l=0;0>>0}function o(e,i){this.index="number"==typeof i?i:0,this.i=0,this.buffer=e instanceof(s?Uint8Array:Array)?e:new(s?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&t(Error("invalid index")),this.buffer.length<=this.index&&this.f()}o.prototype.f=function(){var t,e=this.buffer,i=e.length,n=new(s?Uint8Array:Array)(i<<1);if(s)n.set(e);else for(t=0;t>>8&255]<<16|f[t>>>16&255]<<8|f[t>>>24&255])>>32-e:f[t]>>8-e),8>e+a)o=o<>e-n-1&1,8==++a&&(a=0,r[s++]=f[o],o=0,s===r.length&&(r=this.f()));r[s]=o,this.buffer=r,this.i=a,this.index=s},o.prototype.finish=function(){var t,e=this.buffer,i=this.index;return 0l;++l){for(var h=_=l,u=7,_=_>>>1;_;_>>>=1)h<<=1,h|=1&_,--u;c[l]=(h<>>0}var f=c;function d(t){this.buffer=new(s?Uint16Array:Array)(2*t),this.length=0}function p(t){var e,i,n,r,a,o,l,c,h,u=t.length,_=0,f=Number.POSITIVE_INFINITY;for(c=0;c_&&(_=t[c]),t[c]>=1;for(h=o;hs[n]);)r=s[i],s[i]=s[n],s[n]=r,r=s[i+1],s[i+1]=s[n+1],s[n+1]=r,i=n;return this.length},d.prototype.pop=function(){var t,e,i,n,r,s=this.buffer;for(e=s[0],t=s[1],this.length-=2,s[0]=s[this.length],s[1]=s[this.length+1],r=0;!((n=2*r+2)>=this.length)&&(n+2s[n]&&(n+=2),s[n]>s[r]);)i=s[r],s[r]=s[n],s[n]=i,i=s[r+1],s[r+1]=s[n+1],s[n+1]=i,r=n;return{index:t,value:e,length:this.length}};var y,v=2,g={NONE:0,r:1,j:v,N:3},b=[];for(y=0;288>y;y++)switch(i){case 143>=y:b.push([y+48,8]);break;case 255>=y:b.push([y-144+400,9]);break;case 279>=y:b.push([y-256+0,7]);break;case 287>=y:b.push([y-280+192,8]);break;default:t("invalid literal: "+y)}function A(t,e){this.length=t,this.G=e}function x(){var e=C;switch(i){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:t("invalid length: "+e)}}m.prototype.n=function(){var n,r,a,l,c=this.input;switch(this.h){case 0:for(a=0,l=c.length;a>>8&255,y[g++]=255&_,y[g++]=_>>>8&255,s)y.set(f,g),g+=f.length,y=y.subarray(0,g);else{for(p=0,m=f.length;pJ)for(;0J?J:138)>J-3&&Q=Q?(it[K++]=17,it[K++]=Q-3,nt[17]++):(it[K++]=18,it[K++]=Q-11,nt[18]++),J-=Q;else if(it[K++]=et[Y],nt[et[Y]]++,3>--J)for(;0J?J:6)>J-3&&QU;U++)X[U]=N[W[U]];for(R=19;4=C;C++)T=x(),S[C]=T[2]<<24|T[1]<<16|T[0];var w=s?new Uint32Array(S):S;function E(n,r){function a(e,n){var r,s,a,o,l=e.G,c=[],h=0;switch(r=w[e.length],c[h++]=65535&r,c[h++]=r>>16&255,c[h++]=r>>24,i){case 1===l:s=[0,l-1,0];break;case 2===l:s=[1,l-2,0];break;case 3===l:s=[2,l-3,0];break;case 4===l:s=[3,l-4,0];break;case 6>=l:s=[4,l-5,1];break;case 8>=l:s=[5,l-7,1];break;case 12>=l:s=[6,l-9,2];break;case 16>=l:s=[7,l-13,2];break;case 24>=l:s=[8,l-17,3];break;case 32>=l:s=[9,l-25,3];break;case 48>=l:s=[10,l-33,4];break;case 64>=l:s=[11,l-49,4];break;case 96>=l:s=[12,l-65,5];break;case 128>=l:s=[13,l-97,5];break;case 192>=l:s=[14,l-129,6];break;case 256>=l:s=[15,l-193,6];break;case 384>=l:s=[16,l-257,7];break;case 512>=l:s=[17,l-385,7];break;case 768>=l:s=[18,l-513,8];break;case 1024>=l:s=[19,l-769,8];break;case 1536>=l:s=[20,l-1025,9];break;case 2048>=l:s=[21,l-1537,9];break;case 3072>=l:s=[22,l-2049,10];break;case 4096>=l:s=[23,l-3073,10];break;case 6144>=l:s=[24,l-4097,11];break;case 8192>=l:s=[25,l-6145,11];break;case 12288>=l:s=[26,l-8193,12];break;case 16384>=l:s=[27,l-12289,12];break;case 24576>=l:s=[28,l-16385,13];break;case 32768>=l:s=[29,l-24577,13];break;default:t("invalid distance")}for(r=s,c[h++]=r[0],c[h++]=r[1],c[h++]=r[2],a=0,o=c.length;a=c;)b[c++]=0;for(c=0;29>=c;)x[c++]=0}for(b[256]=1,o=0,l=r.length;o=l){for(d&&a(d,-1),c=0,h=l-o;cM&&o+ME&&(S=T,E=M),258===M)break}f=new A(E,o-S),d?d.length2*g[f-1]+b[f]&&(g[f]=2*g[f-1]+b[f]),x[f]=Array(g[f]),C[f]=Array(g[f]);for(_=0;_r[_]?(x[f][p]=m,C[f][p]=v,y+=2):(x[f][p]=r[_],C[f][p]=_,++_);T[f]=0,1===b[f]&&i(f)}for(a=A,o=0,l=n.length;o1<h&&t("undercommitted"),i=0,n=e.length;i>>=1;return o}function B(t,e){this.input=t,this.a=new(s?Uint8Array:Array)(32768),this.h=I.j;var i,n={};for(i in!e&&(e={})||"number"!=typeof e.compressionType||(this.h=e.compressionType),e)n[i]=e[i];n.outputBuffer=this.a,this.z=new m(this.input,n)}var I=g;function P(e,i){switch(this.k=[],this.l=32768,this.e=this.g=this.c=this.q=0,this.input=s?new Uint8Array(e):e,this.s=!1,this.m=O,this.B=!1,!i&&(i={})||(i.index&&(this.c=i.index),i.bufferSize&&(this.l=i.bufferSize),i.bufferType&&(this.m=i.bufferType),i.resize&&(this.B=i.resize)),this.m){case R:this.b=32768,this.a=new(s?Uint8Array:Array)(32768+this.l+258);break;case O:this.b=0,this.a=new(s?Uint8Array:Array)(this.l),this.f=this.J,this.t=this.H,this.o=this.I;break;default:t(Error("invalid inflate mode"))}}B.prototype.n=function(){var e,i,n,r,o,l,c,h=0;switch(c=this.a,e=ht){case ht:i=Math.LOG2E*Math.log(32768)-8;break;default:t(Error("invalid compression method"))}switch(n=i<<4|e,c[h++]=n,e){case ht:switch(this.h){case I.NONE:o=0;break;case I.r:o=1;break;case I.j:o=2;break;default:t(Error("unsupported compression type"))}break;default:t(Error("invalid compression method"))}return r=o<<6|0,c[h++]=r|31-(256*n+r)%31,l=a(this.input),this.z.b=h,h=(c=this.z.n()).length,s&&((c=new Uint8Array(c.buffer)).length<=h+4&&(this.a=new Uint8Array(c.length+4),this.a.set(c),c=this.a),c=c.subarray(0,h+4)),c[h++]=l>>24&255,c[h++]=l>>16&255,c[h++]=l>>8&255,c[h++]=255&l,c},r("Zlib.Deflate",B),r("Zlib.Deflate.compress",(function(t,e){return new B(t,e).n()})),r("Zlib.Deflate.CompressionType",I),r("Zlib.Deflate.CompressionType.NONE",I.NONE),r("Zlib.Deflate.CompressionType.FIXED",I.r),r("Zlib.Deflate.CompressionType.DYNAMIC",I.j);var R=0,O=1,L={D:R,C:O};P.prototype.p=function(){for(;!this.s;){var n=tt(this,3);switch(1&n&&(this.s=i),n>>>=1){case 0:var r=this.input,a=this.c,o=this.a,l=this.b,c=e,h=e,u=e,_=o.length,f=e;switch(this.e=this.g=0,(c=r[a++])===e&&t(Error("invalid uncompressed block header: LEN (first byte)")),h=c,(c=r[a++])===e&&t(Error("invalid uncompressed block header: LEN (second byte)")),h|=c<<8,(c=r[a++])===e&&t(Error("invalid uncompressed block header: NLEN (first byte)")),u=c,(c=r[a++])===e&&t(Error("invalid uncompressed block header: NLEN (second byte)")),h===~(u|=c<<8)&&t(Error("invalid uncompressed block header: length verify")),a+h>r.length&&t(Error("input buffer is broken")),this.m){case R:for(;l+h>o.length;){if(h-=f=_-l,s)o.set(r.subarray(a,a+f),l),l+=f,a+=f;else for(;f--;)o[l++]=r[a++];this.b=l,o=this.f(),l=this.b}break;case O:for(;l+h>o.length;)o=this.f({v:2});break;default:t(Error("invalid inflate mode"))}if(s)o.set(r.subarray(a,a+h),l),l+=h,a+=h;else for(;h--;)o[l++]=r[a++];this.c=a,this.b=l,this.a=o;break;case 1:this.o(K,$);break;case 2:it(this);break;default:t(Error("unknown BTYPE: "+n))}}return this.t()};var F,V,N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=s?new Uint16Array(N):N,z=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],G=s?new Uint16Array(z):z,U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],j=s?new Uint8Array(U):U,H=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],W=s?new Uint16Array(H):H,X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Y=s?new Uint8Array(X):X,q=new(s?Uint8Array:Array)(288);for(F=0,V=q.length;F=F?8:255>=F?9:279>=F?7:8;var J,Z,K=p(q),Q=new(s?Uint8Array:Array)(30);for(J=0,Z=Q.length;J>>n,i.e=a-n,i.c=l,r}function et(i,n){for(var r,s,a,o=i.g,l=i.e,c=i.input,h=i.c,u=n[0],_=n[1];l<_;)(r=c[h++])===e&&t(Error("input buffer is broken")),o|=r<>>16,i.g=o>>a,i.e=l-a,i.c=h,65535&s}function it(t){function e(t,e,i){var n,r,s,a;for(a=0;ar)n>=l&&(this.b=n,i=this.f(),n=this.b),i[n++]=r;else for(o=G[s=r-257],0=l&&(this.b=n,i=this.f(),n=this.b);o--;)i[n]=i[n++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},P.prototype.I=function(t,e){var i=this.a,n=this.b;this.u=t;for(var r,s,a,o,l=i.length;256!==(r=et(this,t));)if(256>r)n>=l&&(l=(i=this.f()).length),i[n++]=r;else for(o=G[s=r-257],0l&&(l=(i=this.f()).length);o--;)i[n]=i[n++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},P.prototype.f=function(){var t,e,i=new(s?Uint8Array:Array)(this.b-32768),n=this.b-32768,r=this.a;if(s)i.set(r.subarray(32768,i.length));else for(t=0,e=i.length;tt;++t)r[t]=r[n+t];return this.b=32768,r},P.prototype.J=function(t){var e,i,n,r=this.input.length/this.c+1|0,a=this.input,o=this.a;return t&&("number"==typeof t.v&&(r=t.v),"number"==typeof t.F&&(r+=t.F)),i=2>r?(n=(a.length-this.c)/this.u[2]/2*258|0)e&&(this.a.length=e),t=this.a),this.buffer=t},nt.prototype.p=function(){var e,i=this.input;return e=this.A.p(),this.c=this.A.c,this.M&&(i[this.c++]<<24|i[this.c++]<<16|i[this.c++]<<8|i[this.c++])>>>0!==a(e)&&t(Error("invalid adler-32 checksum")),e},r("Zlib.Inflate",nt),r("Zlib.Inflate.BufferType",L),L.ADAPTIVE=L.C,L.BLOCK=L.D,r("Zlib.Inflate.prototype.decompress",nt.prototype.p),s&&new Uint16Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s&&new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258]),s&&new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0]),s&&new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577]),s&&new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);var rt,st,at=new(s?Uint8Array:Array)(288);for(rt=0,st=at.length;rt=rt?8:255>=rt?9:279>=rt?7:8;p(at);var ot,lt,ct=new(s?Uint8Array:Array)(30);for(ot=0,lt=ct.length;ot1&&this.colorKeys.sort((function(t,e){return t.time-e.time})),this.alphaKeys.length>1&&this.alphaKeys.sort((function(t,e){return t.time-e.time}))},e.evaluate=function(t){return this.getRGB(t),this._color._fastSetA(this.getAlpha(t)),this._color},e.randomColor=function(){var t=this.colorKeys[Math.trunc(Math.random()*this.colorKeys.length)],e=this.alphaKeys[Math.trunc(Math.random()*this.alphaKeys.length)];return this._color.set(t.color),this._color._fastSetA(e.alpha),this._color},e.getRGB=function(t){if(!(this.colorKeys.length>1))return 1===this.colorKeys.length?(this._color.set(this.colorKeys[0].color),this._color):(this._color.set(cc.Color.WHITE),this._color);t=(0,S.repeat)(t,1);for(var e=1;e=i&&tthis.colorKeys[s].time&&this.colorKeys[s].color.lerp(cc.Color.BLACK,(t-this.colorKeys[s].time)/(1-this.colorKeys[s].time),this._color)},e.getAlpha=function(t){if(!(this.alphaKeys.length>1))return 1===this.alphaKeys.length?this.alphaKeys[0].alpha:255;t=(0,S.repeat)(t,1);for(var e=1;e=i&&tthis.alphaKeys[s].time?(0,S.lerp)(this.alphaKeys[s].alpha,255,(t-this.alphaKeys[s].time)/(1-this.alphaKeys[s].time)):void 0},t})(),A.Mode=M,v=E((y=x).prototype,"colorKeys",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Array}}),g=E(y.prototype,"alphaKeys",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Array}}),b=E(y.prototype,"mode",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.Blend}}),m=y))||m);i.Gradient=I,cc.ColorKey=D,cc.AlphaKey=B,cc.Gradient=I}),{"../../../platform/CCClassDecorator":239,"../../../platform/CCEnum":240,"../../../value-types":338}],35:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r,s,a,o,l,c,h,u,_,f,d,p,m,y,v,g,b=t("../../../platform/CCClassDecorator"),A=t("../../../value-types"),x=t("../enum"),C=(n=t("./curve-range"))&&n.__esModule?n:{default:n};function T(t,e,i,n){i&&Object.defineProperty(t,e,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function S(t,e,i,n,r){var s={};return Object.keys(n).forEach((function(t){s[t]=n[t]})),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=i.slice().reverse().reduce((function(i,n){return n(t,e,i)||i}),s),r&&void 0!==s.initializer&&(s.value=s.initializer?s.initializer.call(r):void 0,s.initializer=void 0),void 0===s.initializer&&(Object.defineProperty(t,e,s),s=null),s}var w=cc.v3(),E=cc.v3();function M(t,e,i){var n=Math.sign(t),r=Math.abs(t);return r>e&&(r=(0,A.lerp)(r,e,i)),r*n}var D=(r=(0,b.ccclass)("cc.LimitVelocityOvertimeModule"),s=(0,b.property)({type:x.Space}),a=(0,b.property)({type:C.default,range:[-1,1]}),o=(0,b.property)({type:C.default,range:[-1,1]}),l=(0,b.property)({type:C.default,range:[-1,1]}),c=(0,b.property)({type:C.default,range:[-1,1]}),r((_=S((u=(function(){function t(){T(this,"enable",_,this),T(this,"space",f,this),T(this,"separateAxes",d,this),T(this,"limit",p,this),T(this,"limitX",m,this),T(this,"limitY",y,this),T(this,"limitZ",v,this),T(this,"dampen",g,this),this.drag=null,this.multiplyDragByParticleSize=!1,this.multiplyDragByParticleVelocity=!1,this.rotation=null,this.needTransform=!1,this.rotation=new A.Quat,this.needTransform=!1}var e=t.prototype;return e.update=function(t,e){this.needTransform=calculateTransform(t,this.space,e,this.rotation)},e.animate=function(t){var e=1-t.remainingLifetime/t.startLifetime,i=w;this.separateAxes?(A.Vec3.set(E,this.limitX.evaluate(e,(0,A.pseudoRandom)(t.randomSeed+23541)),this.limitY.evaluate(e,(0,A.pseudoRandom)(t.randomSeed+23541)),this.limitZ.evaluate(e,(0,A.pseudoRandom)(t.randomSeed+23541))),this.needTransform&&A.Vec3.transformQuat(E,E,this.rotation),A.Vec3.set(i,M(t.ultimateVelocity.x,E.x,this.dampen),M(t.ultimateVelocity.y,E.y,this.dampen),M(t.ultimateVelocity.z,E.z,this.dampen))):(A.Vec3.normalize(i,t.ultimateVelocity),A.Vec3.scale(i,i,M(t.ultimateVelocity.len(),this.limit.evaluate(e,(0,A.pseudoRandom)(t.randomSeed+23541)),this.dampen))),A.Vec3.copy(t.ultimateVelocity,i)},t})()).prototype,"enable",[b.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),f=S(u.prototype,"space",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.Space.Local}}),d=S(u.prototype,"separateAxes",[b.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),p=S(u.prototype,"limit",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new C.default}}),m=S(u.prototype,"limitX",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new C.default}}),y=S(u.prototype,"limitY",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new C.default}}),v=S(u.prototype,"limitZ",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new C.default}}),g=S(u.prototype,"dampen",[b.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 3}}),h=u))||h);i.default=D,e.exports=i.default}),{"../../../platform/CCClassDecorator":239,"../../../value-types":338,"../enum":43,"./curve-range":31}],36:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r,s,a,o,l,c,h,u,_,f,d,p=t("../../../platform/CCClassDecorator"),m=t("../../../value-types"),y=(n=t("./curve-range"))&&n.__esModule?n:{default:n};function v(t,e,i,n){i&&Object.defineProperty(t,e,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function g(t,e){for(var i=0;i0){var i=(0,p.repeat)(t._time-t.startDelay.evaluate(0,1),t.duration)-e;i=i>0?i:0;var n=(0,p.repeat)(t.time-t.startDelay.evaluate(0,1),t.duration);this._curTime>=i&&this._curTimethis.keyFrames[0].time)if(e>=this.keyFrames[this.keyFrames.length-1].time)s=this.keyFrames.length-2;else for(var a=0;a=this.keyFrames[0].time&&e<=this.keyFrames[a+1].time){s=a;break}var o=this.keyFrames[s],l=this.keyFrames[s+1],c=(0,b.inverseLerp)(o.time,l.time,e),h=l.time-o.time,u=o.outTangent*h,_=l.inTangent*h,f=c*c,d=f*c,p=d-2*f+c,m=d-f,y=-2*d+3*f;return(2*d-3*f+1)*o.value+p*u+m*_+y*l.value},e.evaluate=function(t){var e=t,i=t<0?this.preWrapMode:this.postWrapMode,n=this.keyFrames[0].time,r=this.keyFrames[this.keyFrames.length-1].time;switch(i){case T.Loop:e=(0,b.repeat)(t-n,r-n)+n;break;case T.PingPong:e=(0,b.pingPong)(t-n,r-n)+n;break;case T.ClampForever:e=(0,b.clamp)(t,n,r)}if(e>=this.cachedKey.time&&ethis.keyFrames[i].time)for(var n=0;n<3;n++){var r=i+n;if(r+1e)return r}else for(var s=0;s<3;s++){var a=i-s;if(a>=0&&this.keyFrames[a-1].time<=e)return a-1}for(var o=0,l=this.keyFrames.length,c=Math.floor((o+l)/2);l-o>1;)this.keyFrames[c].time>=e?l=c:o=c+1,c=Math.floor((o+l)/2);return o},t})()).prototype,"keyFrames",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Array}}),y=C(p.prototype,"preWrapMode",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return T.Loop}}),v=C(p.prototype,"postWrapMode",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return T.Loop}}),d=p))||d);i.AnimationCurve=B,cc.Keyframe=S,cc.AnimationCurve=B}),{"../../platform/CCClassDecorator":239,"../../platform/CCEnum":240,"../../value-types":338}],42:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r,s,a,o,l,c,h,u,_,f,d,p,m,y,v,g,b,A,x,C,T,S,w,E,M,D,B=t("../../../platform/CCClassDecorator"),I=t("../../../value-types"),P=(n=t("../animator/curve-range"))&&n.__esModule?n:{default:n},R=t("../particle-general-function"),O=t("../enum");function L(t,e,i,n){i&&Object.defineProperty(t,e,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(n):void 0})}function F(t,e){for(var i=0;i0&&(t.position.x+=(0,I.randomRange)(-this.randomPositionAmount,this.randomPositionAmount),t.position.y+=(0,I.randomRange)(-this.randomPositionAmount,this.randomPositionAmount),t.position.z+=(0,I.randomRange)(-this.randomPositionAmount,this.randomPositionAmount)),I.Vec3.transformQuat(t.velocity,t.velocity,this.quat),I.Vec3.transformMat4(t.position,t.position,this.mat),this.sphericalDirectionAmount>0){var a=I.Vec3.normalize(N,t.position);I.Vec3.lerp(t.velocity,t.velocity,a,this.sphericalDirectionAmount)}this.lastTime=this.particleSystem._time},n.generateArcAngle=function(){if(this.arcMode===O.ArcMode.Random)return(0,I.randomRange)(0,this._arc);var t=this.totalAngle+2*Math.PI*this.arcSpeed.evaluate(this.particleSystem._time,1)*(this.particleSystem._time-this.lastTime);switch(this.totalAngle=t,0!==this.arcSpread&&(t=Math.floor(t/(this._arc*this.arcSpread))*this._arc*this.arcSpread),this.arcMode){case O.ArcMode.Loop:return(0,I.repeat)(t,this._arc);case O.ArcMode.PingPong:return(0,I.pingPong)(t,this._arc)}},i})()).prototype,"enable",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=V(h.prototype,"_shapeType",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return O.ShapeType.Cone}}),V(h.prototype,"shapeType",[s],Object.getOwnPropertyDescriptor(h.prototype,"shapeType"),h.prototype),f=V(h.prototype,"emitFrom",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return O.EmitLocation.Volume}}),d=V(h.prototype,"radius",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),p=V(h.prototype,"radiusThickness",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),m=V(h.prototype,"_angle",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(0,I.toRadian)(25)}}),V(h.prototype,"angle",[B.property],Object.getOwnPropertyDescriptor(h.prototype,"angle"),h.prototype),y=V(h.prototype,"_arc",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return(0,I.toRadian)(360)}}),V(h.prototype,"arc",[B.property],Object.getOwnPropertyDescriptor(h.prototype,"arc"),h.prototype),v=V(h.prototype,"arcMode",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return O.ArcMode.Random}}),g=V(h.prototype,"arcSpread",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),b=V(h.prototype,"arcSpeed",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new P.default}}),A=V(h.prototype,"length",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 5}}),x=V(h.prototype,"boxThickness",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new I.Vec3(0,0,0)}}),C=V(h.prototype,"_position",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new I.Vec3(0,0,0)}}),V(h.prototype,"position",[B.property],Object.getOwnPropertyDescriptor(h.prototype,"position"),h.prototype),T=V(h.prototype,"_rotation",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new I.Vec3(0,0,0)}}),V(h.prototype,"rotation",[B.property],Object.getOwnPropertyDescriptor(h.prototype,"rotation"),h.prototype),S=V(h.prototype,"_scale",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new I.Vec3(1,1,1)}}),V(h.prototype,"scale",[B.property],Object.getOwnPropertyDescriptor(h.prototype,"scale"),h.prototype),w=V(h.prototype,"alignToDirection",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),E=V(h.prototype,"randomDirectionAmount",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),M=V(h.prototype,"sphericalDirectionAmount",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),D=V(h.prototype,"randomPositionAmount",[B.property],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),c=h))||c);function U(t,e,i,n,r){switch(t){case O.EmitLocation.Volume:(0,R.randomPointBetweenSphere)(n,e*(1-i),e),I.Vec3.copy(r,n),I.Vec3.normalize(r,r);break;case O.EmitLocation.Shell:(0,R.randomUnitVector)(n),I.Vec3.scale(n,n,e),I.Vec3.copy(r,n);break;default:console.warn(t+" is not supported for sphere emitter.")}}function j(t,e,i,n,r){switch(t){case O.EmitLocation.Volume:(0,R.randomPointBetweenSphere)(n,e*(1-i),e),n.z>0&&(n.z*=-1),I.Vec3.copy(r,n),I.Vec3.normalize(r,r);break;case O.EmitLocation.Shell:(0,R.randomUnitVector)(n),I.Vec3.scale(n,n,e),n.z<0&&(n.z*=-1),I.Vec3.copy(r,n);break;default:console.warn(t+" is not supported for hemisphere emitter.")}}function H(t,e,i,n,r,s,a,o){switch(t){case O.EmitLocation.Base:(0,R.randomPointBetweenCircleAtFixedAngle)(a,e*(1-i),e,n),I.Vec2.scale(o,a,Math.sin(r)),o.z=-Math.cos(r)*e,I.Vec3.normalize(o,o),a.z=0;break;case O.EmitLocation.Shell:(0,R.fixedAngleUnitVector2)(a,n),I.Vec2.scale(o,a,Math.sin(r)),o.z=-Math.cos(r),I.Vec3.normalize(o,o),I.Vec2.scale(a,a,e),a.z=0;break;case O.EmitLocation.Volume:(0,R.randomPointBetweenCircleAtFixedAngle)(a,e*(1-i),e,n),I.Vec2.scale(o,a,Math.sin(r)),o.z=-Math.cos(r)*e,I.Vec3.normalize(o,o),a.z=0,I.Vec3.add(a,a,I.Vec3.scale(N,o,s*(0,I.random)()/-o.z));break;default:console.warn(t+" is not supported for cone emitter.")}}function W(t,e,i,n){switch(t){case O.EmitLocation.Volume:(0,R.randomPointInCube)(i,z);break;case O.EmitLocation.Shell:k.splice(0,k.length),k.push((0,I.randomRange)(-.5,.5)),k.push((0,I.randomRange)(-.5,.5)),k.push(.5*(0,R.randomSign)()),(0,R.randomSortArray)(k),X(k,e),I.Vec3.set(i,k[0],k[1],k[2]);break;case O.EmitLocation.Edge:k.splice(0,k.length),k.push((0,I.randomRange)(-.5,.5)),k.push(.5*(0,R.randomSign)()),k.push(.5*(0,R.randomSign)()),(0,R.randomSortArray)(k),X(k,e),I.Vec3.set(i,k[0],k[1],k[2]);break;default:console.warn(t+" is not supported for box emitter.")}I.Vec3.copy(n,R.particleEmitZAxis)}function X(t,e){e.x>0&&(t[0]+=.5*(0,I.randomRange)(-e.x,e.x),t[0]=(0,I.clamp)(t[0],-.5,.5)),e.y>0&&(t[1]+=.5*(0,I.randomRange)(-e.y,e.y),t[1]=(0,I.clamp)(t[1],-.5,.5)),e.z>0&&(t[2]+=.5*(0,I.randomRange)(-e.z,e.z),t[2]=(0,I.clamp)(t[2],-.5,.5))}i.default=G,e.exports=i.default}),{"../../../platform/CCClassDecorator":239,"../../../value-types":338,"../animator/curve-range":31,"../enum":43,"../particle-general-function":44}],43:[(function(t,e,i){"use strict";i.__esModule=!0,i.TextureMode=i.TrailMode=i.ArcMode=i.EmitLocation=i.ShapeType=i.RenderMode=i.Space=void 0;var n,r=(n=t("../../platform/CCEnum"))&&n.__esModule?n:{default:n},s=(0,r.default)({World:0,Local:1,Custom:2});i.Space=s;var a=(0,r.default)({Billboard:0,StrecthedBillboard:1,HorizontalBillboard:2,VerticalBillboard:3,Mesh:4});i.RenderMode=a;var o=(0,r.default)({Box:0,Circle:1,Cone:2,Sphere:3,Hemisphere:4});i.ShapeType=o;var l=(0,r.default)({Base:0,Edge:1,Shell:2,Volume:3});i.EmitLocation=l;var c=(0,r.default)({Random:0,Loop:1,PingPong:2});i.ArcMode=c;var h=(0,r.default)({Particles:0,Ribbon:1});i.TrailMode=h;var u=(0,r.default)({Stretch:0,Repeat:1});i.TextureMode=u}),{"../../platform/CCEnum":240}],44:[(function(t,e,i){"use strict";i.__esModule=!0,i.calculateTransform=function(t,e,i,r){return e!==t?(t===s.Space.World?n.Mat4.getRotation(r,i):(n.Mat4.invert(i,i),n.Mat4.getRotation(r,i)),!0):(n.Quat.set(r,0,0,0,1),!1)},i.fixedAngleUnitVector2=o,i.randomUnitVector2=l,i.randomUnitVector=c,i.randomPointInUnitSphere=function(t){c(t),n.Vec3.scale(t,t,(0,n.random)())},i.randomPointBetweenSphere=function(t,e,i){c(t),n.Vec3.scale(t,t,e+(i-e)*(0,n.random)())},i.randomPointInUnitCircle=function(t){l(t),t.z=0,n.Vec3.scale(t,t,(0,n.random)())},i.randomPointBetweenCircle=function(t,e,i){l(t),t.z=0,n.Vec3.scale(t,t,e+(i-e)*(0,n.random)())},i.randomPointBetweenCircleAtFixedAngle=function(t,e,i,r){o(t,r),t.z=0,n.Vec3.scale(t,t,e+(i-e)*(0,n.random)())},i.randomPointInCube=function(t,e){n.Vec3.set(t,(0,n.randomRange)(-e.x,e.x),(0,n.randomRange)(-e.y,e.y),(0,n.randomRange)(-e.z,e.z))},i.randomPointBetweenCube=function(t,e,i){for(var r=["x","y","z"],s=(0,n.randomRangeInt)(0,3),a=0;a<3;a++)if(a!==s){var o=2*(0,n.random)()-1;t[r[a]]=o<0?-e[r[a]]+o*(i[r[a]]-e[r[a]]):e[r[a]]+o*(i[r[a]]-e[r[a]])}else t[r[a]]=(0,n.randomRange)(-i[r[a]],i[r[a]])},i.randomSortArray=function(t){for(var e=0;e=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}function Ft(t,e){if(t){if("string"==typeof t)return Vt(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Vt(t,e):void 0}}function Vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);ie){if(this._time>this.duration+e&&!this.loop)return void(this._isEmitting=!1);if(this._emitRateTimeCounter+=this.rateOverTime.evaluate(this._time/this.duration,1)*t,this._emitRateTimeCounter>1&&this._isEmitting){var i=Math.floor(this._emitRateTimeCounter);this._emitRateTimeCounter-=i,this.emit(i,t)}this.node.getWorldPosition(this._curWPos);var n=pt.Vec3.distance(this._curWPos,this._oldWPos);if(pt.Vec3.copy(this._oldWPos,this._curWPos),this._emitRateDistanceCounter+=n*this.rateOverDistance.evaluate(this._time/this.duration,1),this._emitRateDistanceCounter>1&&this._isEmitting){var r=Math.floor(this._emitRateDistanceCounter);this._emitRateDistanceCounter-=r,this.emit(r,t)}for(var s,a=Lt(this.bursts);!(s=a()).done;)s.value.update(this,t)}},r._activateMaterial=function(){},r._resetPosition=function(){this.node.getWorldPosition(this._oldWPos),pt.Vec3.copy(this._curWPos,this._oldWPos)},r.addSubEmitter=function(t){this._subEmitters.push(t)},r.removeSubEmitter=function(t){this._subEmitters.splice(this._subEmitters.indexOf(t),1)},r.addBurst=function(t){this.bursts.push(t)},r.removeBurst=function(t){this.bursts.splice(this.bursts.indexOf(t),1)},r._checkBacth=function(){},Gt(n,[{key:"isPlaying",get:function(){return this._isPlaying}},{key:"isPaused",get:function(){return this._isPaused}},{key:"isStopped",get:function(){return this._isStopped}},{key:"isEmitting",get:function(){return this._isEmitting}},{key:"time",get:function(){return this._time}}]),n})(Jt)).prototype,"duration",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 5}}),k=Ut(V.prototype,"_capacity",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Ut(V.prototype,"capacity",[Xt],Object.getOwnPropertyDescriptor(V.prototype,"capacity"),V.prototype),z=Ut(V.prototype,"loop",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),G=Ut(V.prototype,"playOnAwake",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),U=Ut(V.prototype,"_prewarm",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ut(V.prototype,"prewarm",[o],Object.getOwnPropertyDescriptor(V.prototype,"prewarm"),V.prototype),j=Ut(V.prototype,"_simulationSpace",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Dt.Space.Local}}),Ut(V.prototype,"simulationSpace",[l],Object.getOwnPropertyDescriptor(V.prototype,"simulationSpace"),V.prototype),H=Ut(V.prototype,"simulationSpeed",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),W=Ut(V.prototype,"startDelay",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),X=Ut(V.prototype,"startLifetime",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),Y=Ut(V.prototype,"startColor",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new At.default}}),q=Ut(V.prototype,"scaleSpace",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Dt.Space.Local}}),J=Ut(V.prototype,"startSize",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),Z=Ut(V.prototype,"startSpeed",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),K=Ut(V.prototype,"startRotation",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),Q=Ut(V.prototype,"gravityModifier",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),$=Ut(V.prototype,"rateOverTime",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),tt=Ut(V.prototype,"rateOverDistance",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new gt.default}}),et=Ut(V.prototype,"bursts",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Array}}),Ut(V.prototype,"materials",[b],Object.getOwnPropertyDescriptor(V.prototype,"materials"),V.prototype),it=Ut(V.prototype,"_shapeModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Mt.default}}),Ut(V.prototype,"shapeModule",[A],Object.getOwnPropertyDescriptor(V.prototype,"shapeModule"),V.prototype),nt=Ut(V.prototype,"_colorOverLifetimeModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new vt.default}}),Ut(V.prototype,"colorOverLifetimeModule",[x],Object.getOwnPropertyDescriptor(V.prototype,"colorOverLifetimeModule"),V.prototype),rt=Ut(V.prototype,"_sizeOvertimeModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Tt.default}}),Ut(V.prototype,"sizeOvertimeModule",[C],Object.getOwnPropertyDescriptor(V.prototype,"sizeOvertimeModule"),V.prototype),st=Ut(V.prototype,"_velocityOvertimeModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new wt.default}}),Ut(V.prototype,"velocityOvertimeModule",[T],Object.getOwnPropertyDescriptor(V.prototype,"velocityOvertimeModule"),V.prototype),at=Ut(V.prototype,"_forceOvertimeModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new bt.default}}),Ut(V.prototype,"forceOvertimeModule",[S],Object.getOwnPropertyDescriptor(V.prototype,"forceOvertimeModule"),V.prototype),ot=Ut(V.prototype,"_limitVelocityOvertimeModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new xt.default}}),Ut(V.prototype,"limitVelocityOvertimeModule",[w],Object.getOwnPropertyDescriptor(V.prototype,"limitVelocityOvertimeModule"),V.prototype),lt=Ut(V.prototype,"_rotationOvertimeModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Ct.default}}),Ut(V.prototype,"rotationOvertimeModule",[E],Object.getOwnPropertyDescriptor(V.prototype,"rotationOvertimeModule"),V.prototype),ct=Ut(V.prototype,"_textureAnimationModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new St.default}}),Ut(V.prototype,"textureAnimationModule",[M],Object.getOwnPropertyDescriptor(V.prototype,"textureAnimationModule"),V.prototype),ht=Ut(V.prototype,"_trailModule",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new It.default}}),Ut(V.prototype,"trailModule",[D],Object.getOwnPropertyDescriptor(V.prototype,"trailModule"),V.prototype),ut=Ut(V.prototype,"_renderMode",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Dt.RenderMode.Billboard}}),Ut(V.prototype,"renderMode",[B],Object.getOwnPropertyDescriptor(V.prototype,"renderMode"),V.prototype),_t=Ut(V.prototype,"_velocityScale",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ut(V.prototype,"velocityScale",[I],Object.getOwnPropertyDescriptor(V.prototype,"velocityScale"),V.prototype),ft=Ut(V.prototype,"_lengthScale",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ut(V.prototype,"lengthScale",[P],Object.getOwnPropertyDescriptor(V.prototype,"lengthScale"),V.prototype),dt=Ut(V.prototype,"_mesh",[Xt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Ut(V.prototype,"mesh",[R],Object.getOwnPropertyDescriptor(V.prototype,"mesh"),V.prototype),Ut(V.prototype,"particleMaterial",[O],Object.getOwnPropertyDescriptor(V.prototype,"particleMaterial"),V.prototype),Ut(V.prototype,"trailMaterial",[L],Object.getOwnPropertyDescriptor(V.prototype,"trailMaterial"),V.prototype),F=V))||F)||F)||F)||F);i.default=Kt,cc.ParticleSystem3D=Kt,e.exports=i.default}),{"../../assets/material/CCMaterial":123,"../../components/CCRenderComponent":159,"../../mesh/CCMesh":206,"../../platform/CCClassDecorator":239,"../../value-types":338,"../../value-types/utils":345,"./animator/color-overtime":30,"./animator/curve-range":31,"./animator/force-overtime":32,"./animator/gradient-range":33,"./animator/limit-velocity-overtime":35,"./animator/rotation-overtime":36,"./animator/size-overtime":37,"./animator/texture-animation":38,"./animator/velocity-overtime":39,"./burst":40,"./emitter/shape-module":42,"./enum":43,"./particle-general-function":44,"./renderer/trail":49}],46:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("../../value-types");i.default=function(t){this.particleSystem=null,this.position=null,this.velocity=null,this.animatedVelocity=null,this.ultimateVelocity=null,this.angularVelocity=null,this.axisOfRotation=null,this.rotation=null,this.startSize=null,this.size=null,this.startColor=null,this.color=cc.Color.WHITE,this.randomSeed=null,this.remainingLifetime=null,this.startLifetime=null,this.emitAccumulator0=null,this.emitAccumulator1=null,this.frameIndex=null,this.particleSystem=t,this.position=new n.Vec3(0,0,0),this.velocity=new n.Vec3(0,0,0),this.animatedVelocity=new n.Vec3(0,0,0),this.ultimateVelocity=new n.Vec3(0,0,0),this.angularVelocity=new n.Vec3(0,0,0),this.axisOfRotation=new n.Vec3(0,0,0),this.rotation=new n.Vec3(0,0,0),this.startSize=new n.Vec3(0,0,0),this.size=new n.Vec3(0,0,0),this.startColor=cc.Color.WHITE.clone(),this.color=cc.Color.WHITE.clone(),this.randomSeed=0,this.remainingLifetime=0,this.startLifetime=0,this.emitAccumulator0=0,this.emitAccumulator1=0,this.frameIndex=0},e.exports=i.default}),{"../../value-types":338}],47:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("../../../../renderer/gfx")),r=a(t("../../../../renderer/core/input-assembler")),s=t("../../../mesh/mesh-data");function a(t){return t&&t.__esModule?t:{default:t}}var o=t("../../../renderer"),l=(function(){function t(){this._capacity=0,this._vertFormat=null,this._vertAttrsFloatCount=0,this._mesh=null,this._vertCount=0,this._indexCount=0,this._material=null,this._capacity=0,this._vertFormat=null,this._vertAttrsFloatCount=0,this._mesh=null,this._subDatas=[],this._subMeshes=[]}var e=t.prototype;return e.setCapacity=function(t){var e=this._capacity!==t;this._capacity=t,this._inited&&e&&this._recreateBuffer()},e.setVertexAttributes=function(t,e){this._mesh===t&&this._vertFormat===e||(this._mesh=t,this._vertFormat=e,this._vertAttrsFloatCount=this._vertFormat._bytes/4,this._createParticleData(),this._inited=!0)},e._recreateBuffer=function(){this._createParticleData()},e._createParticleData=function(){this.destroyIAData(),this._vertCount=4,this._indexCount=6;var t=null,e=null,i=this._vertFormat._bytes;if(this._mesh){var a=this._mesh._subDatas[0];this._vertCount=a.vData.byteLength/a.vfm._bytes,this._indexCount=a.iData.byteLength/2,t=new Float32Array(i*this._capacity*this._vertCount/4),e=new Uint16Array(this._capacity*this._indexCount);var l=this._vertFormat.element(n.default.ATTR_TEX_COORD3),c=this._vertFormat.element(n.default.ATTR_NORMAL),h=this._vertFormat.element(n.default.ATTR_TEX_COORD),u=this._vertFormat.element(n.default.ATTR_COLOR1);if(this._mesh.copyAttribute(0,n.default.ATTR_POSITION,t.buffer,i,l.offset),this._mesh.copyAttribute(0,n.default.ATTR_NORMAL,t.buffer,i,c.offset),this._mesh.copyAttribute(0,n.default.ATTR_UV0,t.buffer,i,h.offset),!this._mesh.copyAttribute(0,n.default.ATTR_COLOR,t.buffer,i,u.offset))for(var _=new Uint32Array(t.buffer),f=0;f=this._particleSystem.capacity?null:this._particles.add()},s._setNewParticle=function(){},s._updateParticles=function(t){switch(this._particleSystem.node.getWorldMatrix(y),this._particleSystem.scaleSpace){case c.Space.Local:this._particleSystem.node.getScale(this._node_scale);break;case c.Space.World:this._particleSystem.node.getWorldScale(this._node_scale)}(this._particleSystem.materials[0]?this._particleSystem.particleMaterial:this._defaultMat).setProperty("scale",this._node_scale),this._particleSystem.velocityOvertimeModule.enable&&this._particleSystem.velocityOvertimeModule.update(this._particleSystem._simulationSpace,y),this._particleSystem.forceOvertimeModule.enable&&this._particleSystem.forceOvertimeModule.update(this._particleSystem._simulationSpace,y),this._particleSystem.trailModule.enable&&this._particleSystem.trailModule.update();for(var e=0;e=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}function L(t,e){if(t){if("string"==typeof t)return F(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?F(t,e):void 0}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=this.trailElements.length&&(t%=this.trailElements.length),this.trailElements[t])},e.addElement=function(){if(0===this.trailElements.length)return null;if(-1===this.start)return this.start=0,this.end=1,this.trailElements[0];this.start===this.end&&(this.trailElements.splice(this.end,0,{position:cc.v3(),lifetime:0,width:0,velocity:cc.v3(),direction:0,color:cc.color()}),this.start++,this.start%=this.trailElements.length);var t=this.end++;return this.end%=this.trailElements.length,this.trailElements[t]},e.iterateElement=function(t,e,i,n){for(var r=this.start>=this.end?this.end+this.trailElements.length:this.end,s=this.start;s2){var a=i.getElement(i.end-2),o=i.getElement(i.end-3);w.Vec3.subtract(H,o.position,a.position),w.Vec3.subtract(W,n.position,a.position),w.Vec3.subtract(a.velocity,W,H),w.Vec3.equals(cc.Vec3.ZERO,a.velocity)&&w.Vec3.copy(a.velocity,H)}this.colorFromParticle?n.color.set(t.color):n.color.set(this.colorOvertime.evaluate(0,1))}}},n._updateTrailElement=function(t,e,i,n){return e.lifetime+=n,t.colorFromParticle?(e.color.set(i.color),e.color.multiply(t.colorOvertime.evaluate(1-i.remainingLifetime/i.startLifetime,1))):e.color.set(t.colorOvertime.evaluate(1-i.remainingLifetime/i.startLifetime,1)),t.widthFromParticle?e.width=i.size.x*t.widthRatio.evaluate(e.lifetime/t._trailLifetime,1):e.width=t.widthRatio.evaluate(e.lifetime/t._trailLifetime,1),e.lifetime>t._trailLifetime},n.removeParticle=function(t){var e=this._particleTrail.get(t);e&&this._trailSegments&&(e.clear(),this._trailSegments.free(e),this._particleTrail.delete(t))},n.updateTrailBuffer=function(){this.vbOffset=0,this.ibOffset=0;for(var t,e=O(this._particleTrail.keys());!(t=e()).done;){var i=t.value,n=this._particleTrail.get(i);if(-1!==n.start){var r=4*this.vbOffset/this._vertSize,s=n.start>=n.end?n.end+n.trailElements.length:n.end,a=s-n.start,o=1/a,l=n.trailElements[n.start];this._fillVertexBuffer(l,this.colorOverTrail.evaluate(1,1),r,1,0,4);for(var c=n.start+1;c2){var f=n.getElement(n.end-1),d=n.getElement(n.end-2);w.Vec3.subtract(H,d.position,f.position),w.Vec3.subtract(W,G.position,f.position),w.Vec3.normalize(H,H),w.Vec3.normalize(W,W),w.Vec3.subtract(f.velocity,W,H),w.Vec3.normalize(f.velocity,f.velocity),this._checkDirectionReverse(f,d),this.vbOffset-=this._vertSize/4*2,this.ibOffset-=6,this._fillVertexBuffer(f,this.colorOverTrail.evaluate(o,1),r,o,a-1,5),w.Vec3.subtract(G.velocity,G.position,f.position),w.Vec3.normalize(G.velocity,G.velocity),this._checkDirectionReverse(G,f)}this.widthFromParticle?G.width=i.size.x*this.widthRatio.evaluate(0,1):G.width=this.widthRatio.evaluate(0,1),G.color=i.color,w.Vec3.equals(G.velocity,cc.Vec3.ZERO)?this.ibOffset-=3:this._fillVertexBuffer(G,this.colorOverTrail.evaluate(0,1),r,0,a,1)}}this._updateIA(this.ibOffset)},n._fillVertexBuffer=function(t,e,i,n,r,s){this._vbF32[this.vbOffset++]=t.position.x,this._vbF32[this.vbOffset++]=t.position.y,this._vbF32[this.vbOffset++]=t.position.z,this._vbF32[this.vbOffset++]=0,this._vbF32[this.vbOffset++]=t.width,this._vbF32[this.vbOffset++]=n,this._vbF32[this.vbOffset++]=0,this._vbF32[this.vbOffset++]=t.velocity.x,this._vbF32[this.vbOffset++]=t.velocity.y,this._vbF32[this.vbOffset++]=t.velocity.z,X.set(t.color),X.multiply(e),this._vbUint32[this.vbOffset++]=X._val,this._vbF32[this.vbOffset++]=t.position.x,this._vbF32[this.vbOffset++]=t.position.y,this._vbF32[this.vbOffset++]=t.position.z,this._vbF32[this.vbOffset++]=1,this._vbF32[this.vbOffset++]=t.width,this._vbF32[this.vbOffset++]=n,this._vbF32[this.vbOffset++]=1,this._vbF32[this.vbOffset++]=t.velocity.x,this._vbF32[this.vbOffset++]=t.velocity.y,this._vbF32[this.vbOffset++]=t.velocity.z,this._vbUint32[this.vbOffset++]=X._val,1&s&&(this._iBuffer[this.ibOffset++]=i+2*r,this._iBuffer[this.ibOffset++]=i+2*r-1,this._iBuffer[this.ibOffset++]=i+2*r+1),4&s&&(this._iBuffer[this.ibOffset++]=i+2*r,this._iBuffer[this.ibOffset++]=i+2*r+1,this._iBuffer[this.ibOffset++]=i+2*r+2)},n._updateIA=function(t){this._particleSystem&&this._particleSystem._assembler&&this._particleSystem._assembler.updateIA(1,t,!0,!0)},n._checkDirectionReverse=function(t,e){w.Vec3.dot(t.velocity,e.velocity)0&&f++,e>0&&f++);var d=(c+1)*(h+1);u&&(d+=(c+1)*f+c*f);var p=c*h*6;u&&(p+=c*f*3);var m=new Array(p),y=new Array(3*d),v=new Array(3*d),g=new Array(2*d),b=Math.max(t,e),A=new n.default(-b,-l,-b),x=new n.default(b,l,b),C=Math.sqrt(b*b+l*l),T=0,S=0;return (function(){for(var r=[],s=t-e,u=s*s/i*Math.sign(s),f=0;f<=h;f++){for(var d=[],p=f/h,b=p*s+e,A=0;A<=c;++A){var x=A/c,C=x*_,w=Math.sin(C),E=Math.cos(C);y[3*T]=b*w,y[3*T+1]=p*i-l,y[3*T+2]=b*E,n.default.normalize(a,n.default.set(o,w,-u,E)),v[3*T]=a.x,v[3*T+1]=a.y,v[3*T+2]=a.z,g[2*T]=2*(1-x)%1,g[2*T+1]=p,d.push(T),++T}r.push(d)}for(var M=0;M0&&w(!1),t>0&&w(!0)),new r.default(y,v,g,m,A,x,C);function w(i){var n,r,s=i?t:e,a=i?1:-1;n=T;for(var o=1;o<=c;++o)y[3*T]=0,y[3*T+1]=l*a,y[3*T+2]=0,v[3*T]=0,v[3*T+1]=a,v[3*T+2]=0,g[2*T]=.5,g[2*T+1]=.5,++T;r=T;for(var h=0;h<=c;++h){var u=h/c*_,f=Math.cos(u),d=Math.sin(u);y[3*T]=s*d,y[3*T+1]=l*a,y[3*T+2]=s*f,v[3*T]=0,v[3*T+1]=a,v[3*T+2]=0,g[2*T]=.5-.5*d*a,g[2*T+1]=.5+.5*f,++T}for(var p=0;p=l.length)?0:t||0;for(var n=i.sizeX||e,o=i.sizeY||e,c=i.sizeZ||e,h=l[t],u=h.face.length,_=[],f=[],d=[],p=[],m=new a.Vec3(1/0,1/0,1/0),y=new a.Vec3(-1/0,-1/0,-1/0),v=0;vo?o<<16|a:a<<16|o;void 0===n[l]&&(n[l]=0,i.push(a,o))}return i},i.invWinding=function(t){for(var e=[],i=0;io){var y=d[p-1],v=(o-y.frame)/(m.frame-y.frame);y.value.lerp(m.value,v,i[f]);break}}c=cc.mat4(),n.default.fromRTS(c,i.quat,i.position,i.scale),l&&n.default.mul(c,l,c),_._jointMatrix||(_._jointMatrix=[]),i.uniqueBindPose&&(u=cc.mat4(),n.default.mul(u,c,i.uniqueBindPose)),r[i.path]||(r[i.path]=[]),u?r[i.path].push(a(u)):r[i.path].push(c)}var g=i.children;for(var b in g)s(g[b],o,c)}for(var o=0,l=this.duration,c=1/this.sample;o256?64:t>64?32:t>16?16:8,this._jointsData=this._jointsFloat32Data=new Float32Array(i*i*4);var r=cc.Texture2D.PixelFormat.RGBA32F,s=i,a=i;n||(this._jointsData=new Uint8Array(this._jointsFloat32Data.buffer),r=cc.Texture2D.PixelFormat.RGBA8888,s*=4,this._usingRGBA8Texture=!0,cc.warn("SkinnedMeshRenderer ["+this.node.name+"] has too many joints ["+t+"] and device do not support float32 texture, fallback to use RGBA8888 texture, which is much slower."));var o=this._jointsTexture||new cc.Texture2D,l=cc.Texture2D.Filter.NEAREST;o.setFilters(l,l),o.initWithData(this._jointsData,r,s,a),this._jointsTexture=o,this._jointsTextureOptions={format:r,width:o.width,height:o.height,images:[]}}this._updateMaterial()}},_updateMaterial:function(){s.prototype._updateMaterial.call(this);for(var t=this.getMaterials(),e=0;eh.ERROR){var e=function(t){if(cc.game.canvas){if(!i){var e=document.createElement("Div");e.setAttribute("id","logInfoDiv"),e.setAttribute("width","200"),e.setAttribute("height",cc.game.canvas.height);var n=e.style;n.zIndex="99999",n.position="absolute",n.top=n.left="0",(i=document.createElement("textarea")).setAttribute("rows","20"),i.setAttribute("cols","30"),i.setAttribute("disabled","true");var r=i.style;r.backgroundColor="transparent",r.borderBottom="1px solid #cccccc",r.borderTopWidth=r.borderLeftWidth=r.borderRightWidth="0px",r.borderTopStyle=r.borderLeftStyle=r.borderRightStyle="none",r.padding="0px",r.margin=0,e.appendChild(i),cc.game.canvas.parentNode.appendChild(e)}i.value=i.value+t+"\r\n",i.scrollTop=i.scrollHeight}};cc.error=function(){e("ERROR : "+cc.js.formatStr.apply(null,arguments))},cc.assert=function(t,i){!t&&i&&(i=cc.js.formatStr.apply(null,cc.js.shiftArguments.apply(null,arguments)),e("ASSERT: "+i))},t!==h.ERROR_FOR_WEB_PAGE&&(cc.warn=function(){e("WARN : "+cc.js.formatStr.apply(null,arguments))}),t===h.INFO_FOR_WEB_PAGE&&(cc.log=function(){e(cc.js.formatStr.apply(null,arguments))})}else console&&console.log.apply&&(console.error||(console.error=console.log),console.warn||(console.warn=console.log),console.error.bind?cc.error=console.error.bind(console):cc.error=function(){return console.error.apply(console,arguments)},cc.assert=function(t,e){if(!t)throw e&&(e=cc.js.formatStr.apply(null,cc.js.shiftArguments.apply(null,arguments))),new Error(e)});t!==h.ERROR&&(console.warn.bind?cc.warn=console.warn.bind(console):cc.warn=function(){return console.warn.apply(console,arguments)}),t===h.INFO&&(console.log.bind?cc.log=console.log.bind(console):cc.log=function(){return console.log.apply(console,arguments)})}},getError:s("ERROR"),isDisplayStats:function(){return!!cc.profiler&&cc.profiler.isShowingStats()},setDisplayStats:function(t){cc.profiler&&cc.game.renderType!==cc.game.RENDER_TYPE_CANVAS&&(t?cc.profiler.showStats():cc.profiler.hideStats(),cc.game.config.showFPS=!!t)}}}),{"../../DebugInfos":void 0,"./platform/utils":262}],70:[(function(t,e){"use strict";var i=t("./event/event-target"),n=t("./component-scheduler"),r=t("./node-activator"),s=t("./platform/CCObject"),a=t("./CCGame"),o=t("./renderer"),l=t("./event-manager"),c=t("./CCScheduler");cc.Director=function(){i.call(this),this._paused=!1,this._purgeDirectorInNextLoop=!1,this._winSizeInPoints=null,this._scene=null,this._loadingScene="",this._totalFrames=0,this._lastUpdate=0,this._deltaTime=0,this._startTime=0,this._maxParticleDeltaTime=0,this._scheduler=null,this._compScheduler=null,this._nodeActivator=null,this._actionManager=null;var t=this;a.on(a.EVENT_SHOW,(function(){t._lastUpdate=performance.now()})),a.once(a.EVENT_ENGINE_INITED,this.init,this)},cc.Director.prototype={constructor:cc.Director,init:function(){return this._totalFrames=0,this._lastUpdate=performance.now(),this._startTime=this._lastUpdate,this._paused=!1,this._purgeDirectorInNextLoop=!1,this._winSizeInPoints=cc.size(0,0),this._scheduler=new c,cc.ActionManager?(this._actionManager=new cc.ActionManager,this._scheduler.scheduleUpdate(this._actionManager,c.PRIORITY_SYSTEM,!1)):this._actionManager=null,this.sharedInit(),!0},sharedInit:function(){this._compScheduler=new n,this._nodeActivator=new r,l&&l.setEnabled(!0),cc.AnimationManager?(this._animationManager=new cc.AnimationManager,this._scheduler.scheduleUpdate(this._animationManager,c.PRIORITY_SYSTEM,!1)):this._animationManager=null,cc.CollisionManager?(this._collisionManager=new cc.CollisionManager,this._scheduler.scheduleUpdate(this._collisionManager,c.PRIORITY_SYSTEM,!1)):this._collisionManager=null,cc.PhysicsManager?(this._physicsManager=new cc.PhysicsManager,this._scheduler.scheduleUpdate(this._physicsManager,c.PRIORITY_SYSTEM,!1)):this._physicsManager=null,cc.Physics3DManager?(this._physics3DManager=new cc.Physics3DManager,this._scheduler.scheduleUpdate(this._physics3DManager,c.PRIORITY_SYSTEM,!1)):this._physics3DManager=null,cc._widgetManager&&cc._widgetManager.init(this)},calculateDeltaTime:function(t){t||(t=performance.now()),this._deltaTime=t>this._lastUpdate?(t-this._lastUpdate)/1e3:0,this._lastUpdate=t},convertToGL:function(t){var e=a.container,i=cc.view,n=e.getBoundingClientRect(),r=n.left+window.pageXOffset-e.clientLeft,s=n.top+window.pageYOffset-e.clientTop,o=i._devicePixelRatio*(t.x-r),l=i._devicePixelRatio*(s+n.height-t.y);return i._isRotated?cc.v2(i._viewportRect.width-l,o):cc.v2(o,l)},convertToUI:function(t){var e=a.container,i=cc.view,n=e.getBoundingClientRect(),r=n.left+window.pageXOffset-e.clientLeft,s=n.top+window.pageYOffset-e.clientTop,o=cc.v2(0,0);return i._isRotated?(o.x=r+t.y/i._devicePixelRatio,o.y=s+n.height-(i._viewportRect.width-t.x)/i._devicePixelRatio):(o.x=r+t.x*i._devicePixelRatio,o.y=s+n.height-t.y*i._devicePixelRatio),o},end:function(){this._purgeDirectorInNextLoop=!0},getWinSize:function(){return cc.size(cc.winSize)},getWinSizeInPixels:function(){return cc.size(cc.winSize)},pause:function(){this._paused||(this._paused=!0)},purgeCachedData:function(){cc.assetManager.releaseAll()},purgeDirector:function(){this._scheduler.unscheduleAll(),this._compScheduler.unscheduleAll(),this._nodeActivator.reset(),l&&l.setEnabled(!1),cc.isValid(this._scene)&&this._scene.destroy(),this._scene=null,cc.renderer.clear(),cc.assetManager.builtins.clear(),cc.game.pause(),cc.assetManager.releaseAll()},reset:function(){this.purgeDirector(),l&&l.setEnabled(!0),this._actionManager&&this._scheduler.scheduleUpdate(this._actionManager,cc.Scheduler.PRIORITY_SYSTEM,!1),this._animationManager&&this._scheduler.scheduleUpdate(this._animationManager,cc.Scheduler.PRIORITY_SYSTEM,!1),this._collisionManager&&this._scheduler.scheduleUpdate(this._collisionManager,cc.Scheduler.PRIORITY_SYSTEM,!1),this._physicsManager&&this._scheduler.scheduleUpdate(this._physicsManager,cc.Scheduler.PRIORITY_SYSTEM,!1),cc.game.resume()},runSceneImmediate:function(t,e,i){cc.assertID(t instanceof cc.Scene||t instanceof cc.SceneAsset,1216),t instanceof cc.SceneAsset&&(t=t.scene),t._load();for(var n=Object.keys(a._persistRootNodes).map((function(t){return a._persistRootNodes[t]})),r=0;r2||e<0)&&(t.renderMode=0),"boolean"!=typeof t.registerSystemEvent&&(t.registerSystemEvent=!0),t.showFPS=1!==e&&!!t.showFPS,this.collisionMatrix=t.collisionMatrix||[],this.groupList=t.groupList||[],n._resetDebugSetting(t.debugMode),this.config=t,this._configLoaded=!0},_determineRenderType:function(){var t=this.config,e=parseInt(t.renderMode)||0;this.renderType=this.RENDER_TYPE_CANVAS;var i=!1;if(0===e?cc.sys.capabilities.opengl?(this.renderType=this.RENDER_TYPE_WEBGL,i=!0):cc.sys.capabilities.canvas&&(this.renderType=this.RENDER_TYPE_CANVAS,i=!0):1===e&&cc.sys.capabilities.canvas?(this.renderType=this.RENDER_TYPE_CANVAS,i=!0):2===e&&cc.sys.capabilities.opengl&&(this.renderType=this.RENDER_TYPE_WEBGL,i=!0),!i)throw new Error(n.getError(3820,e))},_initRenderer:function(){if(!this._rendererInitialized){var t,e,i,n,a=this.config.id,o=a instanceof HTMLElement?a:document.querySelector(a)||document.querySelector("#"+a);if("CANVAS"===o.tagName?(t=o.width,e=o.height,this.canvas=i=o,this.container=n=document.createElement("DIV"),i.parentNode&&i.parentNode.insertBefore(n,i)):("DIV"!==o.tagName&&cc.warnID(3819),t=o.clientWidth,e=o.clientHeight,this.canvas=i=document.createElement("CANVAS"),this.container=n=document.createElement("DIV"),o.appendChild(n)),n.setAttribute("id","Cocos2dGameContainer"),n.appendChild(i),this.frame=n.parentNode===document.body?document.documentElement:n.parentNode,(function(t){(" "+t.className+" ").indexOf(" gameCanvas ")>-1||(t.className&&(t.className+=" "),t.className+="gameCanvas")})(i),i.setAttribute("width",t||480),i.setAttribute("height",e||320),i.setAttribute("tabindex",99),this._determineRenderType(),this.renderType===this.RENDER_TYPE_WEBGL){var l={stencil:!0,antialias:cc.macro.ENABLE_WEBGL_ANTIALIAS,alpha:cc.macro.ENABLE_TRANSPARENT_CANVAS};r.initWebGL(i,l),this._renderContext=r.device._gl,!cc.macro.CLEANUP_IMAGE_CACHE&&s&&(s.enabled=!0)}this._renderContext||(this.renderType=this.RENDER_TYPE_CANVAS,r.initCanvas(i),this._renderContext=r.device._ctx),this.canvas.oncontextmenu=function(){if(!cc._isContextMenuEnable)return!1},this._rendererInitialized=!0}},_initEvents:function(){var t,e=window;this.config.registerSystemEvent&&cc.internal.inputManager.registerSystemEvent(this.canvas),void 0!==document.hidden?t="hidden":void 0!==document.mozHidden?t="mozHidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden");var i=!1;function n(){i||(i=!0,a.emit(a.EVENT_HIDE))}function r(t,e,n,r,s){i&&(i=!1,a.emit(a.EVENT_SHOW,t,e,n,r,s))}if(t)for(var s=["visibilitychange","mozvisibilitychange","msvisibilitychange","webkitvisibilitychange","qbrowserVisibilityChange"],o=0;o-1&&(e.onfocus=r),"onpageshow"in window&&"onpagehide"in window&&(e.addEventListener("pagehide",n),e.addEventListener("pageshow",r),document.addEventListener("pagehide",n),document.addEventListener("pageshow",r)),this.on(a.EVENT_HIDE,(function(){a.pause()})),this.on(a.EVENT_SHOW,(function(){a.resume()}))}};i.call(a),cc.js.addon(a,i.prototype),cc.game=e.exports=a}),{"../audio/CCAudioEngine":21,"../core/renderer/utils/dynamic-atlas/manager":273,"./CCDebug":69,"./event/event-target":185,"./renderer/index.js":270}],72:[(function(t,e){"use strict";var i=t("./value-types"),n=t("./utils/base-node"),r=t("./utils/prefab-helper"),s=t("./utils/trans-pool").NodeMemPool,a=t("./utils/affine-transform"),o=t("./event-manager"),l=t("./platform/CCMacro"),c=t("./platform/js"),h=(t("./event/event"),t("./event/event-target")),u=t("./renderer/render-flow"),_=cc.Object.Flags.Destroying,f=Math.PI/180,d=!!cc.ActionManager,p=function(){},m=new i.Vec3,y=new i.Quat,v=new i.Vec3,g=new i.Vec3,b=new i.Quat,A=new i.Quat,x=new i.Vec3,C=new i.Vec3,T=new i.Vec3,S=new i.Vec3,w=new i.Vec3,E=new i.Quat,M=new i.Quat,D=new i.Vec3,B=new i.Quat,I=new i.Vec3,P=new i.Quat,R=new i.Vec3,O=new i.Vec3,L=new i.Quat,F=new i.Quat,V=(new i.Quat,cc.mat4()),N=new i.Vec3,k=new Array(16);k.length=0;var z=cc.Enum({DEBUG:31}),G=cc.Enum({POSITION:1,SCALE:2,ROTATION:4,SKEW:8,TRS:7,RS:6,TRSS:15,PHYSICS_POSITION:16,PHYSICS_SCALE:32,PHYSICS_ROTATION:64,PHYSICS_TRS:112,PHYSICS_RS:96,ALL_POSITION:17,ALL_SCALE:34,ALL_ROTATION:68,ALL_TRS:119,ALL:65535}),U=cc.Enum({TOUCH_START:"touchstart",TOUCH_MOVE:"touchmove",TOUCH_END:"touchend",TOUCH_CANCEL:"touchcancel",MOUSE_DOWN:"mousedown",MOUSE_MOVE:"mousemove",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_UP:"mouseup",MOUSE_WHEEL:"mousewheel",POSITION_CHANGED:"position-changed",ROTATION_CHANGED:"rotation-changed",SCALE_CHANGED:"scale-changed",SIZE_CHANGED:"size-changed",ANCHOR_CHANGED:"anchor-changed",COLOR_CHANGED:"color-changed",CHILD_ADDED:"child-added",CHILD_REMOVED:"child-removed",CHILD_REORDER:"child-reorder",GROUP_CHANGED:"group-changed",SIBLING_ORDER_CHANGED:"sibling-order-changed"}),j=[U.TOUCH_START,U.TOUCH_MOVE,U.TOUCH_END,U.TOUCH_CANCEL],H=[U.MOUSE_DOWN,U.MOUSE_ENTER,U.MOUSE_MOVE,U.MOUSE_LEAVE,U.MOUSE_UP,U.MOUSE_WHEEL],W=!0,X=function(t){if(0!==t){W&&cc.warn("`cc.Node.skewX/Y` is deprecated since v2.2.1, please use 3D node instead.",""),W=!1}},Y=null,q=function(t,e){var i=t.getLocation(),n=this.owner;return!!n._hitTest(i,this)&&(e.type=U.TOUCH_START,e.touch=t,e.bubbles=!0,n.dispatchEvent(e),!0)},J=function(t,e){var i=this.owner;e.type=U.TOUCH_MOVE,e.touch=t,e.bubbles=!0,i.dispatchEvent(e)},Z=function(t,e){var i=t.getLocation(),n=this.owner;n._hitTest(i,this)?e.type=U.TOUCH_END:e.type=U.TOUCH_CANCEL,e.touch=t,e.bubbles=!0,n.dispatchEvent(e)},K=function(t,e){t.getLocation();var i=this.owner;e.type=U.TOUCH_CANCEL,e.touch=t,e.bubbles=!0,i.dispatchEvent(e)},Q=function(t){var e=t.getLocation(),i=this.owner;i._hitTest(e,this)&&(t.type=U.MOUSE_DOWN,t.bubbles=!0,i.dispatchEvent(t))},$=function(t){var e=t.getLocation(),i=this.owner;if(i._hitTest(e,this))this._previousIn||(Y&&Y._mouseListener&&(t.type=U.MOUSE_LEAVE,Y.dispatchEvent(t),Y._mouseListener._previousIn=!1),Y=this.owner,t.type=U.MOUSE_ENTER,i.dispatchEvent(t),this._previousIn=!0),t.type=U.MOUSE_MOVE,t.bubbles=!0,i.dispatchEvent(t);else{if(!this._previousIn)return;t.type=U.MOUSE_LEAVE,i.dispatchEvent(t),this._previousIn=!1,Y=null}t.stopPropagation()},tt=function(t){var e=t.getLocation(),i=this.owner;i._hitTest(e,this)&&(t.type=U.MOUSE_UP,t.bubbles=!0,i.dispatchEvent(t),t.stopPropagation())},et=function(t){var e=t.getLocation(),i=this.owner;i._hitTest(e,this)&&(t.type=U.MOUSE_WHEEL,t.bubbles=!0,i.dispatchEvent(t),t.stopPropagation())};function it(t,e){if(e){for(var i=0,n=null,r=t;r&&cc.Node.isNode(r);r=r._parent,++i)if(r.getComponent(e)){var s={index:i,node:r};n?n.push(s):n=[s]}return n}return null}function nt(t,e){if(!(t._objFlags&_)){if(t._bubblingListeners)for(var i=0,n=e.length;i=0;--n)if((i=k[n])._capturingListeners&&(e.currentTarget=i,i._capturingListeners.emit(e.type,e,k),e._propagationStopped))return void(k.length=0);if(k.length=0,e.eventPhase=2,e.currentTarget=t,t._capturingListeners&&t._capturingListeners.emit(e.type,e),!e._propagationImmediateStopped&&t._bubblingListeners&&t._bubblingListeners.emit(e.type,e),!e._propagationStopped&&e.bubbles)for(t._getBubblingTargets(e.type,k),e.eventPhase=3,n=0;n>16},set:function(t){t>l.MAX_ZINDEX?(cc.warnID(1636),t=l.MAX_ZINDEX):t0&&(this._renderFlag|=u.FLAG_CHILDREN)},_checkListenerMask:function(){if(this._touchListener){var t=this._touchListener.mask=it(this,cc.Mask);this._mouseListener&&(this._mouseListener.mask=t)}else this._mouseListener&&(this._mouseListener.mask=it(this,cc.Mask))},_checknSetupSysEvent:function(t){var e=!1,i=!1;return-1!==j.indexOf(t)?(this._touchListener||(this._touchListener=cc.EventListener.create({event:cc.EventListener.TOUCH_ONE_BY_ONE,swallowTouches:!0,owner:this,mask:it(this,cc.Mask),onTouchBegan:q,onTouchMoved:J,onTouchEnded:Z,onTouchCancelled:K}),o.addListener(this._touchListener,this),e=!0),i=!0):-1!==H.indexOf(t)&&(this._mouseListener||(this._mouseListener=cc.EventListener.create({event:cc.EventListener.MOUSE,_previousIn:!1,owner:this,mask:it(this,cc.Mask),onMouseDown:Q,onMouseMove:$,onMouseUp:tt,onMouseScroll:et}),o.addListener(this._mouseListener,this),e=!0),i=!0),e&&!this._activeInHierarchy&&cc.director.getScheduler().schedule((function(){this._activeInHierarchy||o.pauseTarget(this)}),this,0,0,0,!1),i},on:function(t,e,i,n){if(this._checknSetupSysEvent(t))return this._onDispatch(t,e,i,n);switch(t){case U.POSITION_CHANGED:this._eventMask|=1;break;case U.SCALE_CHANGED:this._eventMask|=2;break;case U.ROTATION_CHANGED:this._eventMask|=4;break;case U.SIZE_CHANGED:this._eventMask|=8;break;case U.ANCHOR_CHANGED:this._eventMask|=16;break;case U.COLOR_CHANGED:this._eventMask|=32}return this._bubblingListeners||(this._bubblingListeners=new h),this._bubblingListeners.on(t,e,i)},once:function(t,e,i,n){var r=this,s=null;(s=this._checknSetupSysEvent(t)&&n?this._capturingListeners=this._capturingListeners||new h:this._bubblingListeners=this._bubblingListeners||new h).once(t,e,i),s.once(t,(function(){r.off(t,e,i)}),void 0)},_onDispatch:function(t,e,i,n){if("boolean"==typeof i?(n=i,i=void 0):n=!!n,e){var r=null;return(r=n?this._capturingListeners=this._capturingListeners||new h:this._bubblingListeners=this._bubblingListeners||new h).hasEventListener(t,e,i)||(r.on(t,e,i),i&&i.__eventTargets&&i.__eventTargets.push(this)),e}cc.errorID(6800)},off:function(t,e,i,n){var r=-1!==j.indexOf(t),s=!r&&-1!==H.indexOf(t);if(r||s)this._offDispatch(t,e,i,n),r?this._touchListener&&!nt(this,j)&&(o.removeListener(this._touchListener),this._touchListener=null):s&&this._mouseListener&&!nt(this,H)&&(o.removeListener(this._mouseListener),this._mouseListener=null);else if(this._bubblingListeners&&(this._bubblingListeners.off(t,e,i),!this._bubblingListeners.hasEventListener(t)))switch(t){case U.POSITION_CHANGED:this._eventMask&=-2;break;case U.SCALE_CHANGED:this._eventMask&=-3;break;case U.ROTATION_CHANGED:this._eventMask&=-5;break;case U.SIZE_CHANGED:this._eventMask&=-9;break;case U.ANCHOR_CHANGED:this._eventMask&=-17;break;case U.COLOR_CHANGED:this._eventMask&=-33}},_offDispatch:function(t,e,i,n){if("boolean"==typeof i?(n=i,i=void 0):n=!!n,e){var r=n?this._capturingListeners:this._bubblingListeners;r&&(r.off(t,e,i),i&&i.__eventTargets&&c.array.fastRemove(i.__eventTargets,this))}else this._capturingListeners&&this._capturingListeners.removeAll(t),this._bubblingListeners&&this._bubblingListeners.removeAll(t)},targetOff:function(t){var e=this._bubblingListeners;e&&(e.targetOff(t),1&this._eventMask&&!e.hasEventListener(U.POSITION_CHANGED)&&(this._eventMask&=-2),2&this._eventMask&&!e.hasEventListener(U.SCALE_CHANGED)&&(this._eventMask&=-3),4&this._eventMask&&!e.hasEventListener(U.ROTATION_CHANGED)&&(this._eventMask&=-5),8&this._eventMask&&!e.hasEventListener(U.SIZE_CHANGED)&&(this._eventMask&=-9),16&this._eventMask&&!e.hasEventListener(U.ANCHOR_CHANGED)&&(this._eventMask&=-17),32&this._eventMask&&!e.hasEventListener(U.COLOR_CHANGED)&&(this._eventMask&=-33)),this._capturingListeners&&this._capturingListeners.targetOff(t),t&&t.__eventTargets&&c.array.fastRemove(t.__eventTargets,this),this._touchListener&&!nt(this,j)&&(o.removeListener(this._touchListener),this._touchListener=null),this._mouseListener&&!nt(this,H)&&(o.removeListener(this._mouseListener),this._mouseListener=null)},hasEventListener:function(t){var e=!1;return this._bubblingListeners&&(e=this._bubblingListeners.hasEventListener(t)),!e&&this._capturingListeners&&(e=this._capturingListeners.hasEventListener(t)),e},emit:function(t,e,i,n,r,s){this._bubblingListeners&&this._bubblingListeners.emit(t,e,i,n,r,s)},dispatchEvent:function(t){rt(this,t),k.length=0},pauseSystemEvents:function(t){o.pauseTarget(this,t)},resumeSystemEvents:function(t){o.resumeTarget(this,t)},_hitTest:function(t,e){var n=this._contentSize.width,r=this._contentSize.height,s=R,a=O,o=cc.Camera.findCamera(this);if(o?o.getScreenToWorldPoint(t,s):s.set(t),this._updateWorldMatrix(),!i.Mat4.invert(V,this._worldMatrix))return!1;i.Vec2.transformMat4(a,s,V),a.x+=this._anchorPoint.x*n,a.y+=this._anchorPoint.y*r;var l=!1;if(a.x>=0&&a.y>=0&&a.x<=n&&a.y<=r&&(l=!0,e&&e.mask))for(var c=e.mask,h=this,u=c?c.length:0,_=0,f=0;h&&fd.index){c.length=f;break}}return l},_getCapturingTargets:function(t,e){for(var i=this.parent;i;)i._capturingListeners&&i._capturingListeners.hasEventListener(t)&&e.push(i),i=i.parent},_getBubblingTargets:function(t,e){for(var i=this.parent;i;)i._bubblingListeners&&i._bubblingListeners.hasEventListener(t)&&e.push(i),i=i.parent},runAction:d?function(t){if(this.active){cc.assertID(t,1618);var e=cc.director.getActionManager();return e._suppressDeprecation||(e._suppressDeprecation=!0,cc.warnID(1639)),e.addAction(t,this,!1),t}}:p,pauseAllActions:d?function(){cc.director.getActionManager().pauseTarget(this)}:p,resumeAllActions:d?function(){cc.director.getActionManager().resumeTarget(this)}:p,stopAllActions:d?function(){cc.director.getActionManager().removeAllActionsFromTarget(this)}:p,stopAction:d?function(t){cc.director.getActionManager().removeAction(t)}:p,stopActionByTag:d?function(t){t!==cc.Action.TAG_INVALID?cc.director.getActionManager().removeActionByTag(t,this):cc.logID(1612)}:p,getActionByTag:d?function(t){return t===cc.Action.TAG_INVALID?(cc.logID(1613),null):cc.director.getActionManager().getActionByTag(t,this)}:function(){return null},getNumberOfRunningActions:d?function(){return cc.director.getActionManager().getNumberOfRunningActionsInTarget(this)}:function(){return 0},getPosition:function(t){return t=t||new i.Vec3,i.Trs.toPosition(t,this._trs)},setPosition:function(t,e,i){var n;void 0===e?(n=t.x,e=t.y,i=t.z):n=t;var r=this._trs;void 0===i&&(i=r[2]),(r[0]!==n||r[1]!==e||r[2]!==i)&&(r[0]=n,r[1]=e,r[2]=i,this.setLocalDirty(G.ALL_POSITION),this._renderFlag|=u.FLAG_WORLD_TRANSFORM,1&this._eventMask&&this.emit(U.POSITION_CHANGED))},getScale:function(t){return void 0!==t?i.Trs.toScale(t,this._trs):(cc.errorID(1400,"cc.Node.getScale","cc.Node.scale or cc.Node.getScale(cc.Vec3)"),this._trs[7])},setScale:function(t,e,i){var n;t&&"number"!=typeof t?(n=t.x,e=t.y,i=t.z):void 0!==t&&void 0===e?(n=t,e=t,i=t):n=t;var r=this._trs;void 0===i&&(i=r[9]),r[7]===n&&r[8]===e&&r[9]===i||(r[7]=n,r[8]=e,r[9]=i,this.setLocalDirty(G.ALL_SCALE),this._renderFlag|=u.FLAG_TRANSFORM,2&this._eventMask&&this.emit(U.SCALE_CHANGED))},getRotation:function(t){return t instanceof i.Quat?i.Trs.toRotation(t,this._trs):-this.angle},setRotation:function(t,e,i,n){if("number"==typeof t&&void 0===e)this.angle=-t;else{var r=t;void 0===e&&(r=t.x,e=t.y,i=t.z,n=t.w);var s=this._trs;s[3]===r&&s[4]===e&&s[5]===i&&s[6]===n||(s[3]=r,s[4]=e,s[5]=i,s[6]=n,this.setLocalDirty(G.ALL_ROTATION),4&this._eventMask&&this.emit(U.ROTATION_CHANGED))}},getContentSize:function(){return cc.size(this._contentSize.width,this._contentSize.height)},setContentSize:function(t,e){var i=this._contentSize;if(void 0===e){if(t.width===i.width&&t.height===i.height)return;i.width=t.width,i.height=t.height}else{if(t===i.width&&e===i.height)return;i.width=t,i.height=e}8&this._eventMask&&this.emit(U.SIZE_CHANGED)},getAnchorPoint:function(){return cc.v2(this._anchorPoint)},setAnchorPoint:function(t,e){var i=this._anchorPoint;if(void 0===e){if(t.x===i.x&&t.y===i.y)return;i.x=t.x,i.y=t.y}else{if(t===i.x&&e===i.y)return;i.x=t,i.y=e}this.setLocalDirty(G.ALL_POSITION),16&this._eventMask&&this.emit(U.ANCHOR_CHANGED)},_invTransformPoint:function(t,e){this._parent?this._parent._invTransformPoint(t,e):i.Vec3.copy(t,e);var n=this._trs;return i.Trs.toPosition(v,n),i.Vec3.sub(t,t,v),i.Trs.toRotation(b,n),i.Quat.conjugate(A,b),i.Vec3.transformQuat(t,t,A),i.Trs.toScale(v,n),i.Vec3.inverseSafe(g,v),i.Vec3.mul(t,t,g),t},getWorldPosition:function(t){i.Trs.toPosition(t,this._trs);for(var e,n=this._parent;n;)e=n._trs,i.Trs.toScale(m,e),i.Vec3.mul(t,t,m),i.Trs.toRotation(y,e),i.Vec3.transformQuat(t,t,y),i.Trs.toPosition(m,e),i.Vec3.add(t,t,m),n=n._parent;return t},setWorldPosition:function(t){var e=this._trs;this._parent?this._parent._invTransformPoint(x,t):i.Vec3.copy(x,t),i.Trs.fromPosition(e,x),this.setLocalDirty(G.ALL_POSITION),1&this._eventMask&&this.emit(U.POSITION_CHANGED)},getWorldRotation:function(t){i.Trs.toRotation(L,this._trs),i.Quat.copy(t,L);for(var e=this._parent;e;)i.Trs.toRotation(L,e._trs),i.Quat.mul(t,L,t),e=e._parent;return t},setWorldRotation:function(t){this._parent?(this._parent.getWorldRotation(F),i.Quat.conjugate(F,F),i.Quat.mul(F,F,t)):i.Quat.copy(F,t),i.Trs.fromRotation(this._trs,F),this.setLocalDirty(G.ALL_ROTATION)},getWorldScale:function(t){i.Trs.toScale(C,this._trs),i.Vec3.copy(t,C);for(var e=this._parent;e;)i.Trs.toScale(C,e._trs),i.Vec3.mul(t,t,C),e=e._parent;return t},setWorldScale:function(t){this._parent?(this._parent.getWorldScale(T),i.Vec3.div(T,t,T)):i.Vec3.copy(T,t),i.Trs.fromScale(this._trs,T),this.setLocalDirty(G.ALL_SCALE)},getWorldRT:function(t){var e=S,n=E,r=this._trs;i.Trs.toPosition(e,r),i.Trs.toRotation(n,r);for(var s=this._parent;s;)r=s._trs,i.Trs.toScale(w,r),i.Vec3.mul(e,e,w),i.Trs.toRotation(M,r),i.Vec3.transformQuat(e,e,M),i.Trs.toPosition(w,r),i.Vec3.add(e,e,w),i.Quat.mul(n,M,n),s=s._parent;return i.Mat4.fromRT(t,n,e),t},lookAt:function(t,e){this.getWorldPosition(D),i.Vec3.sub(D,D,t),i.Vec3.normalize(D,D),i.Quat.fromViewUp(B,D,e),this.setWorldRotation(B)},_updateLocalMatrix:lt,_calculWorldMatrix:function(){this._localMatDirty&G.TRSS&&this._updateLocalMatrix();var t=this._parent;t?this._mulMat(this._worldMatrix,t._worldMatrix,this._matrix):i.Mat4.copy(this._worldMatrix,this._matrix),this._worldMatDirty=!1},_mulMat:ut,_updateWorldMatrix:function(){if(this._parent&&this._parent._updateWorldMatrix(),this._worldMatDirty){this._calculWorldMatrix();for(var t=this._children,e=0,i=t.length;e1){for(var n,r,s=1,a=t.length;s0&&(r=t[l-1])._localZOrder>n._localZOrder;l--)t[l]=r;t[l]=n}this.emit(U.CHILD_REORDER,this)}cc.director.__fastOff(cc.Director.EVENT_AFTER_UPDATE,this.sortAllChildren,this)}},_delaySort:function(){this._reorderChildDirty||(this._reorderChildDirty=!0,cc.director.__fastOn(cc.Director.EVENT_AFTER_UPDATE,this.sortAllChildren,this))},_restoreProperties:!1,onRestore:!1},dt=cc.Class(ft),pt=dt.prototype;c.getset(pt,"position",pt.getPosition,pt.setPosition,!1,!0),cc.Node=e.exports=dt}),{"./event-manager":183,"./event/event":186,"./event/event-target":185,"./platform/CCMacro":243,"./platform/js":259,"./renderer/render-flow":271,"./utils/affine-transform":314,"./utils/base-node":315,"./utils/prefab-helper":326,"./utils/trans-pool":332,"./value-types":338}],73:[(function(t,e){"use strict";var i=t("./CCNode"),n=t("./renderer/render-flow"),r=(cc.Object.Flags.HideInHierarchy,i._LocalDirtyFlag),s=cc.Class({name:"cc.PrivateNode",extends:i,properties:{x:{get:function(){return this._originPos.x},set:function(t){var e=this._originPos;t!==e.x&&(e.x=t,this._posDirty(!0))},override:!0},y:{get:function(){return this._originPos.y},set:function(t){var e=this._originPos;t!==e.y&&(e.y=t,this._posDirty(!0))},override:!0},zIndex:{get:function(){return cc.macro.MIN_ZINDEX},set:function(){},override:!0},showInEditor:{default:!1,editorOnly:!0,override:!0}},ctor:function(){this._localZOrder=cc.macro.MIN_ZINDEX<<16,this._originPos=cc.v2()},_posDirty:function(t){this.setLocalDirty(r.POSITION),this._renderFlag|=n.FLAG_TRANSFORM,!0===t&&1&this._eventMask&&this.emit(i.EventType.POSITION_CHANGED)},_updateLocalMatrix:function(){if(this._localMatDirty){var t=this.parent;t&&(this._trs[0]=this._originPos.x-(t._anchorPoint.x-.5)*t._contentSize.width,this._trs[1]=this._originPos.y-(t._anchorPoint.y-.5)*t._contentSize.height),this._super()}},getPosition:function(){return new cc.Vec2(this._originPos)},setPosition:function(t,e){void 0===e&&(e=(t=t.x).y);var i=this._originPos;i.x===t&&i.y===e||(i.x=t,i.y=e,this._posDirty(!0))},setParent:function(t){var e=this._parent;this._super(t),e!==t&&(e&&e.off(i.EventType.ANCHOR_CHANGED,this._posDirty,this),t&&t.on(i.EventType.ANCHOR_CHANGED,this._posDirty,this))},_updateOrderOfArrival:function(){}}),a=s.prototype;cc.js.getset(a,"parent",a.getParent,a.setParent),cc.js.getset(a,"position",a.getPosition,a.setPosition),cc.PrivateNode=e.exports=s}),{"./CCNode":72,"./renderer/render-flow":271}],74:[(function(t,e){"use strict";cc.Scene=cc.Class({name:"cc.Scene",extends:t("./CCNode"),properties:{_is3DNode:{default:!0,override:!0},autoReleaseAssets:!1},ctor:function(){this._anchorPoint.x=0,this._anchorPoint.y=0,this._activeInHierarchy=!1,this._inited=!cc.game._isCloning,this.dependAssets=null},destroy:function(){if(cc.Object.prototype.destroy.call(this))for(var t=this._children,e=0;e0,this._repeat=r,this._runForever=this._repeat===cc.macro.REPEAT_FOREVER,!0},u.getInterval=function(){return this._interval},u.setInterval=function(t){this._interval=t},u.update=function(t){-1===this._elapsed?(this._elapsed=0,this._timesExecuted=0):(this._elapsed+=t,this._runForever&&!this._useDelay?this._elapsed>=this._interval&&(this.trigger(),this._elapsed=0):(this._useDelay?this._elapsed>=this._delay&&(this.trigger(),this._elapsed-=this._delay,this._timesExecuted+=1,this._useDelay=!1):this._elapsed>=this._interval&&(this.trigger(),this._elapsed=0,this._timesExecuted+=1),this._callback&&!this._runForever&&this._timesExecuted>this._repeat&&this.cancel()))},u.getCallback=function(){return this._callback},u.trigger=function(){this._target&&this._callback&&(this._lock=!0,this._callback.call(this._target,this._elapsed),this._lock=!1)},u.cancel=function(){this._scheduler.unschedule(this._callback,this._target)};var _=[];h.get=function(){return _.pop()||new h},h.put=function(t){_.length<20&&!t._lock&&(t._scheduler=t._target=t._callback=null,_.push(t))},cc.Scheduler=function(){this._timeScale=1,this._updatesNegList=[],this._updates0List=[],this._updatesPosList=[],this._hashForUpdates=i.createMap(!0),this._hashForTimers=i.createMap(!0),this._currentTarget=null,this._currentTargetSalvaged=!1,this._updateHashLocked=!1,this._arrayForTimers=[]},cc.Scheduler.prototype={constructor:cc.Scheduler,_removeHashElement:function(t){delete this._hashForTimers[t.target._id];for(var e=this._arrayForTimers,i=0,n=e.length;i=s&&n.timerIndex--,void(0===r.length&&(this._currentTarget===n?this._currentTargetSalvaged=!0:this._removeHashElement(n)))}}},unscheduleUpdate:function(t){if(t){var e=t._id;e||(t.__instanceId?(cc.warnID(1513),e=t._id=t.__instanceId):cc.errorID(1510));var i=this._hashForUpdates[e];i&&(this._updateHashLocked?i.entry.markedForDeletion=!0:this._removeUpdateFromHash(i.entry))}},unscheduleAllForTarget:function(t){if(t){var e=t._id;e||(t.__instanceId?(cc.warnID(1513),e=t._id=t.__instanceId):cc.errorID(1510));var i=this._hashForTimers[e];if(i){var n=i.timers;n.indexOf(i.currentTimer)>-1&&!i.currentTimerSalvaged&&(i.currentTimerSalvaged=!0);for(var r=0,s=n.length;r=0;e--)i=r[e],this.unscheduleAllForTarget(i.target);var s=0;if(t<0)for(e=0;e=t&&this.unscheduleUpdate(n.target),s==this._updatesNegList.length&&e++;if(t<=0)for(e=0;e=t&&this.unscheduleUpdate(n.target),s==this._updatesPosList.length&&e++},isScheduled:function(t,e){cc.assertID(t,1508),cc.assertID(e,1509);var i=e._id;i||(e.__instanceId?(cc.warnID(1513),i=e._id=e.__instanceId):cc.errorID(1510));var n=this._hashForTimers[i];if(!n)return!1;if(null==n.timers)return!1;for(var r=n.timers,s=0;s=t&&(r.paused=!0,s.push(r.target));if(t<=0)for(i=0;i=t&&(r.paused=!0,s.push(r.target));return s},resumeTargets:function(t){if(t)for(var e=0;e1?n:n[0]}},cc.AssetManager=O,cc.assetManager=new O,Object.defineProperty(cc,"resources",{get:function(){return P.get(R.RESOURCES)}}),e.exports=cc.assetManager}),{"./builtins":77,"./bundle":78,"./cache":79,"./depend-util":81,"./downloader":88,"./factory":89,"./fetch":90,"./helper":92,"./load":94,"./pack-manager":95,"./parser":96,"./pipeline":97,"./preprocess":98,"./releaseManager":99,"./request-item":100,"./shared":101,"./task":102,"./urlTransformer":103,"./utilities":104}],77:[(function(t,e){"use strict";var i=t("./cache"),n=t("./releaseManager"),r=t("./shared").BuiltinBundleName,s={_assets:new i({material:new i,effect:new i}),_loadBuiltins:function(t,e){var i=t+"s",n=this._assets.get(t);return cc.assetManager.internal.loadDir(i,null,null,(function(t,i){if(t)cc.error(t.message,t.stack);else for(var r=0;re.length)||47===t.charCodeAt(e.length)}return this.paths.forEach((function(n,r){if(r.startsWith(t)&&a(r,t)||!t)for(var o=0,l=n.length;o1){var f=Object.create(null);n.forEach((function(t){f[t._uuid]=t})),r={isCompleted:h,_map:f}}else r=n[0]}i&&i(e,r)}))},getXMLHttpRequest:function(){return new XMLHttpRequest},_parseLoadResArgs:i.parseLoadResArgs,getItem:function(t){return cc.assetManager.assets.has(t)?{content:cc.assetManager.assets.get(t)}:null},loadRes:function(t,e,i,n){var r=this._parseLoadResArgs(e,i,n),s=(e=r.type,r.onProgress),a=r.onComplete,o=cc.path.extname(t);o&&(t=t.slice(0,-o.length)),cc.resources.load(t,e,s,a)},loadResArray:function(t,e,i,n){var r=this._parseLoadResArgs(e,i,n),s=(e=r.type,r.onProgress),a=r.onComplete;t.forEach((function(e,i){var n=cc.path.extname(e);n&&(t[i]=e.slice(0,-n.length))})),cc.resources.load(t,e,s,a)},loadResDir:function(t,e,i,n){var r=this._parseLoadResArgs(e,i,n),s=(e=r.type,r.onProgress),a=r.onComplete;cc.resources.loadDir(t,e,s,(function(i,n){var r=[];i||(r=cc.resources.getDirWithPath(t,e).map((function(t){return t.path}))),a&&a(i,n,r)}))},getRes:function(t,e){return cc.assetManager.assets.has(t)?cc.assetManager.assets.get(t):cc.resources.get(t,e)},getResCount:function(){return cc.assetManager.assets.count},getDependsRecursively:function(t){return t?n.getDepsRecursively("string"==typeof t?t:t._uuid).concat([t._uuid]):[]},get assetLoader(){},get md5Pipe(){return u},get downloader(){return cc.assetManager.downloader},get loader(){return cc.assetManager.parser},addDownloadHandlers:function(t){var e=Object.create(null);for(var i in t){var n=t[i];e["."+i]=function(t,e,i){n({url:t},i)}}cc.assetManager.downloader.register(e)},addLoadHandlers:function(t){var e=Object.create(null);for(var i in t){var n=t[i];e["."+i]=function(t,e,i){n({content:t},i)}}cc.assetManager.parser.register(e)},flowInDeps:function(){},release:function(t){if(Array.isArray(t))for(var e=0;eL._maxInterval?L._maxInterval:cc.director._deltaTime;t-I>1e3*e&&(B=0,I=t)},O=function t(e,i){for(P=!1,R();E.length>0&&D0&&D0&&(s(O,v,g),P=!0),a.apply(this,arguments)}))}R(),D0){var i=n.create({name:t.name+" dependencies",input:l,progress:f,options:s,onProgress:t.onProgress,onError:n.prototype.recycle,onComplete:function(n){n||(t.output.push.apply(t.output,this.output),i.recycle()),r&&u(t),e(n)}});h.async(i)}else r&&u(t),e()}))}}),{"./pack-manager":95,"./shared":101,"./task":102,"./utilities":104}],91:[(function(t,e){"use strict";var i,n=t("../utils/text-utils"),r=null,s="BES bswy:->@123\u4e01\u3041\u1101",a=Object.create(null),o=-1,l=[],c=3e3,h=(i=void 0,function(){if(void 0===i)if(window.FontFace){var t=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),e=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);i=t?parseInt(t[1],10)>42:!e}else i=!1;return i});function u(){for(var t=!0,e=Date.now(),i=l.length-1;i>=0;i--){var a=l[i],h=a.fontFamilyName;if(e-a.startTime>c)cc.warnID(4933,h),a.onComplete(null,h),l.splice(i,1);else{var u=a.refWidth,_="40px "+h;r.font=_,u!==n.safeMeasureText(r,s,_)?(l.splice(i,1),a.onComplete(null,h)):t=!1}}t&&(clearInterval(o),o=-1)}var _={loadFont:function(t,e,i){var f=_._getFontFamily(t);if(a[f])return i(null,f);if(!r){var d=document.createElement("canvas");d.width=100,d.height=100,r=d.getContext("2d")}var p="40px "+f;r.font=p;var m=n.safeMeasureText(r,s,p),y=document.createElement("style");y.type="text/css";var v="";isNaN(f-0)?v+="@font-face { font-family:"+f+"; src:":v+="@font-face { font-family:'"+f+"'; src:",v+="url('"+t+"');",y.textContent=v+"}",document.body.appendChild(y);var g,b,A,x,C,T,S=document.createElement("div"),w=S.style;if(w.fontFamily=f,S.innerHTML=".",w.position="absolute",w.left="-100px",w.top="-100px",document.body.appendChild(S),h())g=Date.now(),b=f,A=i,x=new Promise(function(t,e){(function i(){Date.now()-g>=c?e():document.fonts.load("40px "+b).then((function(e){e.length>=1?t():setTimeout(i,100)}),(function(){e()}))})()}),C=null,T=new Promise(function(t,e){C=setTimeout(e,c)}),Promise.race([T,x]).then((function(){C&&(clearTimeout(C),C=null),A(null,b)}),(function(){cc.warnID(4933,b),A(null,b)}));else{var E={fontFamilyName:f,refWidth:m,onComplete:i,startTime:Date.now()};l.push(E),-1===o&&(o=setInterval(u,100))}a[f]=y},_getFontFamily:function(t){var e=t.lastIndexOf(".ttf");if(-1===e)return t;var i,n=t.lastIndexOf("/");return-1!==(i=-1===n?t.substring(0,e)+"_LABEL":t.substring(n+1,e)+"_LABEL").indexOf(" ")&&(i='"'+i+'"'),i}};e.exports=_}),{"../utils/text-utils":330}],92:[(function(t,e){"use strict";var i,n=t("./shared").bundles,r={decodeUuid:t("../utils/decode-uuid"),getUuidFromURL:(i=/.*[\/\\][0-9a-fA-F]{2}[\/\\]([0-9a-fA-F-]{8,})/,function(t){var e=t.match(i);return e?e[1]:""}),getUrlWithUuid:function(t,e){(e=e||Object.create(null)).__isNative__=e.isNative,e.ext=e.nativeExt;var i=n.find((function(e){return e.getAssetInfo(t)}));return i&&(e.bundle=i.name),cc.assetManager._transform(t,e)},isScene:function(t){return t&&(t.constructor===cc.SceneAsset||t instanceof cc.Scene)},normalize:function(t){return t&&(46===t.charCodeAt(0)&&47===t.charCodeAt(1)?t=t.slice(2):47===t.charCodeAt(0)&&(t=t.slice(1))),t}};e.exports=r}),{"../utils/decode-uuid":318,"./shared":101}],93:[(function(t){"use strict";t("./deprecated"),t("./CCAssetManager")}),{"./CCAssetManager":76,"./deprecated":82}],94:[(function(t,e){"use strict";var i=t("./pack-manager"),n=t("./pipeline"),r=t("./parser"),s=t("./utilities"),a=s.getDepends,o=s.cache,l=s.gatherAsset,c=s.setProperties,h=s.forEach,u=s.clear,_=s.checkCircleReference,f=t("./shared"),d=f.assets,p=f.files,m=f.parsed,y=f.pipeline,v=t("./task"),g=new n("loadOneAsset",[function(t,e){var n=t.output=t.input,r=n.options,s=n.isNative,a=n.uuid,o=n.file,l=r.reload;if(o||!l&&!s&&d.has(a))return e();i.load(n,t.options,(function(t,i){n.file=i,e(t)}))},function(t,e){var i=t.output=t.input,n=t.progress,s=t.options.__exclude__,a=i.id,o=i.file,l=i.options;if(i.isNative)r.parse(a,o,i.ext,l,(function(r,s){if(r)return e(r);i.content=s,n.canInvoke&&t.dispatch("progress",++n.finish,n.total,i),p.remove(a),m.remove(a),e()}));else{var c=i.uuid;if(c in s){var h=s[c],u=h.finish,f=h.content,y=h.err,v=h.callbacks;n.canInvoke&&t.dispatch("progress",++n.finish,n.total,i),u||_(c,c,s)?(f&&f.addRef&&f.addRef(),i.content=f,e(y)):v.push({done:e,item:i})}else if(!l.reload&&d.has(c)){var g=d.get(c);l.__asyncLoadAssets__||!g.__asyncLoadAssets__?(i.content=g.addRef(),n.canInvoke&&t.dispatch("progress",++n.finish,n.total,i),e()):b(t,g,e,!1)}else r.parse(a,o,"import",l,(function(i,n){if(i)return e(i);n._uuid=c,b(t,n,e,!0)}))}}]);function b(t,e,i,n){var r=t.input,s=t.progress,l=r.uuid,h=r.id,u=r.options,_=r.config,f=u.__asyncLoadAssets__,d=u.cacheAsset,g=[];e.addRef&&e.addRef(),a(l,e,Object.create(null),g,!1,f,_),s.canInvoke&&t.dispatch("progress",++s.finish,s.total+=g.length,r);var b=t.options.__exclude__[l]={content:e,finish:!1,callbacks:[{done:i,item:r}]},A=v.create({input:g,options:t.options,onProgress:t.onProgress,onError:v.prototype.recycle,progress:s,onComplete:function(t){if(e.decRef&&e.decRef(!1),e.__asyncLoadAssets__=f,b.finish=!0,b.err=t,!t){for(var i=Array.isArray(A.output)?A.output:[A.output],r=Object.create(null),s=0,a=i.length;sthis.pipes.length))return this.pipes.splice(e,0,t),this;cc.warnID(4921)},append:function(t){if("function"==typeof t)return this.pipes.push(t),this},remove:function(t){if("number"==typeof t)return this.pipes.splice(t,1),this},sync:function(t){var e=this.pipes;if(t instanceof i&&0!==e.length){null!=t.output&&(t.input=t.output,t.output=null),t._isFinish=!1;for(var n=0,r=e.length;n0&&u(t)>0)){r.remove(t._uuid);for(var n=i.getDeps(t._uuid),s=0,a=n.length;s0&&this._ref--,!1!==t&&cc.assetManager._releaseManager.tryRelease(this),this}}),e.exports=cc.Asset}),{"../platform/CCObject":244}],106:[(function(t,e){"use strict";var i=t("./CCAsset"),n=t("../event/event-target"),r=cc.Enum({WEB_AUDIO:0,DOM_AUDIO:1}),s=cc.Class({name:"cc.AudioClip",extends:i,mixins:[n],ctor:function(){this._loading=!1,this.loaded=!1,this._audio=null},properties:{duration:0,loadMode:{default:r.WEB_AUDIO,type:r},_nativeAsset:{get:function(){return this._audio},set:function(t){t instanceof cc.AudioClip?this._audio=t._nativeAsset:this._audio=t,this._audio&&(this.loaded=!0,this.emit("load"))},override:!0},_nativeDep:{get:function(){return{uuid:this._uuid,audioLoadMode:this.loadMode,ext:cc.path.extname(this._native),__isNative__:!0}},override:!0}},statics:{LoadMode:r,_loadByUrl:function(t,e){var i=cc.assetManager.assets.get(t);i?e(null,i):cc.assetManager.loadRemote(t,(function(t,i){if(t)return e(t);e(null,i)}))}},_ensureLoaded:function(t){if(this.loaded)return t&&t();if(t&&this.once("load",t),!this._loading){this._loading=!0;var e=this;cc.assetManager.postLoadNative(this,(function(){e._loading=!1}))}},destroy:function(){cc.audioEngine.uncache(this),this._super()}});cc.AudioClip=s,e.exports=s}),{"../event/event-target":185,"./CCAsset":105}],107:[(function(t,e){"use strict";var i=function(){this.u=0,this.v=0,this.w=0,this.h=0,this.offsetX=0,this.offsetY=0,this.textureID=0,this.valid=!1,this.xAdvance=0},n=function(t){this._letterDefinitions={},this._texture=t};n.prototype={constructor:n,addLetterDefinitions:function(t,e){this._letterDefinitions[t]=e},cloneLetterDefinition:function(){var t={};for(var e in this._letterDefinitions){var n=new i;cc.js.mixin(n,this._letterDefinitions[e]),t[e]=n}return t},getTexture:function(){return this._texture},getLetter:function(t){return this._letterDefinitions[t]},getLetterDefinitionForChar:function(t){var e=t.charCodeAt(0);return this._letterDefinitions.hasOwnProperty(e)?this._letterDefinitions[e]:null},clear:function(){this._letterDefinitions={}}};var r=cc.Class({name:"cc.BitmapFont",extends:cc.Font,properties:{fntDataStr:{default:""},spriteFrame:{default:null,type:cc.SpriteFrame},fontSize:{default:-1},_fntConfig:null,_fontDefDictionary:null},onLoad:function(){var t=this.spriteFrame;this._fontDefDictionary||(this._fontDefDictionary=new n,t&&(this._fontDefDictionary._texture=t._texture));var e=this._fntConfig;if(e){var r=e.fontDefDictionary;for(var s in r){var a=new i,o=r[s].rect;a.offsetX=r[s].xOffset,a.offsetY=r[s].yOffset,a.w=o.width,a.h=o.height,a.u=o.x,a.v=o.y,a.textureID=0,a.valid=!0,a.xAdvance=r[s].xAdvance,this._fontDefDictionary.addLetterDefinitions(s,a)}}}});cc.BitmapFont=r,cc.BitmapFont.FontLetterDefinition=i,cc.BitmapFont.FontAtlas=n,e.exports=r}),{}],108:[(function(t,e){"use strict";var i=cc.Class({name:"cc.BufferAsset",extends:cc.Asset,ctor:function(){this._buffer=null},properties:{_nativeAsset:{get:function(){return this._buffer},set:function(t){this._buffer=t.buffer||t},override:!0},buffer:function(){return this._buffer}}});cc.BufferAsset=e.exports=i}),{}],109:[(function(t,e){"use strict";var i=cc.Class({name:"cc.Font",extends:cc.Asset});cc.Font=e.exports=i}),{}],110:[(function(t,e){"use strict";var i=cc.Class({name:"cc.JsonAsset",extends:cc.Asset,properties:{json:null}});e.exports=cc.JsonAsset=i}),{}],111:[(function(t,e){"use strict";var i=cc.Class({name:"cc.LabelAtlas",extends:cc.BitmapFont,onLoad:function(){this.spriteFrame?this._fntConfig?this._super():cc.warnID(9101,this.name):cc.warnID(9100,this.name)}});cc.LabelAtlas=i,e.exports=i}),{}],112:[(function(t,e){"use strict";var i=cc.Enum({AUTO:0,SINGLE_INSTANCE:1,MULTI_INSTANCE:2}),n=cc.Class({name:"cc.Prefab",extends:cc.Asset,ctor:function(){this._createFunction=null,this._instantiatedTimes=0},properties:{data:null,optimizationPolicy:i.AUTO,asyncLoadAssets:!1,readonly:{default:!1,editorOnly:!0}},statics:{OptimizationPolicy:i,OptimizationPolicyThreshold:3},createNode:!1,compileCreateFunction:function(){var e=t("../platform/instantiate-jit");this._createFunction=e.compile(this.data)},_doInstantiate:function(t){return this.data._prefab||cc.warnID(3700),this._createFunction||this.compileCreateFunction(),this._createFunction(t)},_instantiate:function(){var t;return this.optimizationPolicy!==i.SINGLE_INSTANCE&&(this.optimizationPolicy===i.MULTI_INSTANCE||this._instantiatedTimes+1>=n.OptimizationPolicyThreshold)?(t=this._doInstantiate(),this.data._instantiate(t)):t=this.data._instantiate(),++this._instantiatedTimes,t},destroy:function(){this.data&&this.data.destroy(),this._super()}});cc.Prefab=e.exports=n,cc.js.obsolete(cc,"cc._Prefab","Prefab")}),{"../platform/instantiate-jit":257}],113:[(function(t,e){"use strict";var i,n=(i=t("../../renderer/gfx"))&&i.__esModule?i:{default:i},r=t("../renderer"),s=t("./CCTexture2D"),a=cc.Enum({RB_FMT_D24S8:n.default.RB_FMT_D24S8,RB_FMT_S8:n.default.RB_FMT_S8,RB_FMT_D16:n.default.RB_FMT_D16}),o=cc.Class({name:"cc.RenderTexture",extends:s,statics:{DepthStencilFormat:a},ctor:function(){this._framebuffer=null},initWithSize:function(t,e,i){this.width=Math.floor(t||cc.visibleRect.width),this.height=Math.floor(e||cc.visibleRect.height),this._resetUnderlyingMipmaps();var s,a={colors:[this._texture]};this._depthStencilBuffer&&this._depthStencilBuffer.destroy(),i&&(s=new n.default.RenderBuffer(r.device,i,t,e),i===n.default.RB_FMT_D24S8?a.depthStencil=s:i===n.default.RB_FMT_S8?a.stencil=s:i===n.default.RB_FMT_D16&&(a.depth=s)),this._depthStencilBuffer=s,this._framebuffer&&this._framebuffer.destroy(),this._framebuffer=new n.default.FrameBuffer(r.device,t,e,a),this._packable=!1,this.loaded=!0,this.emit("load")},updateSize:function(t,e){this.width=Math.floor(t||cc.visibleRect.width),this.height=Math.floor(e||cc.visibleRect.height),this._resetUnderlyingMipmaps();var i=this._depthStencilBuffer;i&&i.update(this.width,this.height),this._framebuffer._width=t,this._framebuffer._height=e},drawTextureAt:function(t,e,i){t._image&&0!==t._image.width&&this._texture.updateSubImage({x:e,y:i,image:t._image,width:t.width,height:t.height,level:0,flipY:!1,premultiplyAlpha:t._premultiplyAlpha})},readPixels:function(t,e,i,n,r){if(!this._framebuffer||!this._texture)return t;e=e||0,i=i||0;var s=n||this.width,a=r||this.height;t=t||new Uint8Array(s*a*4);var o=cc.game._renderContext,l=o.getParameter(o.FRAMEBUFFER_BINDING);return o.bindFramebuffer(o.FRAMEBUFFER,this._framebuffer.getHandle()),o.readPixels(e,i,s,a,o.RGBA,o.UNSIGNED_BYTE,t),o.bindFramebuffer(o.FRAMEBUFFER,l),t},destroy:function(){this._super(),this._framebuffer&&(this._framebuffer.destroy(),this._framebuffer=null)}});cc.RenderTexture=e.exports=o}),{"../../renderer/gfx":371,"../renderer":270,"./CCTexture2D":120}],114:[(function(t,e){"use strict";var i=cc.Class({name:"cc.SceneAsset",extends:cc.Asset,properties:{scene:null,asyncLoadAssets:void 0}});cc.SceneAsset=i,e.exports=i}),{}],115:[(function(){"use strict";var t=cc.Class({name:"cc.Script",extends:cc.Asset});cc._Script=t;var e=cc.Class({name:"cc.JavaScript",extends:t});cc._JavaScript=e;var i=cc.Class({name:"cc.TypeScript",extends:t});cc._TypeScript=i}),{}],116:[(function(t,e){"use strict";var i=cc.Class({name:"cc.SpriteAtlas",extends:cc.Asset,properties:{_spriteFrames:{default:{}}},getTexture:function(){var t=Object.keys(this._spriteFrames);if(t.length>0){var e=this._spriteFrames[t[0]];return e?e.getTexture():null}return null},getSpriteFrame:function(t){var e=this._spriteFrames[t];return e?(e.name||(e.name=t),e):null},getSpriteFrames:function(){var t=[],e=this._spriteFrames;for(var i in e)t.push(this.getSpriteFrame(i));return t}});cc.SpriteAtlas=i,e.exports=i}),{}],117:[(function(t,e){"use strict";var i=t("../event/event-target"),n=[{u:0,v:0},{u:0,v:0},{u:0,v:0},{u:0,v:0}],r=cc.Class({name:"cc.SpriteFrame",extends:t("../assets/CCAsset"),mixins:[i],properties:{_textureSetter:{set:function(t){t&&this._texture!==t&&this._refreshTexture(t)}},insetTop:{get:function(){return this._capInsets[1]},set:function(t){this._capInsets[1]=t,this._texture&&this._calculateSlicedUV()}},insetBottom:{get:function(){return this._capInsets[3]},set:function(t){this._capInsets[3]=t,this._texture&&this._calculateSlicedUV()}},insetLeft:{get:function(){return this._capInsets[0]},set:function(t){this._capInsets[0]=t,this._texture&&this._calculateSlicedUV()}},insetRight:{get:function(){return this._capInsets[2]},set:function(t){this._capInsets[2]=t,this._texture&&this._calculateSlicedUV()}}},ctor:function(){i.call(this);var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3],s=arguments[4];this._rect=null,this.uv=[],this._texture=null,this._original=null,this._offset=null,this._originalSize=null,this._rotated=!1,this._flipX=!1,this._flipY=!1,this.vertices=null,this._capInsets=[0,0,0,0],this.uvSliced=[],void 0!==t&&this.setTexture(t,e,n,r,s)},textureLoaded:function(){return this._texture&&this._texture.loaded},onTextureLoaded:function(t,e){return this.textureLoaded()?(t.call(e),!0):(this.once("load",t,e),this.ensureLoadTexture(),!1)},isRotated:function(){return this._rotated},setRotated:function(t){this._rotated=t,this._texture&&this._calculateUV()},isFlipX:function(){return this._flipX},isFlipY:function(){return this._flipY},setFlipX:function(t){this._flipX=t,this._texture&&this._calculateUV()},setFlipY:function(t){this._flipY=t,this._texture&&this._calculateUV()},getRect:function(){return cc.rect(this._rect)},setRect:function(t){this._rect=t,this._texture&&this._calculateUV()},getOriginalSize:function(){return cc.size(this._originalSize)},setOriginalSize:function(t){this._originalSize?(this._originalSize.width=t.width,this._originalSize.height=t.height):this._originalSize=cc.size(t)},getTexture:function(){return this._texture},_textureLoadedCallback:function(){var t=this._texture;if(t){var e=t.width,i=t.height;this._rect?this._checkRect(this._texture):this._rect=cc.rect(0,0,e,i),this._originalSize||this.setOriginalSize(cc.size(e,i)),this._offset||this.setOffset(cc.v2(0,0)),this._calculateUV(),this.emit("load")}},_refreshTexture:function(t){this._texture=t,t.loaded?this._textureLoadedCallback():t.once("load",this._textureLoadedCallback,this)},getOffset:function(){return cc.v2(this._offset)},setOffset:function(t){this._offset=cc.v2(t)},clone:function(){return new r(this._texture,this.getRect(),this._rotated,this.getOffset(),this.getOriginalSize())},setTexture:function(t,e,i,n,r){if(1!==arguments.length||t!==this._texture){if(this._rect=e||null,n?this.setOffset(n):this._offset=null,r?this.setOriginalSize(r):this._originalSize=null,this._rotated=i||!1,"string"!=typeof t)return t instanceof cc.Texture2D&&this._refreshTexture(t),!0;cc.errorID(3401)}},ensureLoadTexture:function(){this._texture&&(this._texture.loaded||(this._refreshTexture(this._texture),cc.assetManager.postLoadNative(this._texture)))},_checkRect:function(t){var e=this._rect,i=e.x,n=e.y;this._rotated?(i+=e.height,n+=e.width):(i+=e.width,n+=e.height),i>t.width&&cc.errorID(3300,t.nativeUrl+"/"+this.name,i,t.width),n>t.height&&cc.errorID(3400,t.nativeUrl+"/"+this.name,n,t.height)},_flipXY:function(t){if(this._flipX){var e=t[0];t[0]=t[1],t[1]=e,e=t[2],t[2]=t[3],t[3]=e}if(this._flipY){var i=t[0];t[0]=t[2],t[2]=i,i=t[1],t[1]=t[3],t[3]=i}},_calculateSlicedUV:function(){var t=this._rect,e=this._texture.width,i=this._texture.height,r=this._capInsets[0],s=this._capInsets[2],a=t.width-r-s,o=this._capInsets[1],l=this._capInsets[3],c=t.height-o-l,h=this.uvSliced;if(h.length=0,this._rotated){n[0].u=t.x/e,n[1].u=(t.x+l)/e,n[2].u=(t.x+l+c)/e,n[3].u=(t.x+t.height)/e,n[3].v=t.y/i,n[2].v=(t.y+r)/i,n[1].v=(t.y+r+a)/i,n[0].v=(t.y+t.width)/i,this._flipXY(n);for(var u=0;u<4;++u)for(var _=n[u],f=0;f<4;++f){var d=n[3-f];h.push({u:_.u,v:d.v})}}else{n[0].u=t.x/e,n[1].u=(t.x+r)/e,n[2].u=(t.x+r+a)/e,n[3].u=(t.x+t.width)/e,n[3].v=t.y/i,n[2].v=(t.y+o)/i,n[1].v=(t.y+o+c)/i,n[0].v=(t.y+t.height)/i,this._flipXY(n);for(var p=0;p<4;++p)for(var m=n[p],y=0;y<4;++y){var v=n[y];h.push({u:v.u,v:m.v})}}},_setDynamicAtlasFrame:function(t){t&&(this._original={_texture:this._texture,_x:this._rect.x,_y:this._rect.y},this._texture=t.texture,this._rect.x=t.x,this._rect.y=t.y,this._calculateUV())},_resetDynamicAtlasFrame:function(){this._original&&(this._rect.x=this._original._x,this._rect.y=this._original._y,this._texture=this._original._texture,this._original=null,this._calculateUV())},_calculateUV:function(){var t=this._rect,e=this._texture,i=this.uv,n=e.width,r=e.height;if(this._rotated){var s=0===n?0:t.x/n,a=0===n?0:(t.x+t.height)/n,o=0===r?0:(t.y+t.width)/r,l=0===r?0:t.y/r;i[0]=s,i[1]=l,i[2]=s,i[3]=o,i[4]=a,i[5]=l,i[6]=a,i[7]=o}else{var c=0===n?0:t.x/n,h=0===n?0:(t.x+t.width)/n,u=0===r?0:(t.y+t.height)/r,_=0===r?0:t.y/r;i[0]=c,i[1]=u,i[2]=h,i[3]=u,i[4]=c,i[5]=_,i[6]=h,i[7]=_}if(this._flipX){var f=i[0];i[0]=i[2],i[2]=f,f=i[1],i[1]=i[3],i[3]=f,f=i[4],i[4]=i[6],i[6]=f,f=i[5],i[5]=i[7],i[7]=f}if(this._flipY){var d=i[0];i[0]=i[4],i[4]=d,d=i[1],i[1]=i[5],i[5]=d,d=i[2],i[2]=i[6],i[6]=d,d=i[3],i[3]=i[7],i[7]=d}var p=this.vertices;if(p){p.nu.length=0,p.nv.length=0;for(var m=0;m0?this._image=t.images[0]:void 0!==t.image&&(this._image=t.image,t.images||(_.length=0,t.images=_),t.images.push(t.image)),this._texture&&this._texture.update(t),this._hashDirty=!0},initWithElement:function(t){if(t)if(this._image=t,t.complete||t instanceof HTMLCanvasElement)this.handleLoadedTexture();else if(cc.sys.capabilities.imageBitmap&&t instanceof ImageBitmap)this._checkImageBitmap(this.handleLoadedTexture.bind(this));else{var e=this;t.addEventListener("load",(function(){e.handleLoadedTexture()})),t.addEventListener("error",(function(t){cc.warnID(3119,t.message)}))}},initWithData:function(t,e,i,n){var r=d();return r.image=t,r.images=[r.image],r.genMipmaps=this._genMipmaps,r.premultiplyAlpha=this._premultiplyAlpha,r.flipY=this._flipY,r.minFilter=u[this._minFilter],r.magFilter=u[this._magFilter],r.wrapS=this._wrapS,r.wrapT=this._wrapT,r.format=this._getGFXPixelFormat(e),r.width=i,r.height=n,this._texture?this._texture.update(r):this._texture=new s.Texture2D(s.device,r),this.width=i,this.height=n,this._updateFormat(),this._checkPackable(),this.loaded=!0,this.emit("load"),!0},getHtmlElementObj:function(){return this._image},destroy:function(){cc.sys.capabilities.imageBitmap&&this._image instanceof ImageBitmap&&this._image.close&&this._image.close(),this._packable&&cc.dynamicAtlasManager&&cc.dynamicAtlasManager.deleteAtlasTexture(this),this._image=null,this._texture&&this._texture.destroy(),this._super()},getPixelFormat:function(){return this._format},hasPremultipliedAlpha:function(){return this._premultiplyAlpha||!1},isAlphaAtlas:function(){return this._isAlphaAtlas},handleLoadedTexture:function(){if(this._image&&this._image.width&&this._image.height){this.width=this._image.width,this.height=this._image.height;var t=d();t.image=this._image,t.images=[t.image],t.width=this.width,t.height=this.height,t.genMipmaps=this._genMipmaps,t.format=this._getGFXPixelFormat(this._format),t.premultiplyAlpha=this._premultiplyAlpha,t.flipY=this._flipY,t.minFilter=u[this._minFilter],t.magFilter=u[this._magFilter],t.wrapS=this._wrapS,t.wrapT=this._wrapT,this._texture?this._texture.update(t):this._texture=new s.Texture2D(s.device,t),this._updateFormat(),this._checkPackable(),this.loaded=!0,this.emit("load"),cc.macro.CLEANUP_IMAGE_CACHE&&(this._image instanceof HTMLImageElement?this._clearImage():cc.sys.capabilities.imageBitmap&&this._image instanceof ImageBitmap&&this._image.close&&this._image.close())}},description:function(){return""},releaseTexture:function(){this._image=null,this._texture&&this._texture.destroy()},setWrapMode:function(t,e){if(this._wrapS!==t||this._wrapT!==e){var i=d();i.wrapS=t,i.wrapT=e,this.update(i)}},setFilters:function(t,e){if(this._minFilter!==t||this._magFilter!==e){var i=d();i.minFilter=t,i.magFilter=e,this.update(i)}},setFlipY:function(t){if(this._flipY!==t){var e=d();e.flipY=t,e.premultiplyAlpha=this._premultiplyAlpha,this.update(e)}},setPremultiplyAlpha:function(t){if(this._premultiplyAlpha!==t){var e=d();e.flipY=this._flipY,e.premultiplyAlpha=t,this.update(e)}},_updateFormat:function(){this._isAlphaAtlas=this._format===l.RGBA_ETC1||this._format===l.RGB_A_PVRTC_4BPPV1||this._format===l.RGB_A_PVRTC_2BPPV1},_checkPackable:function(){var t=cc.dynamicAtlasManager;if(t)if(this._isCompressed())this._packable=!1;else{var e=this.width,i=this.height;!this._image||e>t.maxFrameSize||i>t.maxFrameSize||this._getHash()!==t.Atlas.DEFAULT_HASH?this._packable=!1:this._image&&this._image instanceof HTMLCanvasElement&&(this._packable=!0)}},_getOpts:function(){var t=d();return t.width=this.width,t.height=this.height,t.genMipmaps=this._genMipmaps,t.format=this._format,t.premultiplyAlpha=this._premultiplyAlpha,t.anisotropy=this._anisotropy,t.flipY=this._flipY,t.minFilter=u[this._minFilter],t.magFilter=u[this._magFilter],t.mipFilter=u[this._mipFilter],t.wrapS=this._wrapS,t.wrapT=this._wrapT,t},_getGFXPixelFormat:function(t){return t===l.RGBA_ETC1?t=l.RGB_ETC1:t===l.RGB_A_PVRTC_4BPPV1?t=l.RGB_PVRTC_4BPPV1:t===l.RGB_A_PVRTC_2BPPV1&&(t=l.RGB_PVRTC_2BPPV1),t},_resetUnderlyingMipmaps:function(t){var e=this._getOpts();e.images=t||[null],this._texture?this._texture.update(e):this._texture=new s.Texture2D(s.device,e)},_serialize:!1,_deserialize:function(t){var e=t.split(","),i=e[0];if(i){var n=p._parseExt(i,this._format);if(n.bestExt)this._setRawAsset(n.bestExt),this._format=n.bestFormat;else{if(!n.defaultExt)throw new Error(cc.debug.getError(3121));this._setRawAsset(n.defaultExt),cc.warnID(3120,n.defaultExt,n.defaultExt)}}8===e.length&&(this._minFilter=parseInt(e[1]),this._magFilter=parseInt(e[2]),this._wrapS=parseInt(e[3]),this._wrapT=parseInt(e[4]),this._premultiplyAlpha=49===e[5].charCodeAt(0),this._genMipmaps=49===e[6].charCodeAt(0),this._packable=49===e[7].charCodeAt(0))},_getHash:function(){if(!this._hashDirty)return this._hash;var t=this._genMipmaps?1:0,e=this._premultiplyAlpha?1:0,i=this._flipY?1:0,n=this._minFilter===h.LINEAR?1:2,r=this._magFilter===h.LINEAR?1:2,s=this._wrapS===c.REPEAT?1:this._wrapS===c.CLAMP_TO_EDGE?2:3,a=this._wrapT===c.REPEAT?1:this._wrapT===c.CLAMP_TO_EDGE?2:3,o=this._format;return this._image,this._hash=Number(""+n+r+o+s+a+t+e+i),this._hashDirty=!1,this._hash},_isCompressed:function(){return this._formatl.RGBA32F},_clearImage:function(){this._image.src=""},_checkImageBitmap:function(t){var e=this,i=this._image,n=this._flipY,r=this._premultiplyAlpha;this._flipY!==i.flipY||this._premultiplyAlpha!==i.premultiplyAlpha?createImageBitmap(i,{imageOrientation:n!==i.flipY?"flipY":"none",premultiplyAlpha:r?"premultiply":"none"}).then((function(s){i.close&&i.close(),s.flipY=n,s.premultiplyAlpha=r,e._image=s,t()}),(function(t){cc.error(t.message)})):t()}});cc.Texture2D=e.exports=p}),{"../../renderer/gfx":371,"../assets/CCAsset":105,"../event/event-target":185,"../platform/CCClass":238,"../platform/id-generater":255,"../renderer":270}],121:[(function(t){"use strict";t("./CCAsset"),t("./CCFont"),t("./CCPrefab"),t("./CCAudioClip"),t("./CCScripts"),t("./CCSceneAsset"),t("./CCSpriteFrame"),t("./CCTexture2D"),t("./CCRenderTexture"),t("./CCTTFFont"),t("./CCSpriteAtlas"),t("./CCBitmapFont"),t("./CCLabelAtlas"),t("./CCTextAsset"),t("./CCJsonAsset"),t("./CCBufferAsset"),t("./material")}),{"./CCAsset":105,"./CCAudioClip":106,"./CCBitmapFont":107,"./CCBufferAsset":108,"./CCFont":109,"./CCJsonAsset":110,"./CCLabelAtlas":111,"./CCPrefab":112,"./CCRenderTexture":113,"./CCSceneAsset":114,"./CCScripts":115,"./CCSpriteAtlas":116,"./CCSpriteFrame":117,"./CCTTFFont":118,"./CCTextAsset":119,"./CCTexture2D":120,"./material":128}],122:[(function(t,e){"use strict";var i,n=(i=t("../CCAsset"))&&i.__esModule?i:{default:i},r=t("./effect-parser"),s=cc.Class({name:"cc.EffectAsset",extends:n.default,ctor:function(){this._effect=null},properties:{properties:Object,techniques:[],shaders:[]},onLoad:function(){if(cc.game.renderType!==cc.game.RENDER_TYPE_CANVAS){for(var t=cc.renderer._forward._programLib,e=0;e=i.length)){var n=0,r=i.length;void 0!==e&&(n=e,r=e+1);for(var s=n;s=i.length)){var n=0,r=i.length;void 0!==e&&(n=e,r=e+1);for(var s=n;s=this._techniques.length?cc.warn("Can not switch to technique with index ["+t+"]"):this._technique=this._techniques[t]},o.clear=function(){this._techniques=[]},o.clone=function(){for(var t=[],e=0;ethis.maxSize||(this._clean(t),e[i][r].push(t),this.count++)}},s.clear=function(){this._pool={},this.count=0},s._clean=function(t){t._owner=null},r}(r.default));r.default.register("material",a);var o=a;i.default=o,e.exports=i.default}),{"../../utils/pool":325,"./utils":131}],130:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=o(t("./CCMaterial")),s=o(t("./effect-variant")),a=o(t("./material-pool"));function o(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var i=0;i0},render:function(t){if(!(t=t||cc.director.getScene()))return null;this.node.getWorldMatrix(c),this.beforeDraw(),a.renderCamera(this._camera,t)},_onAlignWithScreen:function(){var t=cc.game.canvas.height/cc.view._scaleY;this._targetTexture&&(t=cc.visibleRect.height);var e=this._fov*cc.macro.RAD;this.node.z=t/(2*Math.tan(e/2)),e=2*Math.atan(Math.tan(e/2)/this.zoomRatio),this._camera.setFov(e),this._camera.setOrthoHeight(t/2/this.zoomRatio),this.node.setRotation(0,0,0,1)},beforeDraw:function(){if(this._camera){if(this._alignWithScreen)this._onAlignWithScreen();else{var t=this._fov*cc.macro.RAD;t=2*Math.atan(Math.tan(t/2)/this.zoomRatio),this._camera.setFov(t),this._camera.setOrthoHeight(this._orthoSize/this.zoomRatio)}this._camera.dirty=!0}}});cc.js.mixin(b.prototype,{getNodeToCameraTransform:function(t){var e=r.identity();return t.getWorldMatrix(h),this.containsNode(t)&&(this.getWorldToCameraMatrix(c),i.Mat4.mul(h,h,c)),r.fromMat4(e,h),e},getCameraToWorldPoint:function(t,e){return this.getScreenToWorldPoint(t,e)},getWorldToCameraPoint:function(t,e){return this.getWorldToScreenPoint(t,e)},getCameraToWorldMatrix:function(t){return this.getScreenToWorldMatrix2D(t)},getWorldToCameraMatrix:function(t){return this.getWorldToScreenMatrix2D(t)}}),e.exports=cc.Camera=b}),{"../../renderer/scene/camera":391,"../CCGame":71,"../geom-utils":193,"../renderer/index":270,"../renderer/render-flow":271,"../utils/affine-transform":314,"../value-types":338}],134:[(function(t,e){"use strict";cc.Collider.Box=cc.Class({properties:{_offset:cc.v2(0,0),_size:cc.size(100,100),offset:{tooltip:!1,get:function(){return this._offset},set:function(t){this._offset=t},type:cc.Vec2},size:{tooltip:!1,get:function(){return this._size},set:function(t){this._size.width=t.width<0?0:t.width,this._size.height=t.height<0?0:t.height},type:cc.Size}},resetInEditor:!1});var i=cc.Class({name:"cc.BoxCollider",extends:cc.Collider,mixins:[cc.Collider.Box],editor:!1});cc.BoxCollider=e.exports=i}),{}],135:[(function(t,e){"use strict";cc.Collider.Circle=cc.Class({properties:{_offset:cc.v2(0,0),_radius:50,offset:{tooltip:!1,get:function(){return this._offset},set:function(t){this._offset=t},type:cc.Vec2},radius:{tooltip:!1,get:function(){return this._radius},set:function(t){this._radius=t<0?0:t}}},resetInEditor:!1});var i=cc.Class({name:"cc.CircleCollider",extends:cc.Collider,mixins:[cc.Collider.Circle],editor:!1});cc.CircleCollider=e.exports=i}),{}],136:[(function(t,e){"use strict";var i=cc.Class({name:"cc.Collider",extends:cc.Component,properties:{editing:{default:!1,serializable:!1,tooltip:!1},tag:{tooltip:!1,default:0,range:[0,1e7],type:cc.Integer}},onDisable:function(){cc.director.getCollisionManager().removeCollider(this)},onEnable:function(){cc.director.getCollisionManager().addCollider(this)}});cc.Collider=e.exports=i}),{}],137:[(function(t,e){"use strict";var i,n=(i=t("../value-types/vec2"))&&i.__esModule?i:{default:i},r=t("./CCContact"),s=r.CollisionType,a=t("../CCNode").EventType,o=new n.default;function l(t,e,i,n,r,s){var a=t.x,o=t.y,l=t.width,c=t.height,h=e.m,u=h[0],_=h[1],f=h[4],d=h[5],p=u*a+f*o+h[12],m=_*a+d*o+h[13],y=u*l,v=_*l,g=f*c,b=d*c;n.x=p,n.y=m,r.x=y+p,r.y=v+m,i.x=g+p,i.y=b+m,s.x=y+g+p,s.y=v+b+m}var c=cc.Class({mixins:[cc.EventTarget],properties:{enabled:!1,enabledDrawBoundingBox:!1},ctor:function(){this._contacts=[],this._colliders=[],this._debugDrawer=null,this._enabledDebugDraw=!1,cc.director._scheduler&&cc.director._scheduler.enableForTarget(this)},update:function(){if(this.enabled){var t,e,i=this._colliders;for(t=0,e=i.length;tE&&(E=I),IM&&(M=P),P=0){e.splice(i,1);for(var n=this._contacts,r=n.length-1;r>=0;r--){var o=n[r];o.collider1!==t&&o.collider2!==t||(o.touching&&this._doCollide(s.CollisionExit,o),n.splice(r,1))}t.node.off(a.GROUP_CHANGED,this.onNodeGroupChanged,this)}else cc.errorID(6600)},onNodeGroupChanged:function(t){for(var e=t.getComponents(cc.Collider),i=0,n=e.length;i0){t.moveTo(s[0].x,s[0].y);for(var a=1;ar!=u>r&&n<(h-l)*(r-c)/(u-c)+l&&(i=!i)}return i}function a(t,e,i,n){var r,s=i.x-e.x,a=i.y-e.y,o=s*s+a*a,l=((t.x-e.x)*s+(t.y-e.y)*a)/o;return r=n?o?l<0?e:l>1?i:cc.v2(e.x+l*s,e.y+l*a):e:cc.v2(e.x+l*s,e.y+l*a),s=t.x-r.x,a=t.y-r.y,Math.sqrt(s*s+a*a)}i.lineLine=n,i.lineRect=function(t,e,i){var r=new cc.Vec2(i.x,i.y),s=new cc.Vec2(i.x,i.yMax),a=new cc.Vec2(i.xMax,i.yMax),o=new cc.Vec2(i.xMax,i.y);return!!(n(t,e,r,s)||n(t,e,s,a)||n(t,e,a,o)||n(t,e,o,r))},i.linePolygon=r,i.rectRect=function(t,e){var i=t.x,n=t.y,r=t.x+t.width,s=t.y+t.height,a=e.x,o=e.y,l=e.x+e.width,c=e.y+e.height;return i<=l&&r>=a&&n<=c&&s>=o},i.rectPolygon=function(t,e){var i,n,a=new cc.Vec2(t.x,t.y),o=new cc.Vec2(t.x,t.yMax),l=new cc.Vec2(t.xMax,t.yMax),c=new cc.Vec2(t.xMax,t.y);if(r(a,o,e))return!0;if(r(o,l,e))return!0;if(r(l,c,e))return!0;if(r(c,a,e))return!0;for(i=0,n=e.length;i>>1;r<=s;a=r+s>>>1){var o=t[a],l=o.constructor._executionOrder;if(l>i)s=a-1;else if(ln)s=a-1;else{if(!(c0&&(t.array.sort(c),this._invoke(t),t.array.length=0),this._invoke(this._zero),this._zero.array.length=0;var e=this._pos;e.array.length>0&&(e.array.sort(c),this._invoke(e),e.array.length=0)}}),u=cc.Class({extends:l,add:function(t){var e=t.constructor._executionOrder;if(0===e)this._zero.array.push(t);else{var i=e<0?this._neg.array:this._pos.array,n=a(i,t);n<0&&i.splice(~n,0,t)}},remove:function(t){var e=t.constructor._executionOrder;if(0===e)this._zero.fastRemove(t);else{var i=e<0?this._neg:this._pos,n=a(i.array,t);n>=0&&i.removeAt(n)}},invoke:function(t){this._neg.array.length>0&&this._invoke(this._neg,t),this._invoke(this._zero,t),this._pos.array.length>0&&this._invoke(this._pos,t)}});function _(t,e,i,n){var r="var a=it.array;for(it.i=0;it.i=0?n.fastRemoveAt(this._deferredComps,e):(!t.start||t._objFlags&r||this.startInvoker.remove(t),t.update&&this.updateInvoker.remove(t),t.lateUpdate&&this.lateUpdateInvoker.remove(t))},enableComp:function(t,e){if(!(t._objFlags&s)){if(t.onEnable){if(e)return void e.add(t);if(t.onEnable(),!t.node._activeInHierarchy)return}this._onEnabled(t)}},disableComp:function(t){t._objFlags&s&&(t.onDisable&&t.onDisable(),this._onDisabled(t))},_scheduleImmediate:function(t){"function"!=typeof t.start||t._objFlags&r||this.startInvoker.add(t),"function"==typeof t.update&&this.updateInvoker.add(t),"function"==typeof t.lateUpdate&&this.lateUpdateInvoker.add(t)},_deferredSchedule:function(){for(var t=this._deferredComps,e=0,i=t.length;e0&&(this._deferredSchedule(),this.startInvoker.invoke())},startPhase:function(){this._updating=!0,this.startInvoker.invoke(),this._startForNewComps()},updatePhase:function(t){this.updateInvoker.invoke(t)},lateUpdatePhase:function(t){this.lateUpdateInvoker.invoke(t),this._updating=!1,this._startForNewComps()}});e.exports=y}),{"./platform/CCClass":238,"./platform/CCObject":244,"./platform/js":259,"./utils/misc":323}],143:[(function(t,e){"use strict";var i=t("../../animation/animation-animator"),n=t("../../animation/animation-clip"),r=t("../event/event-target"),s=t("../platform/js"),a=function(t,e){return t===e},o=cc.Enum({PLAY:"play",STOP:"stop",PAUSE:"pause",RESUME:"resume",LASTFRAME:"lastframe",FINISHED:"finished"}),l=cc.Class({name:"cc.Animation",extends:t("./CCComponent"),mixins:[r],editor:!1,statics:{EventType:o},ctor:function(){cc.EventTarget.call(this),this._animator=null,this._nameToState=s.createMap(!0),this._didInit=!1,this._currentClip=null},properties:{_defaultClip:{default:null,type:n},defaultClip:{type:n,get:function(){return this._defaultClip},set:function(){},tooltip:!1},currentClip:{get:function(){return this._currentClip},set:function(t){this._currentClip=t},type:n,visible:!1},_writableClips:{get:function(){return this._clips},set:function(t){this._didInit=!1,this._clips=t,this._init()},type:[n]},_clips:{default:[],type:[n],tooltip:!1,visible:!0},playOnLoad:{default:!1,tooltip:!1}},start:function(){if(this.playOnLoad&&this._defaultClip&&(!this._animator||!this._animator.isPlaying)){var t=this.getAnimationState(this._defaultClip.name);this._animator.playState(t)}},onEnable:function(){this._animator&&this._animator.resume()},onDisable:function(){this._animator&&this._animator.pause()},onDestroy:function(){this.stop()},getClips:function(){return this._clips},play:function(t,e){var i=this.playAdditive(t,e);return this._animator.stopStatesExcept(i),i},playAdditive:function(t,e){this._init();var i=this.getAnimationState(t||this._defaultClip&&this._defaultClip.name);if(i){this.enabled=!0;var n=this._animator;n.isPlaying&&i.isPlaying?i.isPaused?n.resumeState(i):(n.stopState(i),n.playState(i,e)):n.playState(i,e),this.enabledInHierarchy||n.pause(),this.currentClip=i.clip}return i},stop:function(t){if(this._didInit)if(t){var e=this._nameToState[t];e&&this._animator.stopState(e)}else this._animator.stop()},pause:function(t){if(this._didInit)if(t){var e=this._nameToState[t];e&&this._animator.pauseState(e)}else this.enabled=!1},resume:function(t){if(this._didInit)if(t){var e=this.getAnimationState(t);e&&this._animator.resumeState(e)}else this.enabled=!0},setCurrentTime:function(t,e){if(this._init(),e){var i=this.getAnimationState(e);i&&this._animator.setStateTime(i,t)}else this._animator.setStateTime(t)},getAnimationState:function(t){this._init();var e=this._nameToState[t];return e&&!e.curveLoaded&&this._animator._reloadClip(e),e||null},addClip:function(t,e){if(t){this._init(),cc.js.array.contains(this._clips,t)||this._clips.push(t),e=e||t.name;var i=this._nameToState[e];if(i){if(i.clip===t)return i;var n=this._clips.indexOf(i.clip);-1!==n&&this._clips.splice(n,1)}var r=new cc.AnimationState(t,e);return this._nameToState[e]=r,r}cc.warnID(3900)},removeClip:function(t,e){if(t){var i;for(var n in this._init(),this._nameToState)if(i=this._nameToState[n],a(i.clip,t))break;if(t===this._defaultClip){if(!e)return void cc.warnID(3902);this._defaultClip=null}if(i&&i.isPlaying){if(!e)return void cc.warnID(3903);this.stop(i.name)}this._clips=this._clips.filter((function(e){return!a(e,t)})),i&&delete this._nameToState[i.name]}else cc.warnID(3901)},sample:function(t){if(this._init(),t){var e=this.getAnimationState(t);e&&e.sample()}else this._animator.sample()},on:function(t,e,i,n){this._init();var r=this._EventTargetOn(t,e,i,n);if("lastframe"===t){var s=this._nameToState;for(var a in s)s[a]._lastframeEventOn=!0}return r},off:function(t,e,i,n){if(this._init(),"lastframe"===t){var r=this._nameToState;for(var s in r)r[s]._lastframeEventOn=!1}this._EventTargetOff(t,e,i,n)},_init:function(){this._didInit||(this._didInit=!0,this._animator=new i(this.node,this),this._createStates())},_createStates:function(){this._nameToState=s.createMap(!0);for(var t=null,e=!1,i=0;i0&&(i=this.time/this.duration),i>=1&&(i=1),this.transition===r.COLOR){var n=this._fromColor.lerp(this._toColor,i);this._setTargetColor(n)}else this.transition===r.SCALE&&this._originalScale&&(e.scale=this._fromScale.lerp(this._toScale,i));1===i&&(this._transitionFinished=!0)}},_registerNodeEvent:function(){this.node.on(cc.Node.EventType.TOUCH_START,this._onTouchBegan,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this._onTouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this._onTouchCancel,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this._onMouseMoveIn,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this._onMouseMoveOut,this)},_unregisterNodeEvent:function(){this.node.off(cc.Node.EventType.TOUCH_START,this._onTouchBegan,this),this.node.off(cc.Node.EventType.TOUCH_MOVE,this._onTouchMove,this),this.node.off(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this),this.node.off(cc.Node.EventType.TOUCH_CANCEL,this._onTouchCancel,this),this.node.off(cc.Node.EventType.MOUSE_ENTER,this._onMouseMoveIn,this),this.node.off(cc.Node.EventType.MOUSE_LEAVE,this._onMouseMoveOut,this)},_registerTargetEvent:function(t){t.on(cc.Node.EventType.SCALE_CHANGED,this._onTargetScaleChanged,this)},_unregisterTargetEvent:function(t){t.off(cc.Node.EventType.SCALE_CHANGED,this._onTargetScaleChanged,this)},_getTargetSprite:function(t){var e=null;return t&&(e=t.getComponent(cc.Sprite)),e},_applyTarget:function(){var t=this._getTarget();this._sprite=this._getTargetSprite(t),this._originalScale||(this._originalScale=cc.Vec2.ZERO),this._originalScale.x=t.scaleX,this._originalScale.y=t.scaleY,this._registerTargetEvent(t)},_onTouchBegan:function(t){this.interactable&&this.enabledInHierarchy&&(this._pressed=!0,this._updateState(),t.stopPropagation())},_onTouchMove:function(t){if(this.interactable&&this.enabledInHierarchy&&this._pressed){var e,i=t.touch,n=this.node._hitTest(i.getLocation()),a=this._getTarget(),o=this._originalScale;this.transition===r.SCALE&&o?n?(this._fromScale.x=o.x,this._fromScale.y=o.y,this._toScale.x=o.x*this.zoomScale,this._toScale.y=o.y*this.zoomScale,this._transitionFinished=!1):(this.time=0,this._transitionFinished=!0,a.setScale(o.x,o.y)):(e=n?s.PRESSED:s.NORMAL,this._applyTransition(e)),t.stopPropagation()}},_onTouchEnded:function(t){this.interactable&&this.enabledInHierarchy&&(this._pressed&&(cc.Component.EventHandler.emitEvents(this.clickEvents,t),this.node.emit("click",this)),this._pressed=!1,this._updateState(),t.stopPropagation())},_onTouchCancel:function(){this.interactable&&this.enabledInHierarchy&&(this._pressed=!1,this._updateState())},_onMouseMoveIn:function(){!this._pressed&&this.interactable&&this.enabledInHierarchy&&(this.transition!==r.SPRITE||this.hoverSprite)&&(this._hovered||(this._hovered=!0,this._updateState()))},_onMouseMoveOut:function(){this._hovered&&(this._hovered=!1,this._updateState())},_updateState:function(){var t=this._getButtonState();this._applyTransition(t),this._updateDisabledState()},_getButtonState:function(){return this.interactable?this._pressed?s.PRESSED:this._hovered?s.HOVER:s.NORMAL:s.DISABLED},_updateColorTransitionImmediately:function(t){var e=this._getStateColor(t);this._setTargetColor(e),this._fromColor=e.clone(),this._toColor=e},_updateColorTransition:function(t){if(t===s.DISABLED)this._updateColorTransitionImmediately(t);else{var e=this._getTarget(),i=this._getStateColor(t);this._fromColor=e.color.clone(),this._toColor=i,this.time=0,this._transitionFinished=!1}},_updateSpriteTransition:function(t){var e=this._getStateSprite(t);this._sprite&&e&&(this._sprite.spriteFrame=e)},_updateScaleTransition:function(t){t===s.PRESSED?this._zoomUp():this._zoomBack()},_zoomUp:function(){this._originalScale&&(this._fromScale.x=this._originalScale.x,this._fromScale.y=this._originalScale.y,this._toScale.x=this._originalScale.x*this.zoomScale,this._toScale.y=this._originalScale.y*this.zoomScale,this.time=0,this._transitionFinished=!1)},_zoomBack:function(){if(this._originalScale){var t=this._getTarget();this._fromScale.x=t.scaleX,this._fromScale.y=t.scaleY,this._toScale.x=this._originalScale.x,this._toScale.y=this._originalScale.y,this.time=0,this._transitionFinished=!1}},_updateTransition:function(t){t===r.COLOR?this._updateColorTransitionImmediately(s.NORMAL):t===r.SPRITE&&this._updateSpriteTransition(s.NORMAL),this._updateState()},_applyTransition:function(t){var e=this.transition;e===r.COLOR?this._updateColorTransition(t):e===r.SPRITE?this._updateSpriteTransition(t):e===r.SCALE&&this._updateScaleTransition(t)},_resizeNodeToTargetNode:!1,_updateDisabledState:function(t){if(this._sprite&&(this.enableAutoGrayEffect||t)){var e=!1;this.transition===r.SPRITE&&this.disabledSprite||(e=this.enableAutoGrayEffect&&!this.interactable),this._switchGrayMaterial(e,this._sprite)}}});cc.Button=e.exports=a}),{"../utils/gray-sprite-state":320,"./CCComponent":148}],147:[(function(t,e){"use strict";var i=t("../camera/CCCamera"),n=t("./CCComponent"),r=cc.Class({name:"cc.Canvas",extends:n,editor:!1,resetInEditor:!1,statics:{instance:null},properties:{_designResolution:cc.size(960,640),designResolution:{get:function(){return cc.size(this._designResolution)},set:function(t){this._designResolution.width=t.width,this._designResolution.height=t.height,this.applySettings()},tooltip:!1},_fitWidth:!1,_fitHeight:!0,fitHeight:{get:function(){return this._fitHeight},set:function(t){this._fitHeight!==t&&(this._fitHeight=t,this.applySettings())},tooltip:!1},fitWidth:{get:function(){return this._fitWidth},set:function(t){this._fitWidth!==t&&(this._fitWidth=t,this.applySettings())},tooltip:!1}},_fitDesignResolution:!1,__preload:function(){if(r.instance)return cc.warnID(6700,this.node.name,r.instance.node.name);r.instance=this,this.applySettings();var t=this.getComponent(cc.Widget);t&&t.updateAlignment()},start:function(){if(!i.main&&cc.game.renderType!==cc.game.RENDER_TYPE_CANVAS){var t=new cc.Node("Main Camera");t.parent=this.node,t.setSiblingIndex(0);var e=t.addComponent(i),n=i.ClearFlags;e.clearFlags=n.COLOR|n.DEPTH|n.STENCIL,e.depth=-1}},onDestroy:function(){r.instance===this&&(r.instance=null)},applySettings:function(){var t,e=cc.ResolutionPolicy;t=this.fitHeight&&this.fitWidth?e.SHOW_ALL:this.fitHeight||this.fitWidth?this.fitWidth?e.FIXED_WIDTH:e.FIXED_HEIGHT:e.NO_BORDER;var i=this._designResolution;cc.view.setDesignResolutionSize(i.width,i.height,t)}});cc.Canvas=e.exports=r}),{"../camera/CCCamera":133,"./CCComponent":148}],148:[(function(t,e){"use strict";var i=t("../platform/CCObject"),n=t("../platform/js"),r=new(t("../platform/id-generater"))("Comp"),s=(i.Flags.IsOnEnableCalled,i.Flags.IsOnLoadCalled),a=!!cc.ActionManager,o=cc.Class({name:"cc.Component",extends:i,ctor:function(){this._id=r.getNewId(),this.__eventTargets=[]},properties:{node:{default:null,visible:!1},name:{get:function(){if(this._name)return this._name;var t=cc.js.getClassName(this),e=t.lastIndexOf(".");return e>=0&&(t=t.slice(e+1)),this.node.name+"<"+t+">"},set:function(t){this._name=t},visible:!1},uuid:{get:function(){return this._id},visible:!1},__scriptAsset:!1,_enabled:!0,enabled:{get:function(){return this._enabled},set:function(t){if(this._enabled!==t&&(this._enabled=t,this.node._activeInHierarchy)){var e=cc.director._compScheduler;t?e.enableComp(this):e.disableComp(this)}},visible:!1,animatable:!0},enabledInHierarchy:{get:function(){return this._enabled&&this.node._activeInHierarchy},visible:!1},_isOnLoadCalled:{get:function(){return this._objFlags&s}}},update:null,lateUpdate:null,__preload:null,onLoad:null,start:null,onEnable:null,onDisable:null,onDestroy:null,onFocusInEditor:null,onLostFocusInEditor:null,resetInEditor:null,addComponent:function(t){return this.node.addComponent(t)},getComponent:function(t){return this.node.getComponent(t)},getComponents:function(t){return this.node.getComponents(t)},getComponentInChildren:function(t){return this.node.getComponentInChildren(t)},getComponentsInChildren:function(t){return this.node.getComponentsInChildren(t)},_getLocalBounds:null,onRestore:null,destroy:function(){this._super()&&this._enabled&&this.node._activeInHierarchy&&cc.director._compScheduler.disableComp(this)},_onPreDestroy:function(){a&&cc.director.getActionManager().removeAllActionsFromTarget(this),this.unscheduleAllCallbacks();for(var t=this.__eventTargets,e=t.length-1;e>=0;--e){var i=t[e];i&&i.targetOff(this)}t.length=0,cc.director._nodeActivator.destroyComp(this),this.node._removeComponent(this)},_instantiate:function(t){return t||(t=cc.instantiate._clone(this,this)),t.node=null,t},schedule:function(t,e,i,n){cc.assertID(t,1619),e=e||0,cc.assertID(e>=0,1620),i=isNaN(i)?cc.macro.REPEAT_FOREVER:i,n=n||0;var r=cc.director.getScheduler(),s=r.isTargetPaused(this);r.schedule(t,this,e,i,n,s)},scheduleOnce:function(t,e){this.schedule(t,0,0,e)},unschedule:function(t){t&&cc.director.getScheduler().unschedule(t,this)},unscheduleAllCallbacks:function(){cc.director.getScheduler().unscheduleAllForTarget(this)}});o._requireComponent=null,o._executionOrder=0,n.value(o,"_registerEditorProps",(function(t,e){var i=e.requireComponent;i&&(t._requireComponent=i);var n=e.executionOrder;n&&"number"==typeof n&&(t._executionOrder=n)})),o.prototype.__scriptUuid="",cc.Component=e.exports=o}),{"../platform/CCObject":244,"../platform/id-generater":255,"../platform/js":259}],149:[(function(){"use strict";cc.Component.EventHandler=cc.Class({name:"cc.ClickEvent",properties:{target:{default:null,type:cc.Node},component:"",_componentId:"",_componentName:{get:function(){return this._genCompIdIfNeeded(),this._compId2Name(this._componentId)},set:function(t){this._componentId=this._compName2Id(t)}},handler:{default:""},customEventData:{default:""}},statics:{emitEvents:function(t){var e;if(arguments.length>0)for(var i=0,n=(e=new Array(arguments.length-1)).length;ip&&(p=m),M>=p&&(m=p,p=M,g=C.getAnchorPoint().y),this.horizontalDirection===o.RIGHT_TO_LEFT&&(w=1-C.anchorX),f=f+h*w*E+h*this.spacingX;var D=h*(1-w)*E;if(e){var B=f+D+h*(h>0?this.paddingRight:this.paddingLeft),I=this.horizontalDirection===o.LEFT_TO_RIGHT&&B>(1-l.x)*t,P=this.horizontalDirection===o.RIGHT_TO_LEFT&&B<-l.x*t;(I||P)&&(M>=p?(0===m&&(m=p),d+=m,m=p):(d+=p,m=M,p=0),f=_+h*(u+w*E),y++)}var R=i(C,d,y);t>=E+this.paddingLeft+this.paddingRight&&s&&C.setPosition(cc.v2(f,R));var O,L=1,F=0===p?M:p;this.verticalDirection===a.TOP_TO_BOTTOM?(v=v||this.node._contentSize.height,(O=R+(L=-1)*(F*g+this.paddingBottom))v&&(v=O)),f+=D}}return v},_getVerticalBaseHeight:function(t){var e=0,i=0;if(this.resizeMode===r.CONTAINER){for(var n=0;np&&(p=m),E>=p&&(m=p,p=E,g=C.getAnchorPoint().x),this.verticalDirection===a.TOP_TO_BOTTOM&&(w=1-C.anchorY),f=f+h*w*M+h*this.spacingY;var D=h*(1-w)*M;if(e){var B=f+D+h*(h>0?this.paddingTop:this.paddingBottom),I=this.verticalDirection===a.BOTTOM_TO_TOP&&B>(1-l.y)*t,P=this.verticalDirection===a.TOP_TO_BOTTOM&&B<-l.y*t;(I||P)&&(E>=p?(0===m&&(m=p),d+=m,m=p):(d+=p,m=E,p=0),f=_+h*(u+w*M),y++)}var R=i(C,d,y);t>=M+(this.paddingTop+this.paddingBottom)&&s&&C.setPosition(cc.v2(R,f));var O,L=1,F=0===p?E:p;this.horizontalDirection===o.RIGHT_TO_LEFT?(L=-1,v=v||this.node._contentSize.width,(O=R+L*(F*g+this.paddingLeft))v&&(v=O)),f+=D}}return v},_doLayoutBasic:function(){for(var t=this.node.children,e=null,i=0;i0&&(this._doLayout(),this._layoutDirty=!1)}});cc.Layout=e.exports=l}),{"../CCNode":72,"./CCComponent":148}],154:[(function(t,e){"use strict";var i=a(t("../../renderer/gfx")),n=a(t("../value-types/mat4")),r=a(t("../value-types/vec2")),s=a(t("../assets/material/material-variant"));function a(t){return t&&t.__esModule?t:{default:t}}var o=t("../utils/misc"),l=t("./CCRenderComponent"),c=t("../renderer/render-flow"),h=t("../graphics/graphics"),u=new r.default,_=new n.default,f=[];function d(t,e,i){f.length=0;for(var n=2*Math.PI/i,r=0;r=0&&o.y>=0&&o.x<=s&&o.y<=a;else if(this.type===p.ELLIPSE){var c=s/2,h=a/2,f=o.x-.5*s,d=o.y-.5*a;l=f*f/(c*c)+d*d/(h*h)<1}return this.inverted&&(l=!l),l},markForRender:function(t){var e=c.FLAG_RENDER|c.FLAG_UPDATE_RENDER_DATA|c.FLAG_POST_RENDER;t?(this.node._renderFlag|=e,this.markForValidate()):t||(this.node._renderFlag&=~e)},disableRender:function(){this.node._renderFlag&=~(c.FLAG_RENDER|c.FLAG_UPDATE_RENDER_DATA|c.FLAG_POST_RENDER)}});cc.Mask=e.exports=m}),{"../../renderer/gfx":371,"../assets/material/material-variant":130,"../graphics/graphics":201,"../renderer/render-flow":271,"../utils/misc":323,"../value-types/mat4":340,"../value-types/vec2":347,"./CCRenderComponent":159}],155:[(function(t,e){"use strict";var i=t("../components/CCRenderComponent"),n=t("../../core/utils/blend-func"),r=cc.Class({name:"cc.MotionStreak",extends:i,mixins:[n],editor:!1,ctor:function(){this._points=[]},properties:{preview:{default:!1,editorOnly:!0,notify:!1,animatable:!1},_fadeTime:1,fadeTime:{get:function(){return this._fadeTime},set:function(t){this._fadeTime=t,this.reset()},animatable:!1,tooltip:!1},_minSeg:1,minSeg:{get:function(){return this._minSeg},set:function(t){this._minSeg=t},animatable:!1,tooltip:!1},_stroke:64,stroke:{get:function(){return this._stroke},set:function(t){this._stroke=t},animatable:!1,tooltip:!1},_texture:{default:null,type:cc.Texture2D},texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this._updateMaterial())},type:cc.Texture2D,animatable:!1,tooltip:!1},_color:cc.Color.WHITE,color:{get:function(){return this._color.clone()},set:function(t){this._color.equals(t)||this._color.set(t)},type:cc.Color,tooltip:!1},_fastMode:!1,fastMode:{get:function(){return this._fastMode},set:function(t){this._fastMode=t},animatable:!1,tooltip:!1}},onEnable:function(){this._super(),this.reset()},_updateMaterial:function(){var t=this.getMaterial(0);t&&t.setProperty("texture",this._texture),n.prototype._updateMaterial.call(this)},onFocusInEditor:!1,onLostFocusInEditor:!1,reset:function(){this._points.length=0,this._assembler&&this._assembler._renderData.clear()},lateUpdate:function(t){this._assembler&&this._assembler.update(this,t)}});cc.MotionStreak=e.exports=r}),{"../../core/utils/blend-func":317,"../components/CCRenderComponent":159}],156:[(function(t,e){"use strict";var i=cc.Enum({Unified:0,Free:1}),n=cc.Enum({Horizontal:0,Vertical:1}),r=cc.Enum({PAGE_TURNING:0}),s=cc.Class({name:"cc.PageView",extends:cc.ScrollView,editor:!1,ctor:function(){this._curPageIdx=0,this._lastPageIdx=0,this._pages=[],this._initContentPos=cc.v2(),this._scrollCenterOffsetX=[],this._scrollCenterOffsetY=[]},properties:{sizeMode:{default:i.Unified,type:i,tooltip:!1,notify:function(){this._syncSizeMode()}},direction:{default:n.Horizontal,type:n,tooltip:!1,notify:function(){this._syncScrollDirection()}},scrollThreshold:{default:.5,type:cc.Float,slide:!0,range:[0,1,.01],tooltip:!1},autoPageTurningThreshold:{default:100,type:cc.Float,tooltip:!1},pageTurningEventTiming:{default:.1,type:cc.Float,range:[0,1,.01],tooltip:!1},indicator:{default:null,type:cc.PageViewIndicator,tooltip:!1,notify:function(){this.indicator&&this.indicator.setPageView(this)}},pageTurningSpeed:{default:.3,type:cc.Float,tooltip:!1},pageEvents:{default:[],type:cc.Component.EventHandler,tooltip:!1}},statics:{SizeMode:i,Direction:n,EventType:r},onEnable:function(){this._super(),this.node.on(cc.Node.EventType.SIZE_CHANGED,this._updateAllPagesSize,this),this.node.on("scroll-ended-with-threshold",this._dispatchPageTurningEvent,this)},onDisable:function(){this._super(),this.node.off(cc.Node.EventType.SIZE_CHANGED,this._updateAllPagesSize,this),this.node.off("scroll-ended-with-threshold",this._dispatchPageTurningEvent,this)},onLoad:function(){this._initPages(),this.indicator&&this.indicator.setPageView(this)},getCurrentPageIndex:function(){return this._curPageIdx},setCurrentPageIndex:function(t){this.scrollToPage(t,!0)},getPages:function(){return this._pages},addPage:function(t){t&&-1===this._pages.indexOf(t)&&this.content&&(this.content.addChild(t),this._pages.push(t),this._updatePageView())},insertPage:function(t,e){e<0||!t||-1!==this._pages.indexOf(t)||!this.content||(e>=this._pages.length?this.addPage(t):(this._pages.splice(e,0,t),this.content.addChild(t),this._updatePageView()))},removePage:function(t){if(t&&this.content){var e=this._pages.indexOf(t);-1!==e?this.removePageAtIndex(e):cc.warnID(4300,t.name)}},removePageAtIndex:function(t){var e=this._pages;if(!(t<0||t>=e.length)){var i=e[t];i&&(this.content.removeChild(i),e.splice(t,1),this._updatePageView())}},removeAllPages:function(){if(this.content){for(var t=this._pages,e=0,i=t.length;e=this._pages.length||(e=void 0!==e?e:.3,this._curPageIdx=t,this.scrollToOffset(this._moveOffsetValue(t),e,!0),this.indicator&&this.indicator._changedState())},getScrollEndedEventTiming:function(){return this.pageTurningEventTiming},_syncScrollDirection:function(){this.horizontal=this.direction===n.Horizontal,this.vertical=this.direction===n.Vertical},_syncSizeMode:function(){if(this.content){var t=this.content.getComponent(cc.Layout);if(t){if(this.sizeMode===i.Free&&this._pages.length>0){var e=this._pages[this._pages.length-1];this.direction===n.Horizontal?(t.paddingLeft=(this._view.width-this._pages[0].width)/2,t.paddingRight=(this._view.width-e.width)/2):this.direction===n.Vertical&&(t.paddingTop=(this._view.height-this._pages[0].height)/2,t.paddingBottom=(this._view.height-e.height)/2)}t.updateLayout()}}},_updatePageView:function(){var t=this.content.getComponent(cc.Layout);t&&t.enabled&&t.updateLayout();var e=this._pages.length;this._curPageIdx>=e&&(this._curPageIdx=0===e?0:e-1,this._lastPageIdx=this._curPageIdx);for(var i=this._initContentPos,r=0;r=0||this._pages.push(i)}this._syncScrollDirection(),this._syncSizeMode(),this._updatePageView()}},_dispatchPageTurningEvent:function(){this._lastPageIdx!==this._curPageIdx&&(this._lastPageIdx=this._curPageIdx,cc.Component.EventHandler.emitEvents(this.pageEvents,this,r.PAGE_TURNING),this.node.emit("page-turning",this))},_isScrollable:function(t,e,r){if(this.sizeMode===i.Free){var s,a;if(this.direction===n.Horizontal)return s=this._scrollCenterOffsetX[e],a=this._scrollCenterOffsetX[r],Math.abs(t.x)>=Math.abs(s-a)*this.scrollThreshold;if(this.direction===n.Vertical)return s=this._scrollCenterOffsetY[e],a=this._scrollCenterOffsetY[r],Math.abs(t.y)>=Math.abs(s-a)*this.scrollThreshold}else{if(this.direction===n.Horizontal)return Math.abs(t.x)>=this._view.width*this.scrollThreshold;if(this.direction===n.Vertical)return Math.abs(t.y)>=this._view.height*this.scrollThreshold}},_isQuicklyScrollable:function(t){if(this.direction===n.Horizontal){if(Math.abs(t.x)>this.autoPageTurningThreshold)return!0}else if(this.direction===n.Vertical&&Math.abs(t.y)>this.autoPageTurningThreshold)return!0;return!1},_moveOffsetValue:function(t){var e=cc.v2(0,0);return this.sizeMode===i.Free?this.direction===n.Horizontal?e.x=this._scrollCenterOffsetX[t]:this.direction===n.Vertical&&(e.y=this._scrollCenterOffsetY[t]):this.direction===n.Horizontal?e.x=t*this._view.width:this.direction===n.Vertical&&(e.y=t*this._view.height),e},_getDragDirection:function(t){return this.direction===n.Horizontal?0===t.x?0:t.x>0?1:-1:this.direction===n.Vertical?0===t.y?0:t.y<0?1:-1:void 0},_handleReleaseLogic:function(){this._autoScrollToPage(),this._scrolling&&(this._scrolling=!1,this._autoScrolling||this._dispatchEvent("scroll-ended"))},_autoScrollToPage:function(){if(this._startBounceBackIfNeeded()){var t=this._getHowMuchOutOfBoundary();((t=this._clampDelta(t)).x>0||t.y<0)&&(this._curPageIdx=0===this._pages.length?0:this._pages.length-1),(t.x<0||t.y>0)&&(this._curPageIdx=0),this.indicator&&this.indicator._changedState()}else{var e=this._touchBeganPosition.sub(this._touchEndPosition),i=this._curPageIdx,n=i+this._getDragDirection(e),r=this.pageTurningSpeed*Math.abs(i-n);if(n=t.length)){for(var i=0;it.length)for(i=0;i0;--i){var n=t[i-1];this.node.removeChild(n),t.splice(i-1,1)}this._layout&&this._layout.enabledInHierarchy&&this._layout.updateLayout(),this._changedState()}}}});cc.PageViewIndicator=e.exports=n}),{"./CCComponent":148}],158:[(function(t,e){"use strict";var i=t("../utils/misc"),n=t("./CCComponent"),r=cc.Enum({HORIZONTAL:0,VERTICAL:1,FILLED:2}),s=cc.Class({name:"cc.ProgressBar",extends:n,editor:!1,_initBarSprite:function(){if(this.barSprite){var t=this.barSprite.node;if(!t)return;var e=this.node.getContentSize(),i=this.node.getAnchorPoint(),n=t.getContentSize();t.parent===this.node&&this.node.setContentSize(n),this.barSprite.fillType===cc.Sprite.FillType.RADIAL&&(this.mode=r.FILLED);var s=t.getContentSize();if(this.mode===r.HORIZONTAL?this.totalLength=s.width:this.mode===r.VERTICAL?this.totalLength=s.height:this.totalLength=this.barSprite.fillRange,t.parent===this.node){var a=-e.width*i.x;t.setPosition(cc.v2(a,0))}}},_updateBarStatus:function(){if(this.barSprite){var t=this.barSprite.node;if(!t)return;var e,n,s,a=t.getAnchorPoint(),o=t.getContentSize(),l=t.getPosition(),c=cc.v2(0,.5),h=i.clamp01(this.progress),u=this.totalLength*h;switch(this.mode){case r.HORIZONTAL:this.reverse&&(c=cc.v2(1,.5)),e=cc.size(u,o.height),n=this.totalLength,s=o.height;break;case r.VERTICAL:c=this.reverse?cc.v2(.5,1):cc.v2(.5,0),e=cc.size(o.width,u),n=o.width,s=this.totalLength}if(this.mode===r.FILLED)this.barSprite.type!==cc.Sprite.Type.FILLED?cc.warn("ProgressBar FILLED mode only works when barSprite's Type is FILLED!"):(this.reverse&&(u*=-1),this.barSprite.fillRange=u);else if(this.barSprite.type!==cc.Sprite.Type.FILLED){var _=c.x-a.x,f=c.y-a.y,d=cc.v2(n*_,s*f);t.setPosition(l.x+d.x,l.y+d.y),t.setAnchorPoint(c),t.setContentSize(e)}else cc.warn("ProgressBar non-FILLED mode only works when barSprite's Type is non-FILLED!")}},properties:{barSprite:{default:null,type:cc.Sprite,tooltip:!1,notify:function(){this._initBarSprite()},animatable:!1},mode:{default:r.HORIZONTAL,type:r,tooltip:!1,notify:function(){if(this.barSprite){var t=this.barSprite.node;if(!t)return;var e=t.getContentSize();this.mode===r.HORIZONTAL?this.totalLength=e.width:this.mode===r.VERTICAL?this.totalLength=e.height:this.mode===r.FILLED&&(this.totalLength=this.barSprite.fillRange)}},animatable:!1},_N$totalLength:1,totalLength:{range:[0,Number.MAX_VALUE],tooltip:!1,get:function(){return this._N$totalLength},set:function(t){this.mode===r.FILLED&&(t=i.clamp01(t)),this._N$totalLength=t,this._updateBarStatus()}},progress:{default:1,type:cc.Float,range:[0,1,.1],slide:!0,tooltip:!1,notify:function(){this._updateBarStatus()}},reverse:{default:!1,tooltip:!1,notify:function(){this.barSprite&&(this.barSprite.fillStart=1-this.barSprite.fillStart),this._updateBarStatus()},animatable:!1}},statics:{Mode:r}});cc.ProgressBar=e.exports=s}),{"../utils/misc":323,"./CCComponent":148}],159:[(function(t,e){"use strict";var i=s(t("../renderer/assembler")),n=s(t("../assets/material/material-variant")),r=t("../value-types");function s(t){return t&&t.__esModule?t:{default:t}}var a=t("./CCComponent"),o=t("../renderer/render-flow"),l=t("../assets/material/CCMaterial"),c=new r.Color,h=cc.Class({name:"RenderComponent",extends:a,editor:!1,properties:{_materials:{default:[],type:l},materials:{get:function(){return this._materials},set:function(t){this._materials=t,this._activateMaterial()},type:[l],displayName:"Materials",animatable:!1}},ctor:function(){this._vertsDirty=!0,this._assembler=null},_resetAssembler:function(){i.default.init(this),this._updateColor(),this.setVertsDirty()},__preload:function(){this._resetAssembler(),this._activateMaterial()},onEnable:function(){this.node._renderComponent&&(this.node._renderComponent.enabled=!1),this.node._renderComponent=this,this.node._renderFlag|=o.FLAG_OPACITY_COLOR,this.setVertsDirty()},onDisable:function(){this.node._renderComponent=null,this.disableRender()},onDestroy:function(){for(var t=this._materials,e=0;e=this._materials.length)return null;var e=this._materials[t];if(!e)return null;var i=n.default.create(e,this);return i!==e&&this.setMaterial(t,i),i},getMaterials:function(){for(var t=this._materials,e=0;eRichText",multiline:!0,tooltip:!1,notify:function(){this._updateRichTextStatus()}},horizontalAlign:{default:a.LEFT,type:a,tooltip:!1,animatable:!1,notify:function(t){this.horizontalAlign!==t&&(this._layoutDirty=!0,this._updateRichTextStatus())}},fontSize:{default:40,tooltip:!1,notify:function(t){this.fontSize!==t&&(this._layoutDirty=!0,this._updateRichTextStatus())}},_fontFamily:"Arial",fontFamily:{tooltip:!1,get:function(){return this._fontFamily},set:function(t){this._fontFamily!==t&&(this._fontFamily=t,this._layoutDirty=!0,this._updateRichTextStatus())},animatable:!1},font:{default:null,type:cc.TTFFont,tooltip:!1,notify:function(t){this.font!==t&&(this._layoutDirty=!0,this.font?(this.useSystemFont=!1,this._onTTFLoaded()):this.useSystemFont=!0,this._updateRichTextStatus())}},_isSystemFontUsed:!0,useSystemFont:{get:function(){return this._isSystemFontUsed},set:function(t){this._isSystemFontUsed!==t&&(this._isSystemFontUsed=t,this._layoutDirty=!0,this._updateRichTextStatus())},animatable:!1,tooltip:!1},cacheMode:{default:l.NONE,type:l,tooltip:!1,notify:function(t){this.cacheMode!==t&&this._updateRichTextStatus()},animatable:!1},maxWidth:{default:0,tooltip:!1,notify:function(t){this.maxWidth!==t&&(this._layoutDirty=!0,this._updateRichTextStatus())}},lineHeight:{default:40,tooltip:!1,notify:function(t){this.lineHeight!==t&&(this._layoutDirty=!0,this._updateRichTextStatus())}},imageAtlas:{default:null,type:cc.SpriteAtlas,tooltip:!1,notify:function(t){this.imageAtlas!==t&&(this._layoutDirty=!0,this._updateRichTextStatus())}},handleTouchEvent:{default:!0,tooltip:!1,notify:function(t){this.handleTouchEvent!==t&&this.enabledInHierarchy&&(this.handleTouchEvent?this._addEventListeners():this._removeEventListeners())}}},statics:{HorizontalAlign:a,VerticalAlign:o},onEnable:function(){this.handleTouchEvent&&this._addEventListeners(),this._updateRichText(),this._activateChildren(!0)},onDisable:function(){this.handleTouchEvent&&this._removeEventListeners(),this._activateChildren(!1)},start:function(){this._onTTFLoaded()},_onColorChanged:function(t){this.node.children.forEach((function(e){e.color=t}))},_addEventListeners:function(){this.node.on(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this),this.node.on(cc.Node.EventType.COLOR_CHANGED,this._onColorChanged,this)},_removeEventListeners:function(){this.node.off(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this),this.node.off(cc.Node.EventType.COLOR_CHANGED,this._onColorChanged,this)},_updateLabelSegmentTextAttributes:function(){this._labelSegments.forEach(function(t){this._applyTextAttribute(t,null,!0)}.bind(this))},_createFontLabel:function(t){return c.get(t,this)},_onTTFLoaded:function(){if(this.font instanceof cc.TTFFont)if(this.font._nativeAsset)this._layoutDirty=!0,this._updateRichText();else{var t=this;cc.assetManager.postLoadNative(this.font,(function(){t._layoutDirty=!0,t._updateRichText()}))}else this._layoutDirty=!0,this._updateRichText()},_measureText:function(t,e){var i=this,n=function(e){var n;return 0===i._labelSegmentsCache.length?(n=i._createFontLabel(e),i._labelSegmentsCache.push(n)):n=i._labelSegmentsCache[0],n._styleIndex=t,i._applyTextAttribute(n,e,!0),n.getContentSize().width};return e?n(e):n},_onTouchEnded:function(t){for(var e=this,i=this.node.getComponents(cc.Component),n=function(n){var r=e._labelSegments[n],s=r._clickHandler,a=r._clickParam;s&&e._containsTouchLocation(r,t.touch.getLocation())&&(i.forEach((function(e){e.enabledInHierarchy&&e[s]&&e[s](t,a)})),t.stopPropagation())},r=0;r=0;e--){var i=t[e];"RICHTEXT_CHILD"!==i.name&&"RICHTEXT_Image_CHILD"!==i.name||(i.parent===this.node?i.parent=null:t.splice(e,1),"RICHTEXT_CHILD"===i.name&&c.put(i))}this._labelSegments.length=0,this._labelSegmentsCache.length=0,this._linesWidth.length=0,this._lineOffsetX=0,this._lineCount=1,this._labelWidth=0,this._labelHeight=0,this._layoutDirty=!0},onRestore:!1,_activateChildren:function(t){for(var e=this.node.children.length-1;e>=0;e--){var i=this.node.children[e];"RICHTEXT_CHILD"!==i.name&&"RICHTEXT_Image_CHILD"!==i.name||(i.active=t)}},_addLabelSegment:function(t,e){var i;return(i=0===this._labelSegmentsCache.length?this._createFontLabel(t):this._labelSegmentsCache.pop())._styleIndex=e,i._lineCount=this._lineCount,i.active=this.node.active,i.setAnchorPoint(0,0),this._applyTextAttribute(i,t),this.node.addChild(i),this._labelSegments.push(i),i},_updateRichTextWithMaxWidth:function(t,e,i){var n=e;if(this._lineOffsetX>0&&n+this._lineOffsetX>this.maxWidth)for(var s=0;this._lineOffsetX<=this.maxWidth;){var a=this._getFirstWordLen(t,s,t.length),o=t.substr(s,a),l=this._measureText(i,o);if(!(this._lineOffsetX+l<=this.maxWidth)){if(s>0){var c=t.substr(0,s);this._addLabelSegment(c,i),t=t.substr(s,t.length),n=this._measureText(i,t)}this._updateLineInfo();break}this._lineOffsetX+=l,s+=a}if(n>this.maxWidth)for(var h=r.fragmentText(t,n,this.maxWidth,this._measureText(i)),u=0;u1&&u0?(o*=a=h/l,l*=a):(o*=a=this.lineHeight/l,l*=a),c>0&&(o=c),this.maxWidth>0?(this._lineOffsetX+o>this.maxWidth&&this._updateLineInfo(),this._lineOffsetX+=o):(this._lineOffsetX+=o,this._lineOffsetX>this._labelWidth&&(this._labelWidth=this._lineOffsetX)),r.spriteFrame=i,n.setContentSize(o,l),n._lineCount=this._lineCount,t.style.event?(t.style.event.click&&(n._clickHandler=t.style.event.click),t.style.event.param?n._clickParam=t.style.event.param:n._clickParam=""):n._clickHandler=null}else cc.warnID(4400)},_updateRichText:function(){if(this.enabledInHierarchy){var t=s.parse(this.string);if(!this._needsUpdateTextLayout(t))return this._textArray=t,void this._updateLabelSegmentTextAttributes();this._textArray=t,this._resetState();for(var e,i=!1,n=0;n0){var u=this._measureText(n,h);this._updateRichTextWithMaxWidth(h,u,n),l.length>1&&cthis._labelWidth&&(this._labelWidth=this._lineOffsetX),l.length>1&&c0&&(this._labelWidth=this.maxWidth),this._labelHeight=(this._lineCount+r.BASELINE_RATIO)*this.lineHeight,this.node.setContentSize(this._labelWidth,this._labelHeight),this._updateRichTextPosition(),this._layoutDirty=!1}},_getFirstWordLen:function(t,e,i){var n=t.charAt(e);if(r.isUnicodeCJK(n)||r.isUnicodeSpace(n))return 1;for(var s=1,a=e+1;ae&&(t=0,e=o);var l=0;switch(this.horizontalAlign){case a.LEFT:l=-this._labelWidth/2;break;case a.CENTER:l=-this._linesWidth[o-1]/2;break;case a.RIGHT:l=this._labelWidth/2-this._linesWidth[o-1]}s.x=t+l;var c=s.getContentSize();if(s.y=this.lineHeight*(i-o)-this._labelHeight/2,o===e&&(t+=c.width),s.getComponent(cc.Sprite)){var h=this.lineHeight,u=this.lineHeight*(1+r.BASELINE_RATIO);switch(s.anchorY){case 1:s.y+=h+(u-h)/2;break;case.5:s.y+=u/2;break;default:s.y+=(u-h)/2}if(s._imageOffset){var _=s._imageOffset.split(",");if(1===_.length&&_[0]){var f=parseFloat(_[0]);Number.isInteger(f)&&(s.y+=f)}else if(2===_.length){var d=parseFloat(_[0]),p=parseFloat(_[1]);Number.isInteger(d)&&(s.x+=d),Number.isInteger(p)&&(s.y+=p)}}}var m=s.getComponent(cc.LabelOutline);m&&m.width&&(s.y=s.y-m.width)}},_convertLiteralColorValue:function(t){var e=t.toUpperCase();return cc.Color[e]?cc.Color[e]:cc.color().fromHEX(t)},_applyTextAttribute:function(t,e,i){var n=t.getComponent(cc.Label);if(n){var r=t._styleIndex,s=null;if(this._textArray[r]&&(s=this._textArray[r].style),s&&s.color?t.color=this._convertLiteralColorValue(s.color):t.color=this.node.color,n.cacheMode=this.cacheMode,this.font instanceof cc.Font&&!this._isSystemFontUsed?n.font=this.font:n.fontFamily=this.fontFamily,n.useSystemFont=this._isSystemFontUsed,n.lineHeight=this.lineHeight,n.enableBold=s&&s.bold,n.enableItalics=s&&s.italic,s&&s.italic&&(t.skewX=12),n.enableUnderline=s&&s.underline,s&&s.outline){var a=t.getComponent(cc.LabelOutline);a||(a=t.addComponent(cc.LabelOutline)),a.color=this._convertLiteralColorValue(s.outline.color),a.width=s.outline.width}s&&s.size?n.fontSize=s.size:n.fontSize=this.fontSize,null!==e&&("string"!=typeof e&&(e=""+e),n.string=e),i&&n._forceUpdateRenderData(),s&&s.event?(s.event.click&&(t._clickHandler=s.event.click),s.event.param?t._clickParam=s.event.param:t._clickParam=""):t._clickHandler=null}},onDestroy:function(){for(var t=0;t0?n:-n)),i*(e/r)},_calculatePosition:function(t,e,r,s,a,o){var l=t-e;a&&(l+=Math.abs(a));var c=0;l&&(c=s/l,c=i.clamp01(c));var h=(r-o)*c;return this.direction===n.VERTICAL?cc.v2(0,h):cc.v2(h,0)},_updateLength:function(t){if(this.handle){var e=this.handle.node,i=e.getContentSize();e.setAnchorPoint(cc.v2(0,0)),this.direction===n.HORIZONTAL?e.setContentSize(t,i.height):e.setContentSize(i.width,t)}},_processAutoHide:function(t){if(this.enableAutoHide&&!(this._autoHideRemainingTime<=0)&&!this._touching&&(this._autoHideRemainingTime-=t,this._autoHideRemainingTime<=this.autoHideTime)){this._autoHideRemainingTime=Math.max(0,this._autoHideRemainingTime);var e=this._opacity*(this._autoHideRemainingTime/this.autoHideTime);this._setOpacity(e)}},start:function(){this.enableAutoHide&&this._setOpacity(0)},hide:function(){this._autoHideRemainingTime=0,this._setOpacity(0)},show:function(){this._autoHideRemainingTime=this.autoHideTime,this._setOpacity(this._opacity)},update:function(t){this._processAutoHide(t)}});cc.Scrollbar=e.exports=r}),{"../utils/misc":323,"./CCComponent":148}],163:[(function(t,e){"use strict";var i=t("../CCNode").EventType,n=cc.v2(),r=cc.v2(),s=function(){return(new Date).getMilliseconds()},a=cc.Enum({SCROLL_TO_TOP:0,SCROLL_TO_BOTTOM:1,SCROLL_TO_LEFT:2,SCROLL_TO_RIGHT:3,SCROLLING:4,BOUNCE_TOP:5,BOUNCE_BOTTOM:6,BOUNCE_LEFT:7,BOUNCE_RIGHT:8,SCROLL_ENDED:9,TOUCH_UP:10,AUTOSCROLL_ENDED_WITH_THRESHOLD:11,SCROLL_BEGAN:12}),o={"scroll-to-top":a.SCROLL_TO_TOP,"scroll-to-bottom":a.SCROLL_TO_BOTTOM,"scroll-to-left":a.SCROLL_TO_LEFT,"scroll-to-right":a.SCROLL_TO_RIGHT,scrolling:a.SCROLLING,"bounce-bottom":a.BOUNCE_BOTTOM,"bounce-left":a.BOUNCE_LEFT,"bounce-right":a.BOUNCE_RIGHT,"bounce-top":a.BOUNCE_TOP,"scroll-ended":a.SCROLL_ENDED,"touch-up":a.TOUCH_UP,"scroll-ended-with-threshold":a.AUTOSCROLL_ENDED_WITH_THRESHOLD,"scroll-began":a.SCROLL_BEGAN},l=cc.Class({name:"cc.ScrollView",extends:t("./CCViewGroup"),editor:!1,ctor:function(){this._topBoundary=0,this._bottomBoundary=0,this._leftBoundary=0,this._rightBoundary=0,this._touchMoveDisplacements=[],this._touchMoveTimeDeltas=[],this._touchMovePreviousTimestamp=0,this._touchMoved=!1,this._autoScrolling=!1,this._autoScrollAttenuate=!1,this._autoScrollStartPosition=cc.v2(0,0),this._autoScrollTargetDelta=cc.v2(0,0),this._autoScrollTotalTime=0,this._autoScrollAccumulatedTime=0,this._autoScrollCurrentlyOutOfBoundary=!1,this._autoScrollBraking=!1,this._autoScrollBrakingStartPosition=cc.v2(0,0),this._outOfBoundaryAmount=cc.v2(0,0),this._outOfBoundaryAmountDirty=!0,this._stopMouseWheel=!1,this._mouseWheelEventElapsedTime=0,this._isScrollEndedWithThresholdEventFired=!1,this._scrollEventEmitMask=0,this._isBouncing=!1,this._scrolling=!1},properties:{content:{default:void 0,type:cc.Node,tooltip:!1,formerlySerializedAs:"content",notify:function(){this._calculateBoundary()}},horizontal:{default:!0,animatable:!1,tooltip:!1},vertical:{default:!0,animatable:!1,tooltip:!1},inertia:{default:!0,tooltip:!1},brake:{default:.5,type:cc.Float,range:[0,1,.1],tooltip:!1},elastic:{default:!0,animatable:!1,tooltip:!1},bounceDuration:{default:1,range:[0,10],tooltip:!1},horizontalScrollBar:{default:void 0,type:cc.Scrollbar,tooltip:!1,notify:function(){this.horizontalScrollBar&&(this.horizontalScrollBar.setTargetScrollView(this),this._updateScrollBar(0))},animatable:!1},verticalScrollBar:{default:void 0,type:cc.Scrollbar,tooltip:!1,notify:function(){this.verticalScrollBar&&(this.verticalScrollBar.setTargetScrollView(this),this._updateScrollBar(0))},animatable:!1},scrollEvents:{default:[],type:cc.Component.EventHandler,tooltip:!1},cancelInnerEvents:{default:!0,animatable:!1,tooltip:!1},_view:{get:function(){if(this.content)return this.content.parent}}},statics:{EventType:a},scrollToBottom:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(0,0),applyToHorizontal:!1,applyToVertical:!0});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i,!0)},scrollToTop:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(0,1),applyToHorizontal:!1,applyToVertical:!0});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i)},scrollToLeft:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(0,0),applyToHorizontal:!0,applyToVertical:!1});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i)},scrollToRight:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(1,0),applyToHorizontal:!0,applyToVertical:!1});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i)},scrollToTopLeft:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(0,1),applyToHorizontal:!0,applyToVertical:!0});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i)},scrollToTopRight:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(1,1),applyToHorizontal:!0,applyToVertical:!0});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i)},scrollToBottomLeft:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(0,0),applyToHorizontal:!0,applyToVertical:!0});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i)},scrollToBottomRight:function(t,e){var i=this._calculateMovePercentDelta({anchor:cc.v2(1,0),applyToHorizontal:!0,applyToVertical:!0});t?this._startAutoScroll(i,t,!1!==e):this._moveContent(i)},scrollToOffset:function(t,e,i){var n=this.getMaxScrollOffset(),r=cc.v2(0,0);0===n.x?r.x=0:r.x=t.x/n.x,0===n.y?r.y=1:r.y=(n.y-t.y)/n.y,this.scrollTo(r,e,i)},getScrollOffset:function(){var t=this._getContentTopBoundary()-this._topBoundary,e=this._getContentLeftBoundary()-this._leftBoundary;return cc.v2(e,t)},getMaxScrollOffset:function(){var t=this._view.getContentSize(),e=this.content.getContentSize(),i=e.width-t.width,n=e.height-t.height;return i=i>=0?i:0,n=n>=0?n:0,cc.v2(i,n)},scrollToPercentHorizontal:function(t,e,i){var n=this._calculateMovePercentDelta({anchor:cc.v2(t,0),applyToHorizontal:!0,applyToVertical:!1});e?this._startAutoScroll(n,e,!1!==i):this._moveContent(n)},scrollTo:function(t,e,i){var n=this._calculateMovePercentDelta({anchor:cc.v2(t),applyToHorizontal:!0,applyToVertical:!0});e?this._startAutoScroll(n,e,!1!==i):this._moveContent(n)},scrollToPercentVertical:function(t,e,i){var n=this._calculateMovePercentDelta({anchor:cc.v2(0,t),applyToHorizontal:!1,applyToVertical:!0});e?this._startAutoScroll(n,e,!1!==i):this._moveContent(n)},stopAutoScroll:function(){this._autoScrolling=!1,this._autoScrollAccumulatedTime=this._autoScrollTotalTime},setContentPosition:function(t){t.fuzzyEquals(this.getContentPosition(),1e-4)||(this.content.setPosition(t),this._outOfBoundaryAmountDirty=!0)},getContentPosition:function(){return this.content.getPosition()},isScrolling:function(){return this._scrolling},isAutoScrolling:function(){return this._autoScrolling},_registerEvent:function(){this.node.on(cc.Node.EventType.TOUCH_START,this._onTouchBegan,this,!0),this.node.on(cc.Node.EventType.TOUCH_MOVE,this._onTouchMoved,this,!0),this.node.on(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this,!0),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this._onTouchCancelled,this,!0),this.node.on(cc.Node.EventType.MOUSE_WHEEL,this._onMouseWheel,this,!0)},_unregisterEvent:function(){this.node.off(cc.Node.EventType.TOUCH_START,this._onTouchBegan,this,!0),this.node.off(cc.Node.EventType.TOUCH_MOVE,this._onTouchMoved,this,!0),this.node.off(cc.Node.EventType.TOUCH_END,this._onTouchEnded,this,!0),this.node.off(cc.Node.EventType.TOUCH_CANCEL,this._onTouchCancelled,this,!0),this.node.off(cc.Node.EventType.MOUSE_WHEEL,this._onMouseWheel,this,!0)},_onMouseWheel:function(t,e){if(this.enabledInHierarchy&&!this._hasNestedViewGroup(t,e)){var i=cc.v2(0,0);this.vertical?i=cc.v2(0,-.1*t.getScrollY()):this.horizontal&&(i=cc.v2(-.1*t.getScrollY(),0)),this._mouseWheelEventElapsedTime=0,this._processDeltaMove(i),this._stopMouseWheel||(this._handlePressLogic(),this.schedule(this._checkMouseWheel,1/60),this._stopMouseWheel=!0),this._stopPropagationIfTargetIsMe(t)}},_checkMouseWheel:function(t){if(!this._getHowMuchOutOfBoundary().fuzzyEquals(cc.v2(0,0),1e-4))return this._processInertiaScroll(),this.unschedule(this._checkMouseWheel),this._dispatchEvent("scroll-ended"),void(this._stopMouseWheel=!1);this._mouseWheelEventElapsedTime+=t,this._mouseWheelEventElapsedTime>.1&&(this._onScrollBarTouchEnded(),this.unschedule(this._checkMouseWheel),this._dispatchEvent("scroll-ended"),this._stopMouseWheel=!1)},_calculateMovePercentDelta:function(t){var e=t.anchor,i=t.applyToHorizontal,n=t.applyToVertical;this._calculateBoundary(),e=e.clampf(cc.v2(0,0),cc.v2(1,1));var r=this._view.getContentSize(),s=this.content.getContentSize(),a=this._getContentBottomBoundary()-this._bottomBoundary;a=-a;var o=this._getContentLeftBoundary()-this._leftBoundary;o=-o;var l=cc.v2(0,0),c=0;return i&&(c=s.width-r.width,l.x=o-c*e.x),n&&(c=s.height-r.height,l.y=a-c*e.y),l},_moveContentToTopLeft:function(t){var e=this.content.getContentSize(),i=this._getContentBottomBoundary()-this._bottomBoundary;i=-i;var n=cc.v2(0,0),r=0,s=this._getContentLeftBoundary()-this._leftBoundary;s=-s,e.height7&&!this._touchMoved&&t.target!==this.node){var n=new cc.Event.EventTouch(t.getTouches(),t.bubbles);n.type=cc.Node.EventType.TOUCH_CANCEL,n.touch=t.touch,n.simulate=!0,t.target.dispatchEvent(n),this._touchMoved=!0}this._stopPropagationIfTargetIsMe(t)}}},_onTouchEnded:function(t,e){if(this.enabledInHierarchy&&!this._hasNestedViewGroup(t,e)){this._dispatchEvent("touch-up");var i=t.touch;this.content&&this._handleReleaseLogic(i),this._touchMoved?t.stopPropagation():this._stopPropagationIfTargetIsMe(t)}},_onTouchCancelled:function(t,e){if(this.enabledInHierarchy&&!this._hasNestedViewGroup(t,e)){if(!t.simulate){var i=t.touch;this.content&&this._handleReleaseLogic(i)}this._stopPropagationIfTargetIsMe(t)}},_processDeltaMove:function(t){this._scrollChildren(t),this._gatherTouchMove(t)},_getLocalAxisAlignDelta:function(t){return this.node.convertToNodeSpaceAR(t.getLocation(),n),this.node.convertToNodeSpaceAR(t.getPreviousLocation(),r),n.sub(r)},_handleMoveLogic:function(t){var e=this._getLocalAxisAlignDelta(t);this._processDeltaMove(e)},_scrollChildren:function(t){var e,i=t=this._clampDelta(t);this.elastic&&(e=this._getHowMuchOutOfBoundary(),i.x*=0===e.x?1:.5,i.y*=0===e.y?1:.5),this.elastic||(e=this._getHowMuchOutOfBoundary(i),i=i.add(e));var n=-1;i.y>0?this.content.y-this.content.anchorY*this.content.height+i.y>=this._bottomBoundary&&(n="scroll-to-bottom"):i.y<0&&this.content.y-this.content.anchorY*this.content.height+this.content.height+i.y<=this._topBoundary&&(n="scroll-to-top"),i.x<0?this.content.x-this.content.anchorX*this.content.width+this.content.width+i.x<=this._rightBoundary&&(n="scroll-to-right"):i.x>0&&this.content.x-this.content.anchorX*this.content.width+i.x>=this._leftBoundary&&(n="scroll-to-left"),this._moveContent(i,!1),0===i.x&&0===i.y||(this._scrolling||(this._scrolling=!0,this._dispatchEvent("scroll-began")),this._dispatchEvent("scrolling")),-1!==n&&this._dispatchEvent(n)},_handlePressLogic:function(){this._autoScrolling&&this._dispatchEvent("scroll-ended"),this._autoScrolling=!1,this._isBouncing=!1,this._touchMovePreviousTimestamp=s(),this._touchMoveDisplacements.length=0,this._touchMoveTimeDeltas.length=0,this._onScrollBarTouchBegan()},_clampDelta:function(t){var e=this.content.getContentSize(),i=this._view.getContentSize();return e.width=5;)this._touchMoveDisplacements.shift(),this._touchMoveTimeDeltas.shift();this._touchMoveDisplacements.push(t);var e=s();this._touchMoveTimeDeltas.push((e-this._touchMovePreviousTimestamp)/1e3),this._touchMovePreviousTimestamp=e},_startBounceBackIfNeeded:function(){if(!this.elastic)return!1;var t=this._getHowMuchOutOfBoundary();if((t=this._clampDelta(t)).fuzzyEquals(cc.v2(0,0),1e-4))return!1;var e=Math.max(this.bounceDuration,0);return this._startAutoScroll(t,e,!0),this._isBouncing||(t.y>0&&this._dispatchEvent("bounce-top"),t.y<0&&this._dispatchEvent("bounce-bottom"),t.x>0&&this._dispatchEvent("bounce-right"),t.x<0&&this._dispatchEvent("bounce-left"),this._isBouncing=!0),!0},_processInertiaScroll:function(){if(!this._startBounceBackIfNeeded()&&this.inertia){var t=this._calculateTouchMoveVelocity();!t.fuzzyEquals(cc.v2(0,0),1e-4)&&this.brake<1&&this._startInertiaScroll(t)}this._onScrollBarTouchEnded()},_handleReleaseLogic:function(t){var e=this._getLocalAxisAlignDelta(t);this._gatherTouchMove(e),this._processInertiaScroll(),this._scrolling&&(this._scrolling=!1,this._autoScrolling||this._dispatchEvent("scroll-ended"))},_isOutOfBoundary:function(){return!this._getHowMuchOutOfBoundary().fuzzyEquals(cc.v2(0,0),1e-4)},_isNecessaryAutoScrollBrake:function(){if(this._autoScrollBraking)return!0;if(this._isOutOfBoundary()){if(!this._autoScrollCurrentlyOutOfBoundary)return this._autoScrollCurrentlyOutOfBoundary=!0,this._autoScrollBraking=!0,this._autoScrollBrakingStartPosition=this.getContentPosition(),!0}else this._autoScrollCurrentlyOutOfBoundary=!1;return!1},getScrollEndedEventTiming:function(){return 1e-4},_processAutoScrolling:function(t){var e=this._isNecessaryAutoScrollBrake(),i=e?.05:1;this._autoScrollAccumulatedTime+=t*(1/i);var n,r=Math.min(1,this._autoScrollAccumulatedTime/this._autoScrollTotalTime);this._autoScrollAttenuate&&(n=r,r=(n-=1)*n*n*n*n+1);var s=this._autoScrollStartPosition.add(this._autoScrollTargetDelta.mul(r)),a=Math.abs(r-1)<=1e-4;if(Math.abs(r-1)<=this.getScrollEndedEventTiming()&&!this._isScrollEndedWithThresholdEventFired&&(this._dispatchEvent("scroll-ended-with-threshold"),this._isScrollEndedWithThresholdEventFired=!0),this.elastic){var o=s.sub(this._autoScrollBrakingStartPosition);e&&(o=o.mul(i)),s=this._autoScrollBrakingStartPosition.add(o)}else{var l=s.sub(this.getContentPosition()),c=this._getHowMuchOutOfBoundary(l);c.fuzzyEquals(cc.v2(0,0),1e-4)||(s=s.add(c),a=!0)}a&&(this._autoScrolling=!1);var h=s.sub(this.getContentPosition());this._moveContent(this._clampDelta(h),a),this._dispatchEvent("scrolling"),this._autoScrolling||(this._isBouncing=!1,this._scrolling=!1,this._dispatchEvent("scroll-ended"))},_startInertiaScroll:function(t){var e=t.mul(.7);this._startAttenuatingAutoScroll(e,t)},_calculateAttenuatedFactor:function(t){return this.brake<=0?1-this.brake:(1-this.brake)*(1/(1+14e-6*t+t*t*8e-9))},_startAttenuatingAutoScroll:function(t,e){var i=this._calculateAutoScrollTimeByInitalSpeed(e.mag()),n=t.normalize(),r=this.content.getContentSize(),s=this._view.getContentSize(),a=r.width-s.width,o=r.height-s.height,l=this._calculateAttenuatedFactor(a),c=this._calculateAttenuatedFactor(o);n=cc.v2(n.x*a*(1-this.brake)*l,n.y*o*c*(1-this.brake));var h=t.mag(),u=n.mag()/h;n=n.add(t),this.brake>0&&u>7&&(u=Math.sqrt(u),n=t.mul(u).add(t)),this.brake>0&&u>3&&(i*=u=3),0===this.brake&&u>1&&(i*=u),this._startAutoScroll(n,i,!0)},_calculateAutoScrollTimeByInitalSpeed:function(t){return Math.sqrt(Math.sqrt(t/5))},_startAutoScroll:function(t,e,i){var n=this._flattenVectorByDirection(t);this._autoScrolling=!0,this._autoScrollTargetDelta=n,this._autoScrollAttenuate=i,this._autoScrollStartPosition=this.getContentPosition(),this._autoScrollTotalTime=e,this._autoScrollAccumulatedTime=0,this._autoScrollBraking=!1,this._isScrollEndedWithThresholdEventFired=!1,this._autoScrollBrakingStartPosition=cc.v2(0,0),this._getHowMuchOutOfBoundary().fuzzyEquals(cc.v2(0,0),1e-4)||(this._autoScrollCurrentlyOutOfBoundary=!0)},_calculateTouchMoveVelocity:function(){var t=0;if((t=this._touchMoveTimeDeltas.reduce((function(t,e){return t+e}),t))<=0||t>=.5)return cc.v2(0,0);var e=cc.v2(0,0);return e=this._touchMoveDisplacements.reduce((function(t,e){return t.add(e)}),e),cc.v2(e.x*(1-this.brake)/t,e.y*(1-this.brake)/t)},_flattenVectorByDirection:function(t){var e=t;return e.x=this.horizontal?e.x:0,e.y=this.vertical?e.y:0,e},_moveContent:function(t,e){var i=this._flattenVectorByDirection(t),n=this.getContentPosition().add(i);this.setContentPosition(n);var r=this._getHowMuchOutOfBoundary();this._updateScrollBar(r),this.elastic&&e&&this._startBounceBackIfNeeded()},_getContentLeftBoundary:function(){return this.getContentPosition().x-this.content.getAnchorPoint().x*this.content.getContentSize().width},_getContentRightBoundary:function(){var t=this.content.getContentSize();return this._getContentLeftBoundary()+t.width},_getContentTopBoundary:function(){var t=this.content.getContentSize();return this._getContentBottomBoundary()+t.height},_getContentBottomBoundary:function(){return this.getContentPosition().y-this.content.getAnchorPoint().y*this.content.getContentSize().height},_getHowMuchOutOfBoundary:function(t){if((t=t||cc.v2(0,0)).fuzzyEquals(cc.v2(0,0),1e-4)&&!this._outOfBoundaryAmountDirty)return this._outOfBoundaryAmount;var e=cc.v2(0,0);return this._getContentLeftBoundary()+t.x>this._leftBoundary?e.x=this._leftBoundary-(this._getContentLeftBoundary()+t.x):this._getContentRightBoundary()+t.xthis._bottomBoundary&&(e.y=this._bottomBoundary-(this._getContentBottomBoundary()+t.y)),t.fuzzyEquals(cc.v2(0,0),1e-4)&&(this._outOfBoundaryAmount=e,this._outOfBoundaryAmountDirty=!1),this._clampDelta(e)},_updateScrollBarState:function(){if(this.content){var t=this.content.getContentSize(),e=this._view.getContentSize();this.verticalScrollBar&&(t.height0&&t[0].check()}},onEnable:function(){this._makeAtLeastOneToggleChecked(),this.node.on("child-added",this._allowOnlyOneToggleChecked,this),this.node.on("child-removed",this._makeAtLeastOneToggleChecked,this)},onDisable:function(){this.node.off("child-added",this._allowOnlyOneToggleChecked,this),this.node.off("child-removed",this._makeAtLeastOneToggleChecked,this)}});t("../platform/js").get(i.prototype,"toggleItems",(function(){return this.node._children.map((function(t){return t.getComponent(cc.Toggle)})).filter(Boolean)})),cc.ToggleContainer=e.exports=i}),{"../platform/js":259}],169:[(function(t,e){"use strict";var i=cc.Class({name:"cc.ToggleGroup",extends:cc.Component,ctor:function(){this._toggleItems=[]},editor:!1,properties:{allowSwitchOff:{tooltip:!1,default:!1},toggleItems:{get:function(){return this._toggleItems}}},updateToggles:function(t){this.enabledInHierarchy&&this._toggleItems.forEach((function(e){t.isChecked&&e!==t&&e.isChecked&&e.enabled&&e._hideCheckMark()}))},addToggle:function(t){-1===this._toggleItems.indexOf(t)&&this._toggleItems.push(t),this._allowOnlyOneToggleChecked()},removeToggle:function(t){var e=this._toggleItems.indexOf(t);e>-1&&this._toggleItems.splice(e,1),this._makeAtLeastOneToggleChecked()},_allowOnlyOneToggleChecked:function(){var t=!1;return this._toggleItems.forEach((function(e){t&&e.enabled&&e._hideCheckMark(),e.isChecked&&e.enabled&&(t=!0)})),t},_makeAtLeastOneToggleChecked:function(){this._allowOnlyOneToggleChecked()||this.allowSwitchOff||this._toggleItems.length>0&&(this._toggleItems[0].isChecked=!0)},start:function(){this._makeAtLeastOneToggleChecked()}}),n=t("../platform/js"),r=!1;n.get(cc,"ToggleGroup",(function(){return r||(cc.errorID(1405,"cc.ToggleGroup","cc.ToggleContainer"),r=!0),i})),e.exports=i}),{"../platform/js":259}],170:[(function(t,e){"use strict";var i=cc.Class({name:"cc.ViewGroup",extends:t("./CCComponent")});cc.ViewGroup=e.exports=i}),{"./CCComponent":148}],171:[(function(t,e){"use strict";var i=t("../base-ui/CCWidgetManager"),n=i.AlignMode,r=i._AlignFlags,s=r.TOP,a=r.MID,o=r.BOT,l=r.LEFT,c=r.CENTER,h=r.RIGHT,u=s|o,_=l|h,f=cc.Class({name:"cc.Widget",extends:t("./CCComponent"),editor:!1,properties:{target:{get:function(){return this._target},set:function(t){this._target=t},type:cc.Node,tooltip:!1},isAlignTop:{get:function(){return(this._alignFlags&s)>0},set:function(t){this._setAlign(s,t)},animatable:!1,tooltip:!1},isAlignVerticalCenter:{get:function(){return(this._alignFlags&a)>0},set:function(t){t?(this.isAlignTop=!1,this.isAlignBottom=!1,this._alignFlags|=a):this._alignFlags&=~a},animatable:!1,tooltip:!1},isAlignBottom:{get:function(){return(this._alignFlags&o)>0},set:function(t){this._setAlign(o,t)},animatable:!1,tooltip:!1},isAlignLeft:{get:function(){return(this._alignFlags&l)>0},set:function(t){this._setAlign(l,t)},animatable:!1,tooltip:!1},isAlignHorizontalCenter:{get:function(){return(this._alignFlags&c)>0},set:function(t){t?(this.isAlignLeft=!1,this.isAlignRight=!1,this._alignFlags|=c):this._alignFlags&=~c},animatable:!1,tooltip:!1},isAlignRight:{get:function(){return(this._alignFlags&h)>0},set:function(t){this._setAlign(h,t)},animatable:!1,tooltip:!1},isStretchWidth:{get:function(){return(this._alignFlags&_)===_},visible:!1},isStretchHeight:{get:function(){return(this._alignFlags&u)===u},visible:!1},top:{get:function(){return this._top},set:function(t){this._top=t},tooltip:!1},bottom:{get:function(){return this._bottom},set:function(t){this._bottom=t},tooltip:!1},left:{get:function(){return this._left},set:function(t){this._left=t},tooltip:!1},right:{get:function(){return this._right},set:function(t){this._right=t},tooltip:!1},horizontalCenter:{get:function(){return this._horizontalCenter},set:function(t){this._horizontalCenter=t},tooltip:!1},verticalCenter:{get:function(){return this._verticalCenter},set:function(t){this._verticalCenter=t},tooltip:!1},isAbsoluteHorizontalCenter:{get:function(){return this._isAbsHorizontalCenter},set:function(t){this._isAbsHorizontalCenter=t},animatable:!1},isAbsoluteVerticalCenter:{get:function(){return this._isAbsVerticalCenter},set:function(t){this._isAbsVerticalCenter=t},animatable:!1},isAbsoluteTop:{get:function(){return this._isAbsTop},set:function(t){this._isAbsTop=t},animatable:!1},isAbsoluteBottom:{get:function(){return this._isAbsBottom},set:function(t){this._isAbsBottom=t},animatable:!1},isAbsoluteLeft:{get:function(){return this._isAbsLeft},set:function(t){this._isAbsLeft=t},animatable:!1},isAbsoluteRight:{get:function(){return this._isAbsRight},set:function(t){this._isAbsRight=t},animatable:!1},alignMode:{default:n.ON_WINDOW_RESIZE,type:n,tooltip:!1},_wasAlignOnce:{default:void 0,formerlySerializedAs:"isAlignOnce"},_target:null,_alignFlags:0,_left:0,_right:0,_top:0,_bottom:0,_verticalCenter:0,_horizontalCenter:0,_isAbsLeft:!0,_isAbsRight:!0,_isAbsTop:!0,_isAbsBottom:!0,_isAbsHorizontalCenter:!0,_isAbsVerticalCenter:!0,_originalWidth:0,_originalHeight:0},statics:{AlignMode:n},onLoad:function(){void 0!==this._wasAlignOnce&&(this.alignMode=this._wasAlignOnce?n.ONCE:n.ALWAYS,this._wasAlignOnce=void 0)},onEnable:function(){i.add(this)},onDisable:function(){i.remove(this)},_validateTargetInDEV:!1,_setAlign:function(t,e){if(e!==(this._alignFlags&t)>0){var i=(t&_)>0;e?(this._alignFlags|=t,i?(this.isAlignHorizontalCenter=!1,this.isStretchWidth&&(this._originalWidth=this.node.width)):(this.isAlignVerticalCenter=!1,this.isStretchHeight&&(this._originalHeight=this.node.height))):(i?this.isStretchWidth&&(this.node.width=this._originalWidth):this.isStretchHeight&&(this.node.height=this._originalHeight),this._alignFlags&=~t)}},updateAlignment:function(){i.updateAlignment(this.node)}});Object.defineProperty(f.prototype,"isAlignOnce",{get:function(){return this.alignMode===n.ONCE},set:function(t){this.alignMode=t?n.ONCE:n.ALWAYS}}),cc.Widget=e.exports=f}),{"../base-ui/CCWidgetManager":132,"./CCComponent":148}],172:[(function(t,e){"use strict";var i=t("../../platform/CCMacro"),n=t("../editbox/EditBoxImplBase"),r=t("../CCLabel"),s=t("./types"),a=s.InputMode,o=s.InputFlag,l=s.KeyboardReturnType;function c(t){return t.charAt(0).toUpperCase()+t.slice(1)}var h=cc.Class({name:"cc.EditBox",extends:cc.Component,editor:!1,properties:{_string:"",string:{tooltip:!1,get:function(){return this._string},set:function(t){t=""+t,this.maxLength>=0&&t.length>=this.maxLength&&(t=t.slice(0,this.maxLength)),this._string=t,this._updateString(t)}},textLabel:{tooltip:!1,default:null,type:r,notify:function(t){this.textLabel&&this.textLabel!==t&&(this._updateTextLabel(),this._updateLabels())}},placeholderLabel:{tooltip:!1,default:null,type:r,notify:function(t){this.placeholderLabel&&this.placeholderLabel!==t&&(this._updatePlaceholderLabel(),this._updateLabels())}},background:{tooltip:!1,default:null,type:cc.Sprite,notify:function(t){this.background&&this.background!==t&&this._updateBackgroundSprite()}},_N$backgroundImage:{default:void 0,type:cc.SpriteFrame},backgroundImage:{get:function(){return this.background?this.background.spriteFrame:null},set:function(t){this.background&&(this.background.spriteFrame=t)}},returnType:{default:l.DEFAULT,tooltip:!1,displayName:"KeyboardReturnType",type:l},_N$returnType:{default:void 0,type:cc.Float},inputFlag:{tooltip:!1,default:o.DEFAULT,type:o,notify:function(){this._updateString(this._string)}},inputMode:{tooltip:!1,default:a.ANY,type:a,notify:function(t){this.inputMode!==t&&(this._updateTextLabel(),this._updatePlaceholderLabel())}},fontSize:{get:function(){return this.textLabel?this.textLabel.fontSize:0},set:function(t){this.textLabel&&(this.textLabel.fontSize=t)}},_N$fontSize:{default:void 0,type:cc.Float},lineHeight:{get:function(){return this.textLabel?this.textLabel.lineHeight:0},set:function(t){this.textLabel&&(this.textLabel.lineHeight=t)}},_N$lineHeight:{default:void 0,type:cc.Float},fontColor:{get:function(){return this.textLabel?this.textLabel.node.color:cc.Color.BLACK},set:function(t){this.textLabel&&(this.textLabel.node.color=t,this.textLabel.node.opacity=t.a)}},_N$fontColor:void 0,placeholder:{tooltip:!1,get:function(){return this.placeholderLabel?this.placeholderLabel.string:""},set:function(t){this.placeholderLabel&&(this.placeholderLabel.string=t)}},_N$placeholder:{default:void 0,type:cc.String},placeholderFontSize:{get:function(){return this.placeholderLabel?this.placeholderLabel.fontSize:0},set:function(t){this.placeholderLabel&&(this.placeholderLabel.fontSize=t)}},_N$placeholderFontSize:{default:void 0,type:cc.Float},placeholderFontColor:{get:function(){return this.placeholderLabel?this.placeholderLabel.node.color:cc.Color.BLACK},set:function(t){this.placeholderLabel&&(this.placeholderLabel.node.color=t,this.placeholderLabel.node.opacity=t.a)}},_N$placeholderFontColor:void 0,maxLength:{tooltip:!1,default:20},_N$maxLength:{default:void 0,type:cc.Float},stayOnTop:{default:!1,notify:function(){cc.warn("editBox.stayOnTop is removed since v2.1.")}},_tabIndex:0,tabIndex:{tooltip:!1,get:function(){return this._tabIndex},set:function(t){this._tabIndex!==t&&(this._tabIndex=t,this._impl&&this._impl.setTabIndex(t))}},editingDidBegan:{default:[],type:cc.Component.EventHandler},textChanged:{default:[],type:cc.Component.EventHandler},editingDidEnded:{default:[],type:cc.Component.EventHandler},editingReturn:{default:[],type:cc.Component.EventHandler}},statics:{_ImplClass:n,KeyboardReturnType:l,InputFlag:o,InputMode:a},_init:function(){this._upgradeComp(),this._isLabelVisible=!0,this.node.on(cc.Node.EventType.SIZE_CHANGED,this._syncSize,this),(this._impl=new h._ImplClass).init(this),this._updateString(this._string),this._syncSize()},_updateBackgroundSprite:function(){var t=this.background;if(!t){var e=this.node.getChildByName("BACKGROUND_SPRITE");e||(e=new cc.Node("BACKGROUND_SPRITE")),(t=e.getComponent(cc.Sprite))||(t=e.addComponent(cc.Sprite)),e.parent=this.node,this.background=t}t.type=cc.Sprite.Type.SLICED,void 0!==this._N$backgroundImage&&(t.spriteFrame=this._N$backgroundImage,this._N$backgroundImage=void 0)},_updateTextLabel:function(){var t=this.textLabel;if(!t){var e=this.node.getChildByName("TEXT_LABEL");e||(e=new cc.Node("TEXT_LABEL")),(t=e.getComponent(r))||(t=e.addComponent(r)),e.parent=this.node,this.textLabel=t}t.node.setAnchorPoint(0,1),t.overflow=r.Overflow.CLAMP,this.inputMode===a.ANY?(t.verticalAlign=i.VerticalTextAlignment.TOP,t.enableWrapText=!0):(t.verticalAlign=i.VerticalTextAlignment.CENTER,t.enableWrapText=!1),t.string=this._updateLabelStringStyle(this._string),void 0!==this._N$fontColor&&(t.node.color=this._N$fontColor,t.node.opacity=this._N$fontColor.a,this._N$fontColor=void 0),void 0!==this._N$fontSize&&(t.fontSize=this._N$fontSize,this._N$fontSize=void 0),void 0!==this._N$lineHeight&&(t.lineHeight=this._N$lineHeight,this._N$lineHeight=void 0)},_updatePlaceholderLabel:function(){var t=this.placeholderLabel;if(!t){var e=this.node.getChildByName("PLACEHOLDER_LABEL");e||(e=new cc.Node("PLACEHOLDER_LABEL")),(t=e.getComponent(r))||(t=e.addComponent(r)),e.parent=this.node,this.placeholderLabel=t}t.node.setAnchorPoint(0,1),t.overflow=r.Overflow.CLAMP,this.inputMode===a.ANY?(t.verticalAlign=i.VerticalTextAlignment.TOP,t.enableWrapText=!0):(t.verticalAlign=i.VerticalTextAlignment.CENTER,t.enableWrapText=!1),t.string=this.placeholder,void 0!==this._N$placeholderFontColor&&(t.node.color=this._N$placeholderFontColor,t.node.opacity=this._N$placeholderFontColor.a,this._N$placeholderFontColor=void 0),void 0!==this._N$placeholderFontSize&&(t.fontSize=this._N$placeholderFontSize,this._N$placeholderFontSize=void 0)},_upgradeComp:function(){void 0!==this._N$returnType&&(this.returnType=this._N$returnType,this._N$returnType=void 0),void 0!==this._N$maxLength&&(this.maxLength=this._N$maxLength,this._N$maxLength=void 0),void 0!==this._N$backgroundImage&&this._updateBackgroundSprite(),void 0===this._N$fontColor&&void 0===this._N$fontSize&&void 0===this._N$lineHeight||this._updateTextLabel(),void 0===this._N$placeholderFontColor&&void 0===this._N$placeholderFontSize||this._updatePlaceholderLabel(),void 0!==this._N$placeholder&&(this.placeholder=this._N$placeholder,this._N$placeholder=void 0)},_syncSize:function(){if(this._impl){var t=this.node.getContentSize();this._impl.setSize(t.width,t.height)}},_showLabels:function(){this._isLabelVisible=!0,this._updateLabels()},_hideLabels:function(){this._isLabelVisible=!1,this.textLabel&&(this.textLabel.node.active=!1),this.placeholderLabel&&(this.placeholderLabel.node.active=!1)},_updateLabels:function(){if(this._isLabelVisible){var t=this._string;this.textLabel&&(this.textLabel.node.active=""!==t),this.placeholderLabel&&(this.placeholderLabel.node.active=""===t)}},_updateString:function(t){var e=this.textLabel;if(e){var i=t;i&&(i=this._updateLabelStringStyle(i)),e.string=i,this._updateLabels()}},_updateLabelStringStyle:function(t,e){var i=this.inputFlag;if(e||i!==o.PASSWORD)i===o.INITIAL_CAPS_ALL_CHARACTERS?t=t.toUpperCase():i===o.INITIAL_CAPS_WORD?t=t.replace(/(?:^|\s)\S/g,(function(t){return t.toUpperCase()})):i===o.INITIAL_CAPS_SENTENCE&&(t=c(t));else{for(var n="",r=t.length,s=0;s=0&&(e.value=e.value.slice(0,n)),t._delegate.editBoxTextChanged(e.value)}},n.onClick=function(){t._editing&&cc.sys.isMobile&&t._adjustWindowScroll()},n.onKeydown=function(i){i.keyCode===r.KEY.enter?(i.stopPropagation(),t._delegate.editBoxEditingReturn(),t._isTextArea||e.blur()):i.keyCode===r.KEY.tab&&(i.stopPropagation(),i.preventDefault(),o.next(t))},n.onBlur=function(){cc.sys.isMobile&&i&&n.compositionEnd(),t._editing=!1,m=null,t._hideDom(),t._delegate.editBoxEditingDidEnded()},e.addEventListener("compositionstart",n.compositionStart),e.addEventListener("compositionend",n.compositionEnd),e.addEventListener("input",n.onInput),e.addEventListener("keydown",n.onKeydown),e.addEventListener("blur",n.onBlur),e.addEventListener("touchstart",n.onClick)},_removeEventListeners:function(){var t=this._elem,e=this._eventListeners;t.removeEventListener("compositionstart",e.compositionStart),t.removeEventListener("compositionend",e.compositionEnd),t.removeEventListener("input",e.onInput),t.removeEventListener("keydown",e.onKeydown),t.removeEventListener("blur",e.onBlur),t.removeEventListener("touchstart",e.onClick),e.compositionStart=null,e.compositionEnd=null,e.onInput=null,e.onKeydown=null,e.onBlur=null,e.onClick=null}})}),{"../../platform/CCMacro":243,"../../platform/utils":262,"../../value-types/mat4":340,"../CCLabel":150,"./tabIndexUtil":175,"./types":176}],175:[(function(t,e){"use strict";e.exports={_tabIndexList:[],add:function(t){var e=this._tabIndexList;-1===e.indexOf(t)&&e.push(t)},remove:function(t){var e=this._tabIndexList,i=e.indexOf(t);-1!==i&&e.splice(i,1)},resort:function(){this._tabIndexList.sort((function(t,e){return t._delegate._tabIndex-e._delegate._tabIndex}))},next:function(t){var e=this._tabIndexList,i=e.indexOf(t);if(t.setFocus(!1),-1!==i){var n=e[i+1];n&&n._delegate._tabIndex>=0&&n.setFocus(!0)}}}}),{}],176:[(function(t,e){"use strict";var i=cc.Enum({DEFAULT:0,DONE:1,SEND:2,SEARCH:3,GO:4,NEXT:5}),n=cc.Enum({ANY:0,EMAIL_ADDR:1,NUMERIC:2,PHONE_NUMBER:3,URL:4,DECIMAL:5,SINGLE_LINE:6}),r=cc.Enum({PASSWORD:0,SENSITIVE:1,INITIAL_CAPS_WORD:2,INITIAL_CAPS_SENTENCE:3,INITIAL_CAPS_ALL_CHARACTERS:4,DEFAULT:5});e.exports={KeyboardReturnType:i,InputMode:n,InputFlag:r}}),{}],177:[(function(t,e){"use strict";t("./CCComponent"),t("./CCComponentEventHandler"),t("./missing-script");var i=t("./SubContextView");i||(i=cc.Class({name:"cc.SubContextView",extends:cc.Component}),cc.SubContextView=cc.WXSubContextView=cc.SwanSubContextView=i);var n=[t("./CCSprite"),t("./CCWidget"),t("./CCCanvas"),t("./CCAudioSource"),t("./CCAnimation"),t("./CCButton"),t("./CCLabel"),t("./CCProgressBar"),t("./CCMask"),t("./CCScrollBar"),t("./CCScrollView"),t("./CCPageViewIndicator"),t("./CCPageView"),t("./CCSlider"),t("./CCLayout"),t("./editbox/CCEditBox"),t("./CCLabelOutline"),t("./CCLabelShadow"),t("./CCRichText"),t("./CCToggleContainer"),t("./CCToggleGroup"),t("./CCToggle"),t("./CCBlockInputEvents"),t("./CCMotionStreak"),t("./CCSafeArea"),i];e.exports=n}),{"./CCAnimation":143,"./CCAudioSource":144,"./CCBlockInputEvents":145,"./CCButton":146,"./CCCanvas":147,"./CCComponent":148,"./CCComponentEventHandler":149,"./CCLabel":150,"./CCLabelOutline":151,"./CCLabelShadow":152,"./CCLayout":153,"./CCMask":154,"./CCMotionStreak":155,"./CCPageView":156,"./CCPageViewIndicator":157,"./CCProgressBar":158,"./CCRichText":160,"./CCSafeArea":161,"./CCScrollBar":162,"./CCScrollView":163,"./CCSlider":164,"./CCSprite":165,"./CCToggle":167,"./CCToggleContainer":168,"./CCToggleGroup":169,"./CCWidget":171,"./SubContextView":void 0,"./editbox/CCEditBox":172,"./missing-script":178}],178:[(function(t,e){"use strict";var i=cc.js,n=cc.Class({name:"cc.MissingScript",extends:cc.Component,editor:{inspector:"packages://inspector/inspectors/comps/missing-script.js"},properties:{compiled:{default:!1,serializable:!1},_$erialized:{default:null,visible:!1,editorOnly:!0}},ctor:!1,statics:{safeFindClass:function(t){return i._getClassById(t)||(cc.deserialize.reportMissingClass(t),n)}},onLoad:function(){cc.warnID(4600,this.node.name)}});cc._MissingScript=e.exports=n}),{}],179:[(function(t,e){"use strict";var i=cc.js;t("../event/event");var n=function(t,e){cc.Event.call(this,cc.Event.MOUSE,e),this._eventType=t,this._button=0,this._x=0,this._y=0,this._prevX=0,this._prevY=0,this._scrollX=0,this._scrollY=0};i.extend(n,cc.Event);var r=n.prototype;r.setScrollData=function(t,e){this._scrollX=t,this._scrollY=e},r.getScrollX=function(){return this._scrollX},r.getScrollY=function(){return this._scrollY},r.setLocation=function(t,e){this._x=t,this._y=e},r.getLocation=function(){return cc.v2(this._x,this._y)},r.getLocationInView=function(){return cc.v2(this._x,cc.view._designResolutionSize.height-this._y)},r._setPrevCursor=function(t,e){this._prevX=t,this._prevY=e},r.getPreviousLocation=function(){return cc.v2(this._prevX,this._prevY)},r.getDelta=function(){return cc.v2(this._x-this._prevX,this._y-this._prevY)},r.getDeltaX=function(){return this._x-this._prevX},r.getDeltaY=function(){return this._y-this._prevY},r.setButton=function(t){this._button=t},r.getButton=function(){return this._button},r.getLocationX=function(){return this._x},r.getLocationY=function(){return this._y},n.NONE=0,n.DOWN=1,n.UP=2,n.MOVE=3,n.SCROLL=4,n.BUTTON_LEFT=0,n.BUTTON_RIGHT=2,n.BUTTON_MIDDLE=1,n.BUTTON_4=3,n.BUTTON_5=4,n.BUTTON_6=5,n.BUTTON_7=6,n.BUTTON_8=7;var s=function(t,e){cc.Event.call(this,cc.Event.TOUCH,e),this._eventCode=0,this._touches=t||[],this.touch=null,this.currentTouch=null};i.extend(s,cc.Event),(r=s.prototype).getEventCode=function(){return this._eventCode},r.getTouches=function(){return this._touches},r._setEventCode=function(t){this._eventCode=t},r._setTouches=function(t){this._touches=t},r.setLocation=function(t,e){this.touch&&this.touch.setTouchInfo(this.touch.getID(),t,e)},r.getLocation=function(){return this.touch?this.touch.getLocation():cc.v2()},r.getLocationInView=function(){return this.touch?this.touch.getLocationInView():cc.v2()},r.getPreviousLocation=function(){return this.touch?this.touch.getPreviousLocation():cc.v2()},r.getStartLocation=function(){return this.touch?this.touch.getStartLocation():cc.v2()},r.getID=function(){return this.touch?this.touch.getID():null},r.getDelta=function(){return this.touch?this.touch.getDelta():cc.v2()},r.getDeltaX=function(){return this.touch?this.touch.getDelta().x:0},r.getDeltaY=function(){return this.touch?this.touch.getDelta().y:0},r.getLocationX=function(){return this.touch?this.touch.getLocationX():0},r.getLocationY=function(){return this.touch?this.touch.getLocationY():0},s.MAX_TOUCHES=5,s.BEGAN=0,s.MOVED=1,s.ENDED=2,s.CANCELED=3;var a=function(t,e){cc.Event.call(this,cc.Event.ACCELERATION,e),this.acc=t};i.extend(a,cc.Event);var o=function(t,e,i){cc.Event.call(this,cc.Event.KEYBOARD,i),this.keyCode=t,this.isPressed=e};i.extend(o,cc.Event),cc.Event.EventMouse=n,cc.Event.EventTouch=s,cc.Event.EventAcceleration=a,cc.Event.EventKeyboard=o,e.exports=cc.Event}),{"../event/event":186}],180:[(function(t,e){"use strict";var i=t("../platform/js");cc.EventListener=function(t,e,i){this._onEvent=i,this._type=t||0,this._listenerID=e||"",this._registered=!1,this._fixedPriority=0,this._node=null,this._target=null,this._paused=!0,this._isEnabled=!0},cc.EventListener.prototype={constructor:cc.EventListener,_setPaused:function(t){this._paused=t},_isPaused:function(){return this._paused},_setRegistered:function(t){this._registered=t},_isRegistered:function(){return this._registered},_getType:function(){return this._type},_getListenerID:function(){return this._listenerID},_setFixedPriority:function(t){this._fixedPriority=t},_getFixedPriority:function(){return this._fixedPriority},_setSceneGraphPriority:function(t){this._target=t,this._node=t},_getSceneGraphPriority:function(){return this._node},checkAvailable:function(){return null!==this._onEvent},clone:function(){return null},setEnabled:function(t){this._isEnabled=t},isEnabled:function(){return this._isEnabled},retain:function(){},release:function(){}},cc.EventListener.UNKNOWN=0,cc.EventListener.TOUCH_ONE_BY_ONE=1,cc.EventListener.TOUCH_ALL_AT_ONCE=2,cc.EventListener.KEYBOARD=3,cc.EventListener.MOUSE=4,cc.EventListener.ACCELERATION=6,cc.EventListener.CUSTOM=8;var n=cc.EventListener.ListenerID={MOUSE:"__cc_mouse",TOUCH_ONE_BY_ONE:"__cc_touch_one_by_one",TOUCH_ALL_AT_ONCE:"__cc_touch_all_at_once",KEYBOARD:"__cc_keyboard",ACCELERATION:"__cc_acceleration"},r=function(t,e){this._onCustomEvent=e,cc.EventListener.call(this,cc.EventListener.CUSTOM,t,this._callback)};i.extend(r,cc.EventListener),i.mixin(r.prototype,{_onCustomEvent:null,_callback:function(t){null!==this._onCustomEvent&&this._onCustomEvent(t)},checkAvailable:function(){return cc.EventListener.prototype.checkAvailable.call(this)&&null!==this._onCustomEvent},clone:function(){return new r(this._listenerID,this._onCustomEvent)}});var s=function(){cc.EventListener.call(this,cc.EventListener.MOUSE,n.MOUSE,this._callback)};i.extend(s,cc.EventListener),i.mixin(s.prototype,{onMouseDown:null,onMouseUp:null,onMouseMove:null,onMouseScroll:null,_callback:function(t){var e=cc.Event.EventMouse;switch(t._eventType){case e.DOWN:this.onMouseDown&&this.onMouseDown(t);break;case e.UP:this.onMouseUp&&this.onMouseUp(t);break;case e.MOVE:this.onMouseMove&&this.onMouseMove(t);break;case e.SCROLL:this.onMouseScroll&&this.onMouseScroll(t)}},clone:function(){var t=new s;return t.onMouseDown=this.onMouseDown,t.onMouseUp=this.onMouseUp,t.onMouseMove=this.onMouseMove,t.onMouseScroll=this.onMouseScroll,t},checkAvailable:function(){return!0}});var a=function(){cc.EventListener.call(this,cc.EventListener.TOUCH_ONE_BY_ONE,n.TOUCH_ONE_BY_ONE,null),this._claimedTouches=[]};i.extend(a,cc.EventListener),i.mixin(a.prototype,{constructor:a,_claimedTouches:null,swallowTouches:!1,onTouchBegan:null,onTouchMoved:null,onTouchEnded:null,onTouchCancelled:null,setSwallowTouches:function(t){this.swallowTouches=t},isSwallowTouches:function(){return this.swallowTouches},clone:function(){var t=new a;return t.onTouchBegan=this.onTouchBegan,t.onTouchMoved=this.onTouchMoved,t.onTouchEnded=this.onTouchEnded,t.onTouchCancelled=this.onTouchCancelled,t.swallowTouches=this.swallowTouches,t},checkAvailable:function(){return!!this.onTouchBegan||(cc.logID(1801),!1)}});var o=function(){cc.EventListener.call(this,cc.EventListener.TOUCH_ALL_AT_ONCE,n.TOUCH_ALL_AT_ONCE,null)};i.extend(o,cc.EventListener),i.mixin(o.prototype,{constructor:o,onTouchesBegan:null,onTouchesMoved:null,onTouchesEnded:null,onTouchesCancelled:null,clone:function(){var t=new o;return t.onTouchesBegan=this.onTouchesBegan,t.onTouchesMoved=this.onTouchesMoved,t.onTouchesEnded=this.onTouchesEnded,t.onTouchesCancelled=this.onTouchesCancelled,t},checkAvailable:function(){return null!==this.onTouchesBegan||null!==this.onTouchesMoved||null!==this.onTouchesEnded||null!==this.onTouchesCancelled||(cc.logID(1802),!1)}});var l=function(t){this._onAccelerationEvent=t,cc.EventListener.call(this,cc.EventListener.ACCELERATION,n.ACCELERATION,this._callback)};i.extend(l,cc.EventListener),i.mixin(l.prototype,{constructor:l,_onAccelerationEvent:null,_callback:function(t){this._onAccelerationEvent(t.acc,t)},checkAvailable:function(){return cc.assertID(this._onAccelerationEvent,1803),!0},clone:function(){return new l(this._onAccelerationEvent)}});var c=function(){cc.EventListener.call(this,cc.EventListener.KEYBOARD,n.KEYBOARD,this._callback)};i.extend(c,cc.EventListener),i.mixin(c.prototype,{constructor:c,onKeyPressed:null,onKeyReleased:null,_callback:function(t){t.isPressed?this.onKeyPressed&&this.onKeyPressed(t.keyCode,t):this.onKeyReleased&&this.onKeyReleased(t.keyCode,t)},clone:function(){var t=new c;return t.onKeyPressed=this.onKeyPressed,t.onKeyReleased=this.onKeyReleased,t},checkAvailable:function(){return null!==this.onKeyPressed||null!==this.onKeyReleased||(cc.logID(1800),!1)}}),cc.EventListener.create=function(t){cc.assertID(t&&t.event,1900);var e=t.event;delete t.event;var i=null;for(var n in e===cc.EventListener.TOUCH_ONE_BY_ONE?i=new a:e===cc.EventListener.TOUCH_ALL_AT_ONCE?i=new o:e===cc.EventListener.MOUSE?i=new s:e===cc.EventListener.CUSTOM?(i=new r(t.eventName,t.callback),delete t.eventName,delete t.callback):e===cc.EventListener.KEYBOARD?i=new c:e===cc.EventListener.ACCELERATION&&(i=new l(t.callback),delete t.callback),t)i[n]=t[n];return i},e.exports=cc.EventListener}),{"../platform/js":259}],181:[(function(t,e){"use strict";var i=t("../platform/js");t("./CCEventListener");var n=cc.EventListener.ListenerID,r=function(){this._fixedListeners=[],this._sceneGraphListeners=[],this.gt0Index=0};r.prototype={constructor:r,size:function(){return this._fixedListeners.length+this._sceneGraphListeners.length},empty:function(){return 0===this._fixedListeners.length&&0===this._sceneGraphListeners.length},push:function(t){0===t._getFixedPriority()?this._sceneGraphListeners.push(t):this._fixedListeners.push(t)},clearSceneGraphListeners:function(){this._sceneGraphListeners.length=0},clearFixedListeners:function(){this._fixedListeners.length=0},clear:function(){this._sceneGraphListeners.length=0,this._fixedListeners.length=0},getFixedPriorityListeners:function(){return this._fixedListeners},getSceneGraphPriorityListeners:function(){return this._sceneGraphListeners}};var s=function(t){var e=cc.Event,i=t.type;return i===e.ACCELERATION?n.ACCELERATION:i===e.KEYBOARD?n.KEYBOARD:i.startsWith(e.MOUSE)?n.MOUSE:(i.startsWith(e.TOUCH)&&cc.logID(2e3),"")},a={DIRTY_NONE:0,DIRTY_FIXED_PRIORITY:1,DIRTY_SCENE_GRAPH_PRIORITY:2,DIRTY_ALL:3,_listenersMap:{},_priorityDirtyFlagMap:{},_nodeListenersMap:{},_toAddedListeners:[],_toRemovedListeners:[],_dirtyListeners:{},_inDispatch:0,_isEnabled:!1,_currentTouch:null,_currentTouchListener:null,_internalCustomListenerIDs:[],_setDirtyForNode:function(t){var e=this._nodeListenersMap[t._id];if(void 0!==e)for(var i=0,n=e.length;i0)for(var s=t._children,a=0,o=s.length;a=0;i--)(e=t[i])._setRegistered(!1),null!=e._getSceneGraphPriority()&&(this._dissociateNodeAndEventListener(e._getSceneGraphPriority(),e),e._setSceneGraphPriority(null)),0===this._inDispatch&&cc.js.array.removeAt(t,i)},_removeListenersForListenerID:function(t){var e,i=this._listenersMap[t];if(i){var n=i.getFixedPriorityListeners(),r=i.getSceneGraphPriorityListeners();this._removeAllListenersInVector(r),this._removeAllListenersInVector(n),delete this._priorityDirtyFlagMap[t],this._inDispatch||(i.clear(),delete this._listenersMap[t])}var s,a=this._toAddedListeners;for(e=a.length-1;e>=0;e--)(s=a[e])&&s._getListenerID()===t&&cc.js.array.removeAt(a,e)},_sortEventListeners:function(t){var e=this.DIRTY_NONE,i=this._priorityDirtyFlagMap;i[t]&&(e=i[t]),e!==this.DIRTY_NONE&&(i[t]=this.DIRTY_NONE,e&this.DIRTY_FIXED_PRIORITY&&this._sortListenersOfFixedPriority(t),e&this.DIRTY_SCENE_GRAPH_PRIORITY&&cc.director.getScene()&&this._sortListenersOfSceneGraphPriority(t))},_sortListenersOfSceneGraphPriority:function(t){var e=this._getListeners(t);if(e){var i=e.getSceneGraphPriorityListeners();i&&0!==i.length&&e.getSceneGraphPriorityListeners().sort(this._sortEventListenersOfSceneGraphPriorityDes)}},_sortEventListenersOfSceneGraphPriorityDes:function(t,e){var i=t._getSceneGraphPriority(),n=e._getSceneGraphPriority();if(!(e&&n&&n._activeInHierarchy&&null!==n._parent))return-1;if(!t||!i||!i._activeInHierarchy||null===i._parent)return 1;for(var r=i,s=n,a=!1;r._parent._id!==s._parent._id;)r=null===r._parent._parent?(a=!0)&&n:r._parent,s=null===s._parent._parent?(a=!0)&&i:s._parent;if(r._id===s._id){if(r._id===n._id)return-1;if(r._id===i._id)return 1}return a?r._localZOrder-s._localZOrder:s._localZOrder-r._localZOrder},_sortListenersOfFixedPriority:function(t){var e=this._listenersMap[t];if(e){var i=e.getFixedPriorityListeners();if(i&&0!==i.length){i.sort(this._sortListenersOfFixedPriorityAsc);for(var n=0,r=i.length;n=0);)++n;e.gt0Index=n}}},_sortListenersOfFixedPriorityAsc:function(t,e){return t._getFixedPriority()-e._getFixedPriority()},_onUpdateListeners:function(t){var e,i,n,r=t.getFixedPriorityListeners(),s=t.getSceneGraphPriorityListeners(),a=this._toRemovedListeners;if(s)for(e=s.length-1;e>=0;e--)(i=s[e])._isRegistered()||(cc.js.array.removeAt(s,e),-1!==(n=a.indexOf(i))&&a.splice(n,1));if(r)for(e=r.length-1;e>=0;e--)(i=r[e])._isRegistered()||(cc.js.array.removeAt(r,e),-1!==(n=a.indexOf(i))&&a.splice(n,1));s&&0===s.length&&t.clearSceneGraphListeners(),r&&0===r.length&&t.clearFixedListeners()},frameUpdateListeners:function(){var t=this._listenersMap,e=this._priorityDirtyFlagMap;for(var i in t)t[i].empty()&&(delete e[i],delete t[i]);var n=this._toAddedListeners;if(0!==n.length){for(var r=0,s=n.length;r0,3508),!(t>1)){var e;(e=this._listenersMap[n.TOUCH_ONE_BY_ONE])&&this._onUpdateListeners(e),(e=this._listenersMap[n.TOUCH_ALL_AT_ONCE])&&this._onUpdateListeners(e),cc.assertID(1===t,3509);var i=this._toAddedListeners;if(0!==i.length){for(var r=0,s=i.length;r0&&-1!==(r=t._claimedTouches.indexOf(n))){if(s=!0,!cc.macro.ENABLE_MULTI_TOUCH&&a._currentTouch&&a._currentTouch!==n)return!1;o===l.MOVED&&t.onTouchMoved?t.onTouchMoved(n,i):o===l.ENDED?(t.onTouchEnded&&t.onTouchEnded(n,i),t._registered&&t._claimedTouches.splice(r,1),a._clearCurTouch()):o===l.CANCELED&&(t.onTouchCancelled&&t.onTouchCancelled(n,i),t._registered&&t._claimedTouches.splice(r,1),a._clearCurTouch())}return i.isStopped()?(a._updateTouchListeners(i),!0):!(!s||!t.swallowTouches||(e.needsMutableSet&&e.touches.splice(n,1),0))},_dispatchTouchEvent:function(t){this._sortEventListeners(n.TOUCH_ONE_BY_ONE),this._sortEventListeners(n.TOUCH_ALL_AT_ONCE);var e=this._getListeners(n.TOUCH_ONE_BY_ONE),i=this._getListeners(n.TOUCH_ALL_AT_ONCE);if(null!==e||null!==i){var r=t.getTouches(),s=cc.js.array.copy(r),a={event:t,needsMutableSet:e&&i,touches:s,selTouch:null};if(e)for(var o=0;o0&&(this._dispatchEventToListeners(i,this._onTouchesEventCallback,{event:t,touches:s}),t.isStopped())||this._updateTouchListeners(t)}},_onTouchesEventCallback:function(t,e){if(!t._registered)return!1;var i=cc.Event.EventTouch,n=e.event,r=e.touches,s=n.getEventCode();return n.currentTarget=t._node,s===i.BEGAN&&t.onTouchesBegan?t.onTouchesBegan(r,n):s===i.MOVED&&t.onTouchesMoved?t.onTouchesMoved(r,n):s===i.ENDED&&t.onTouchesEnded?t.onTouchesEnded(r,n):s===i.CANCELED&&t.onTouchesCancelled&&t.onTouchesCancelled(r,n),!!n.isStopped()&&(a._updateTouchListeners(n),!0)},_associateNodeAndEventListener:function(t,e){var i=this._nodeListenersMap[t._id];i||(i=[],this._nodeListenersMap[t._id]=i),i.push(e)},_dissociateNodeAndEventListener:function(t,e){var i=this._nodeListenersMap[t._id];i&&(cc.js.array.remove(i,e),0===i.length&&delete this._nodeListenersMap[t._id])},_dispatchEventToListeners:function(t,e,i){var n,r,s=!1,a=t.getFixedPriorityListeners(),o=t.getSceneGraphPriorityListeners(),l=0;if(a&&0!==a.length)for(;l=0;l--){var c=o[l];if(c===t){cc.js.array.removeAt(o,l),c._setRegistered(!1);break}}this._currentTouchListener===t&&this._clearCurTouch()}},_clearCurTouch:function(){this._currentTouchListener=null,this._currentTouch=null},_removeListenerInCallback:function(t,e){if(null==t)return!1;for(var i=t.length-1;i>=0;i--){var n=t[i];if(n._onCustomEvent===e||n._onEvent===e)return n._setRegistered(!1),null!=n._getSceneGraphPriority()&&(this._dissociateNodeAndEventListener(n._getSceneGraphPriority(),n),n._setSceneGraphPriority(null)),0===this._inDispatch?cc.js.array.removeAt(t,i):this._toRemovedListeners.push(n),!0}return!1},_removeListenerInVector:function(t,e){if(null==t)return!1;for(var i=t.length-1;i>=0;i--){var n=t[i];if(n===e)return n._setRegistered(!1),null!=n._getSceneGraphPriority()&&(this._dissociateNodeAndEventListener(n._getSceneGraphPriority(),n),n._setSceneGraphPriority(null)),0===this._inDispatch?cc.js.array.removeAt(t,i):this._toRemovedListeners.push(n),!0}return!1},removeListeners:function(t,e){var i=this;if(cc.js.isNumber(t)||t instanceof cc._BaseNode)if(void 0!==t._id){var r,s=i._nodeListenersMap[t._id];if(s){var a=cc.js.array.copy(s);for(r=0;r=0;i--){var n=e[i];n&&this.off(t,n.callback,n.target)}},cc.EventTarget=e.exports=s}),{"../platform/callbacks-invoker":251,"../platform/js":259}],186:[(function(t,e){"use strict";var i=t("../platform/js");cc.Event=function(t,e){this.type=t,this.bubbles=!!e,this.target=null,this.currentTarget=null,this.eventPhase=0,this._propagationStopped=!1,this._propagationImmediateStopped=!1},cc.Event.prototype={constructor:cc.Event,unuse:function(){this.type=cc.Event.NO_TYPE,this.target=null,this.currentTarget=null,this.eventPhase=cc.Event.NONE,this._propagationStopped=!1,this._propagationImmediateStopped=!1},reuse:function(t,e){this.type=t,this.bubbles=e||!1},stopPropagation:function(){this._propagationStopped=!0},stopPropagationImmediate:function(){this._propagationImmediateStopped=!0},isStopped:function(){return this._propagationStopped||this._propagationImmediateStopped},getCurrentTarget:function(){return this.currentTarget},getType:function(){return this.type}},cc.Event.NO_TYPE="no_type",cc.Event.TOUCH="touch",cc.Event.MOUSE="mouse",cc.Event.KEYBOARD="keyboard",cc.Event.ACCELERATION="acceleration",cc.Event.NONE=0,cc.Event.CAPTURING_PHASE=1,cc.Event.AT_TARGET=2,cc.Event.BUBBLING_PHASE=3;var n=function(t,e){cc.Event.call(this,t,e),this.detail=null};i.extend(n,cc.Event),n.prototype.reset=n,n.prototype.setUserData=function(t){this.detail=t},n.prototype.getUserData=function(){return this.detail},n.prototype.getEventName=cc.Event.prototype.getType;var r=new i.Pool(10);n.put=function(t){r.put(t)},n.get=function(t,e){var i=r._get();return i?i.reset(t,e):i=new n(t,e),i},cc.Event.EventCustom=n,e.exports=cc.Event}),{"../platform/js":259}],187:[(function(t){"use strict";t("./event"),t("./event-listeners"),t("./event-target"),t("./system-event")}),{"./event":186,"./event-listeners":184,"./event-target":185,"./system-event":188}],188:[(function(t,e){"use strict";var i=t("../event/event-target"),n=t("../event-manager"),r=t("../platform/CCInputManager"),s=cc.Enum({KEY_DOWN:"keydown",KEY_UP:"keyup",DEVICEMOTION:"devicemotion"}),a=null,o=null,l=cc.Class({name:"SystemEvent",extends:i,statics:{EventType:s},setAccelerometerEnabled:function(t){t&&window.DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission?DeviceMotionEvent.requestPermission().then((function(t){console.log("Device Motion Event request permission: "+t),r.setAccelerometerEnabled("granted"===t)})):r.setAccelerometerEnabled(t)},setAccelerometerInterval:function(t){r.setAccelerometerInterval(t)},on:function(t,e,i,r){this._super(t,e,i,r),t!==s.KEY_DOWN&&t!==s.KEY_UP||(a||(a=cc.EventListener.create({event:cc.EventListener.KEYBOARD,onKeyPressed:function(t,e){e.type=s.KEY_DOWN,cc.systemEvent.dispatchEvent(e)},onKeyReleased:function(t,e){e.type=s.KEY_UP,cc.systemEvent.dispatchEvent(e)}})),n.hasEventListener(cc.EventListener.ListenerID.KEYBOARD)||n.addListener(a,1)),t===s.DEVICEMOTION&&(o||(o=cc.EventListener.create({event:cc.EventListener.ACCELERATION,callback:function(t,e){e.type=s.DEVICEMOTION,cc.systemEvent.dispatchEvent(e)}})),n.hasEventListener(cc.EventListener.ListenerID.ACCELERATION)||n.addListener(o,1))},off:function(t,e,i){if(this._super(t,e,i),a&&(t===s.KEY_DOWN||t===s.KEY_UP)){var r=this.hasEventListener(s.KEY_DOWN),l=this.hasEventListener(s.KEY_UP);r||l||n.removeListener(a)}o&&t===s.DEVICEMOTION&&n.removeListener(o)}});cc.SystemEvent=e.exports=l,cc.systemEvent=new cc.SystemEvent}),{"../event-manager":183,"../event/event-target":185,"../platform/CCInputManager":242}],189:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("../value-types/vec3")),r=a(t("../value-types/mat3")),s=a(t("./enums"));function a(t){return t&&t.__esModule?t:{default:t}}var o=new n.default,l=new n.default,c=new r.default,h=function(t,e,i){var r=c.m,s=i.m;r[0]=Math.abs(s[0]),r[1]=Math.abs(s[1]),r[2]=Math.abs(s[2]),r[3]=Math.abs(s[4]),r[4]=Math.abs(s[5]),r[5]=Math.abs(s[6]),r[6]=Math.abs(s[8]),r[7]=Math.abs(s[9]),r[8]=Math.abs(s[10]),n.default.transformMat3(t,e,c)},u=(function(){function t(t,e,i,r,a,o){this.center=void 0,this.halfExtents=void 0,this._type=void 0,this._type=s.default.SHAPE_AABB,this.center=new n.default(t,e,i),this.halfExtents=new n.default(r,a,o)}t.create=function(e,i,n,r,s,a){return new t(e,i,n,r,s,a)},t.clone=function(e){return new t(e.center.x,e.center.y,e.center.z,e.halfExtents.x,e.halfExtents.y,e.halfExtents.z)},t.copy=function(t,e){return n.default.copy(t.center,e.center),n.default.copy(t.halfExtents,e.halfExtents),t},t.fromPoints=function(t,e,i){return n.default.scale(t.center,n.default.add(o,e,i),.5),n.default.scale(t.halfExtents,n.default.sub(l,i,e),.5),t},t.set=function(t,e,i,r,s,a,o){return n.default.set(t.center,e,i,r),n.default.set(t.halfExtents,s,a,o),t};var e=t.prototype;return e.getBoundary=function(t,e){n.default.sub(t,this.center,this.halfExtents),n.default.add(e,this.center,this.halfExtents)},e.transform=function(t,e,i,r,s){s||(s=this),n.default.transformMat4(s.center,this.center,t),h(s.halfExtents,this.halfExtents,t)},t})();i.default=u,e.exports=i.default}),{"../value-types/mat3":339,"../value-types/vec3":348,"./enums":191}],190:[(function(t,e,i){"use strict";i.__esModule=!0,i.point_plane=_,i.pt_point_plane=function(t,e,i){var r=_(e,i);return n.Vec3.subtract(t,e,n.Vec3.multiplyScalar(t,i.n,r))},i.pt_point_aabb=function(t,e,i){return n.Vec3.copy(t,e),n.Vec3.subtract(l,i.center,i.halfExtents),n.Vec3.add(c,i.center,i.halfExtents),t.x=t.xc.x?c.x:t.x,t.y=t.y>c.x?c.y:t.y,t.z=t.z>c.x?c.z:t.z,t},i.pt_point_obb=function(t,e,i){var l=i.orientation.m;n.Vec3.set(r,l[0],l[1],l[2]),n.Vec3.set(s,l[3],l[4],l[5]),n.Vec3.set(a,l[6],l[7],l[8]),h[0]=r,h[1]=s,h[2]=a,u[0]=i.halfExtents.x,u[1]=i.halfExtents.y,u[2]=i.halfExtents.z,n.Vec3.subtract(o,e,i.center),n.Vec3.set(t,i.center.x,i.center.y,i.center.z);for(var c=0;c<3;c++){var _=n.Vec3.dot(o,h[c]);_>u[c]&&(_=u[c]),_<-u[c]&&(_=-u[c]),t.x+=_*h[c].x,t.y+=_*h[c].y,t.z+=_*h[c].z}return t};var n=t("../value-types"),r=new n.Vec3,s=new n.Vec3,a=new n.Vec3,o=new n.Vec3,l=new n.Vec3,c=new n.Vec3,h=new Array(3),u=new Array(3);function _(t,e){return n.Vec3.dot(e.n,t)-e.d}}),{"../value-types":338}],191:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0,i.default={SHAPE_RAY:1,SHAPE_LINE:2,SHAPE_SPHERE:4,SHAPE_AABB:8,SHAPE_OBB:16,SHAPE_PLANE:32,SHAPE_TRIANGLE:64,SHAPE_FRUSTUM:128,SHAPE_FRUSTUM_ACCURATE:256},e.exports=i.default}),{}],192:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("../value-types"),r=a(t("./enums")),s=a(t("./plane"));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i0&&f=0;r--)t(n[r],i);i(e)}function e(t,e){return t.distance-e.distance}function i(t,e,i){var n=i.m,r=e.x,s=e.y,a=e.z,o=n[3]*r+n[7]*s+n[11]*a;return o=o?1/o:1,t.x=(n[0]*r+n[4]*s+n[8]*a)*o,t.y=(n[1]*r+n[5]*s+n[9]*a)*o,t.z=(n[2]*r+n[6]*s+n[10]*a)*o,t}var n=new r.default(function(){return{distance:0,node:null}},1),o=[],l=a.default.create(),h=new s.Vec3,u=new s.Vec3,_=new c.default,f=cc.mat4(),d=cc.mat4(),p=new s.Vec3;function m(t){return t>0&&t<1/0}return function(r,c,y,v){return n.reset(),o.length=0,t(r=r||cc.director.getScene(),(function(t){if(!v||v(t)){s.Mat4.invert(d,t.getWorldMatrix(f)),s.Vec3.transformMat4(_.o,c.o,d),s.Vec3.normalize(_.d,i(_.d,c.d,d));var e=1/0,r=t._renderComponent;if(r instanceof cc.MeshRenderer?e=V(_,r._boundingBox):t.width&&t.height&&(s.Vec3.set(h,-t.width*t.anchorX,-t.height*t.anchorY,t.z),s.Vec3.set(u,t.width*(1-t.anchorX),t.height*(1-t.anchorY),t.z),a.default.fromPoints(l,h,u),e=V(_,l)),m(e)&&(y&&(e=y(_,t,e)),m(e))){s.Vec3.scale(p,_.d,e),i(p,p,f);var g=n.add();g.node=t,g.distance=s.Vec3.mag(p),o.push(g)}}})),o.sort(e),o}})(),B=(f=new s.Vec3(0,0,0),function(t,e){var i=s.Vec3.dot(t.d,e.n);if(Math.abs(i)1?0:i}),P=(function(){var t=new s.Vec3(0,0,0),e=new s.Vec3(0,0,0),i=new s.Vec3(0,0,0),n=new s.Vec3(0,0,0),r=new s.Vec3(0,0,0);return function(a,o,l){s.Vec3.subtract(t,o.b,o.a),s.Vec3.subtract(e,o.c,o.a),s.Vec3.cross(i,a.d,e);var c=s.Vec3.dot(t,i);if(c-Number.EPSILON))return 0;var h=1/c;s.Vec3.subtract(n,a.o,o.a);var u=s.Vec3.dot(n,i)*h;if(u<0||u>1)return 0;s.Vec3.cross(r,n,t);var _=s.Vec3.dot(a.d,r)*h;if(_<0||u+_>1)return 0;var f=s.Vec3.dot(e,r)*h;return f<0?0:f}})(),R=P,O=(function(){var t=new s.Vec3(0,0,0),e=new s.Vec3(0,0,0),i=new s.Vec3(0,0,0),n=new s.Vec3(0,0,0),r=new s.Vec3(0,0,0),a=new s.Vec3(0,0,0);return function(o,l,c){s.Vec3.subtract(t,l.b,l.a),s.Vec3.subtract(e,l.c,l.a),s.Vec3.subtract(i,o.s,o.e),s.Vec3.cross(r,t,e);var h=s.Vec3.dot(i,r);if(h<=0)return 0;s.Vec3.subtract(n,o.s,l.a);var u=s.Vec3.dot(n,r);if(u<0||u>h)return 0;s.Vec3.cross(a,i,n);var _=s.Vec3.dot(e,a);if(_<0||_>h)return 0;var f=-s.Vec3.dot(t,a);if(f<0||_+f>h)return 0;if(c){var d=1/h,p=1-(_*=d)-(f*=d);s.Vec3.set(c,l.a.x*p+l.b.x*_+l.c.x*f,l.a.y*p+l.b.y*_+l.c.y*f,l.a.z*p+l.b.z*_+l.c.z*f)}return 1}})(),L=(p=new s.Vec3(0,0,0),m=new s.Vec3(0,0,0),y=new s.Vec3(0,0,0),v=new s.Vec3(0,0,0),g=new s.Vec3(0,0,0),b=new s.Vec3(0,0,0),A=new s.Vec3(0,0,0),function(t,e,i,n,r,a,o){s.Vec3.subtract(p,e,t),s.Vec3.subtract(m,i,t),s.Vec3.subtract(y,n,t),s.Vec3.subtract(v,r,t),s.Vec3.cross(b,v,p);var l=s.Vec3.dot(m,b);if(l>=0){var c=-s.Vec3.dot(y,b);if(c<0)return 0;var h=s.Vec3.dot(s.Vec3.cross(A,p,y),m);if(h<0)return 0;if(o){var u=1/(c+l+h);c*=u,l*=u,h*=u,s.Vec3.set(o,i.x*c+n.x*l+r.x*h,i.y*c+n.y*l+r.y*h,i.z*c+n.z*l+r.z*h)}}else{s.Vec3.subtract(g,a,t);var _=s.Vec3.dot(g,b);if(_<0)return 0;var f=s.Vec3.dot(s.Vec3.cross(A,p,m),g);if(f<0)return 0;if(o){var d=1/(_+(l=-l)+f);_*=d,l*=d,f*=d,s.Vec3.set(o,i.x*_+a.x*l+r.x*f,i.y*_+a.y*l+r.y*f,i.z*_+a.z*l+r.z*f)}}return 1}),F=(function(){var t=new s.Vec3(0,0,0);return function(e,i){var n=i.radius,r=i.center,a=e.o,o=e.d,l=n*n;s.Vec3.subtract(t,r,a);var c=t.lengthSqr(),h=s.Vec3.dot(t,o),u=l-(c-h*h);if(u<0)return 0;var _=Math.sqrt(u),f=cp?0:d}),N=V,k=(function(){var t=new s.Vec3,e=new s.Vec3,i=new s.Vec3,n=new s.Vec3,r=new s.Vec3,a=new s.Vec3,o=new s.Vec3,l=new Array(3),c=new Array(3),h=new Array(3),u=new Array(6);return function(_,f){l[0]=f.halfExtents.x,l[1]=f.halfExtents.y,l[2]=f.halfExtents.z,t=f.center,e=_.o,i=_.d;var d=f.orientation.m;s.Vec3.set(n,d[0],d[1],d[2]),s.Vec3.set(r,d[3],d[4],d[5]),s.Vec3.set(a,d[6],d[7],d[8]),s.Vec3.subtract(o,t,e),c[0]=s.Vec3.dot(n,i),c[1]=s.Vec3.dot(r,i),c[2]=s.Vec3.dot(a,i),h[0]=s.Vec3.dot(n,o),h[1]=s.Vec3.dot(r,o),h[2]=s.Vec3.dot(a,o);for(var p=0;p<3;++p){if(0===c[p]){if(-h[p]-l[p]>0||-h[p]+l[p]<0)return 0;c[p]=1e-7}u[2*p+0]=(h[p]+l[p])/c[p],u[2*p+1]=(h[p]-l[p])/c[p]}var m=Math.max(Math.max(Math.min(u[0],u[1]),Math.min(u[2],u[3])),Math.min(u[4],u[5])),y=Math.min(Math.min(Math.max(u[0],u[1]),Math.max(u[2],u[3])),Math.max(u[4],u[5]));return y<0||m>y||m<0?0:m}})(),z=(T=new s.Vec3,S=new s.Vec3,w=new s.Vec3,E=new s.Vec3,function(t,e){return s.Vec3.subtract(T,t.center,t.halfExtents),s.Vec3.add(S,t.center,t.halfExtents),s.Vec3.subtract(w,e.center,e.halfExtents),s.Vec3.add(E,e.center,e.halfExtents),T.x<=E.x&&S.x>=w.x&&T.y<=E.y&&S.y>=w.y&&T.z<=E.z&&S.z>=w.z});function G(t,e,i){s.Vec3.set(i[0],t.x,e.y,e.z),s.Vec3.set(i[1],t.x,e.y,t.z),s.Vec3.set(i[2],t.x,t.y,e.z),s.Vec3.set(i[3],t.x,t.y,t.z),s.Vec3.set(i[4],e.x,e.y,e.z),s.Vec3.set(i[5],e.x,e.y,t.z),s.Vec3.set(i[6],e.x,t.y,e.z),s.Vec3.set(i[7],e.x,t.y,t.z)}function U(t,e,i,n,r,a){s.Vec3.set(a[0],t.x+i.x*e.x+n.x*e.y+r.x*e.z,t.y+i.y*e.x+n.y*e.y+r.y*e.z,t.z+i.z*e.x+n.z*e.y+r.z*e.z),s.Vec3.set(a[1],t.x-i.x*e.x+n.x*e.y+r.x*e.z,t.y-i.y*e.x+n.y*e.y+r.y*e.z,t.z-i.z*e.x+n.z*e.y+r.z*e.z),s.Vec3.set(a[2],t.x+i.x*e.x-n.x*e.y+r.x*e.z,t.y+i.y*e.x-n.y*e.y+r.y*e.z,t.z+i.z*e.x-n.z*e.y+r.z*e.z),s.Vec3.set(a[3],t.x+i.x*e.x+n.x*e.y-r.x*e.z,t.y+i.y*e.x+n.y*e.y-r.y*e.z,t.z+i.z*e.x+n.z*e.y-r.z*e.z),s.Vec3.set(a[4],t.x-i.x*e.x-n.x*e.y-r.x*e.z,t.y-i.y*e.x-n.y*e.y-r.y*e.z,t.z-i.z*e.x-n.z*e.y-r.z*e.z),s.Vec3.set(a[5],t.x+i.x*e.x-n.x*e.y-r.x*e.z,t.y+i.y*e.x-n.y*e.y-r.y*e.z,t.z+i.z*e.x-n.z*e.y-r.z*e.z),s.Vec3.set(a[6],t.x-i.x*e.x+n.x*e.y-r.x*e.z,t.y-i.y*e.x+n.y*e.y-r.y*e.z,t.z-i.z*e.x+n.z*e.y-r.z*e.z),s.Vec3.set(a[7],t.x-i.x*e.x-n.x*e.y+r.x*e.z,t.y-i.y*e.x-n.y*e.y+r.y*e.z,t.z-i.z*e.x-n.z*e.y+r.z*e.z)}function j(t,e){for(var i=s.Vec3.dot(e,t[0]),n=i,r=1;r<8;++r){var a=s.Vec3.dot(e,t[r]);i=an?a:n}return[i,n]}var H,W=(function(){for(var t=new Array(15),e=0;e<15;e++)t[e]=new s.Vec3(0,0,0);for(var i=new Array(8),n=new Array(8),r=0;r<8;r++)i[r]=new s.Vec3(0,0,0),n[r]=new s.Vec3(0,0,0);var a=new s.Vec3,o=new s.Vec3;return function(e,r){var l=r.orientation.m;s.Vec3.set(t[0],1,0,0),s.Vec3.set(t[1],0,1,0),s.Vec3.set(t[2],0,0,1),s.Vec3.set(t[3],l[0],l[1],l[2]),s.Vec3.set(t[4],l[3],l[4],l[5]),s.Vec3.set(t[5],l[6],l[7],l[8]);for(var c=0;c<3;++c)s.Vec3.cross(t[6+3*c],t[c],t[0]),s.Vec3.cross(t[7+3*c],t[c],t[1]),s.Vec3.cross(t[7+3*c],t[c],t[2]);s.Vec3.subtract(a,e.center,e.halfExtents),s.Vec3.add(o,e.center,e.halfExtents),G(a,o,i),U(r.center,r.halfExtents,t[3],t[4],t[5],n);for(var h=0;h<15;++h){var u=j(i,t[h]),_=j(n,t[h]);if(_[0]>u[1]||u[0]>_[1])return 0}return 1}})(),X=function(t,e){var i=t.halfExtents.x*Math.abs(e.n.x)+t.halfExtents.y*Math.abs(e.n.y)+t.halfExtents.z*Math.abs(e.n.z),n=s.Vec3.dot(e.n,t.center);return n+ie.d?0:1},Y=function(t,e){for(var i=0;in.halfExtents.x?e++:t[h].x<-n.halfExtents.x&&i++;if(e===r.vertices.length||i===r.vertices.length)return 0;e=0,i=0;for(var u=0;un.halfExtents.y?e++:t[u].y<-n.halfExtents.y&&i++;if(e===r.vertices.length||i===r.vertices.length)return 0;e=0,i=0;for(var _=0;_n.halfExtents.z?e++:t[_].z<-n.halfExtents.z&&i++;return e===r.vertices.length||i===r.vertices.length?0:1}})(),J=(function(){var t=new s.Vec3(0,0,0),e=new s.Mat3;return function(i,n){return s.Vec3.subtract(t,n,i.center),s.Vec3.transformMat3(t,t,s.Mat3.transpose(e,i.orientation)),r=t,a=i.halfExtents,Math.abs(r.x)e.d?0:1}),K=function(t,e){for(var i=0;ir.halfExtents.x?i++:e<-r.halfExtents.x&&n++;if(i===o.vertices.length||n===o.vertices.length)return 0;i=0,n=0;for(var d=0;dr.halfExtents.y?i++:e<-r.halfExtents.y&&n++;if(i===o.vertices.length||n===o.vertices.length)return 0;i=0,n=0;for(var p=0;pr.halfExtents.z?i++:e<-r.halfExtents.z&&n++;return i===o.vertices.length||n===o.vertices.length?0:1}})(),$=(function(){for(var t=new Array(15),e=0;e<15;e++)t[e]=new s.Vec3(0,0,0);for(var i=new Array(8),n=new Array(8),r=0;r<8;r++)i[r]=new s.Vec3(0,0,0),n[r]=new s.Vec3(0,0,0);return function(e,r){var a=e.orientation.m,o=r.orientation.m;s.Vec3.set(t[0],a[0],a[1],a[2]),s.Vec3.set(t[1],a[3],a[4],a[5]),s.Vec3.set(t[2],a[6],a[7],a[8]),s.Vec3.set(t[3],o[0],o[1],o[2]),s.Vec3.set(t[4],o[3],o[4],o[5]),s.Vec3.set(t[5],o[6],o[7],o[8]);for(var l=0;l<3;++l)s.Vec3.cross(t[6+3*l],t[l],t[0]),s.Vec3.cross(t[7+3*l],t[l],t[1]),s.Vec3.cross(t[7+3*l],t[l],t[2]);U(e.center,e.halfExtents,t[0],t[1],t[2],i),U(r.center,r.halfExtents,t[3],t[4],t[5],n);for(var c=0;c<15;++c){var h=j(i,t[c]),u=j(n,t[c]);if(u[0]>h[1]||h[0]>u[1])return 0}return 1}})(),tt=function(t,e){var i=s.Vec3.dot(e.n,t.center),n=t.radius*e.n.length();return i+ne.d?0:1},et=function(t,e){for(var i=0;ih)){s.Vec3.add(t,l,s.Vec3.multiplyScalar(t,c,o));for(var _=0;_<6;_++)if(_!==r&&_!==r+e[r]){var f=n.planes[_];if(s.Vec3.dot(f.n,t)0&&(t.d=e.d/i),t},t.prototype.transform=function(t){r.Mat4.invert(l,t),r.Mat4.transpose(l,l),r.Vec4.set(c,this.n.x,this.n.y,this.n.z,this.d),r.Vec4.transformMat4(c,c,l),r.Vec3.set(this.n,c.x,c.y,c.z),this.d=c.w},t})();i.default=h,e.exports=i.default}),{"../value-types":338,"./enums":191}],198:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("../value-types"),s=(n=t("./enums"))&&n.__esModule?n:{default:n},a=(function(){function t(t,e,i,n,a,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=-1),this.o=void 0,this.d=void 0,this._type=void 0,this._type=s.default.SHAPE_RAY,this.o=new r.Vec3(t,e,i),this.d=new r.Vec3(n,a,o)}return t.create=function(e,i,n,r,s,a){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=1),new t(e,i,n,r,s,a)},t.clone=function(e){return new t(e.o.x,e.o.y,e.o.z,e.d.x,e.d.y,e.d.z)},t.copy=function(t,e){return r.Vec3.copy(t.o,e.o),r.Vec3.copy(t.d,e.d),t},t.fromPoints=function(t,e,i){return r.Vec3.copy(t.o,e),r.Vec3.normalize(t.d,r.Vec3.subtract(t.d,i,e)),t},t.set=function(t,e,i,n,r,s,a){return t.o.x=e,t.o.y=i,t.o.z=n,t.d.x=r,t.d.y=s,t.d.z=a,t},t.prototype.computeHit=function(t,e){r.Vec3.normalize(t,this.d),r.Vec3.scaleAndAdd(t,this.o,t,e)},t})();i.default=a,e.exports=i.default}),{"../value-types":338,"./enums":191}],199:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("../value-types"),s=(n=t("./enums"))&&n.__esModule?n:{default:n},a=new r.Vec3,o=(function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),this.center=void 0,this.radius=void 0,this._type=void 0,this._type=s.default.SHAPE_SPHERE,this.center=new r.Vec3(t,e,i),this.radius=n}t.create=function(e,i,n,r){return new t(e,i,n,r)},t.clone=function(e){return new t(e.center.x,e.center.y,e.center.z,e.radius)},t.copy=function(t,e){return r.Vec3.copy(t.center,e.center),t.radius=e.radius,t},t.fromPoints=function(t,e,i){return r.Vec3.multiplyScalar(t.center,r.Vec3.add(a,e,i),.5),t.radius=.5*r.Vec3.subtract(a,i,e).len(),t},t.set=function(t,e,i,n,r){return t.center.x=e,t.center.y=i,t.center.z=n,t.radius=r,t};var e=t.prototype;return e.clone=function(){return t.clone(this)},e.copy=function(e){return t.copy(this,e)},e.getBoundary=function(t,e){r.Vec3.set(t,this.center.x-this.radius,this.center.y-this.radius,this.center.z-this.radius),r.Vec3.set(e,this.center.x+this.radius,this.center.y+this.radius,this.center.z+this.radius)},e.transform=function(t,e,i,n,s){r.Vec3.transformMat4(s.center,this.center,t),s.radius=this.radius*n.maxAxis()},e.translateAndRotate=function(t,e,i){r.Vec3.transformMat4(i.center,this.center,t)},e.setScale=function(t,e){e.radius=this.radius*t.maxAxis()},t})();i.default=o,e.exports=i.default}),{"../value-types":338,"./enums":191}],200:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(t("../value-types/vec3")),r=s(t("./enums"));function s(t){return t&&t.__esModule?t:{default:t}}var a=(function(){function t(t,e,i,s,a,o,l,c,h){this.a=void 0,this.b=void 0,this.c=void 0,this._type=void 0,this.a=new n.default(t,e,i),this.b=new n.default(s,a,o),this.c=new n.default(l,c,h),this._type=r.default.SHAPE_TRIANGLE}return t.create=function(e,i,n,r,s,a,o,l,c){return new t(e,i,n,r,s,a,o,l,c)},t.clone=function(e){return new t(e.a.x,e.a.y,e.a.z,e.b.x,e.b.y,e.b.z,e.c.x,e.c.y,e.c.z)},t.copy=function(t,e){return n.default.copy(t.a,e.a),n.default.copy(t.b,e.b),n.default.copy(t.c,e.c),t},t.fromPoints=function(t,e,i,r){return n.default.copy(t.a,e),n.default.copy(t.b,i),n.default.copy(t.c,r),t},t.set=function(t,e,i,n,r,s,a,o,l,c){return t.a.x=e,t.a.y=i,t.a.z=n,t.b.x=r,t.b.y=s,t.b.z=a,t.c.x=o,t.c.y=l,t.c.z=c,t},t})();i.default=a,e.exports=i.default}),{"../value-types/vec3":348,"./enums":191}],201:[(function(t,e){"use strict";var i=t("../components/CCRenderComponent"),n=t("../assets/material/CCMaterial"),r=t("./types"),s=r.LineCap,a=r.LineJoin,o=cc.Class({name:"cc.Graphics",extends:i,editor:!1,ctor:function(){this._impl=new o._Impl(this)},properties:{_lineWidth:2,_strokeColor:cc.Color.BLACK,_lineJoin:a.MITER,_lineCap:s.BUTT,_fillColor:cc.Color.WHITE,_miterLimit:10,lineWidth:{get:function(){return this._lineWidth},set:function(t){this._lineWidth=t,this._impl.lineWidth=t}},lineJoin:{get:function(){return this._lineJoin},set:function(t){this._lineJoin=t,this._impl.lineJoin=t},type:a},lineCap:{get:function(){return this._lineCap},set:function(t){this._lineCap=t,this._impl.lineCap=t},type:s},strokeColor:{get:function(){return this._strokeColor},set:function(t){this._impl.strokeColor=this._strokeColor=cc.color(t)}},fillColor:{get:function(){return this._fillColor},set:function(t){this._impl.fillColor=this._fillColor=cc.color(t)}},miterLimit:{get:function(){return this._miterLimit},set:function(t){this._miterLimit=t,this._impl.miterLimit=t}}},statics:{LineJoin:a,LineCap:s},onRestore:function(){this._impl||(this._impl=new o._Impl(this))},onDestroy:function(){this.clear(!0),this._super(),this._impl=null},_getDefaultMaterial:function(){return n.getBuiltinMaterial("2d-graphics")},_updateMaterial:function(){var t=this._materials[0];t&&(void 0!==t.getDefine("CC_USE_MODEL")&&t.define("CC_USE_MODEL",!0),void 0!==t.getDefine("CC_SUPPORT_standard_derivatives")&&cc.sys.glExtension("OES_standard_derivatives")&&t.define("CC_SUPPORT_standard_derivatives",!0))},moveTo:function(t,e){this._impl.moveTo(t,e)},lineTo:function(t,e){this._impl.lineTo(t,e)},bezierCurveTo:function(t,e,i,n,r,s){this._impl.bezierCurveTo(t,e,i,n,r,s)},quadraticCurveTo:function(t,e,i,n){this._impl.quadraticCurveTo(t,e,i,n)},arc:function(t,e,i,n,r,s){this._impl.arc(t,e,i,n,r,s)},ellipse:function(t,e,i,n){this._impl.ellipse(t,e,i,n)},circle:function(t,e,i){this._impl.circle(t,e,i)},rect:function(t,e,i,n){this._impl.rect(t,e,i,n)},roundRect:function(t,e,i,n,r){this._impl.roundRect(t,e,i,n,r)},fillRect:function(t,e,i,n){this.rect(t,e,i,n),this.fill()},clear:function(t){this._impl.clear(t),this._assembler&&this._assembler.clear(t)},close:function(){this._impl.close()},stroke:function(){this._assembler||this._resetAssembler(),this._assembler.stroke(this)},fill:function(){this._assembler||this._resetAssembler(),this._assembler.fill(this)}});cc.Graphics=e.exports=o,cc.Graphics.Types=r,cc.Graphics.Helper=t("./helper")}),{"../assets/material/CCMaterial":123,"../components/CCRenderComponent":159,"./helper":202,"./types":204}],202:[(function(t,e){"use strict";var i=t("./types").PointFlags,n=Math.PI,r=Math.min,s=Math.max,a=Math.cos,o=Math.sin,l=Math.abs,c=Math.sign,h=.5522847493;e.exports={arc:function(t,e,i,c,h,u,_){var f,d,p,m=0,y=0,v=0,g=0,b=0,A=0,x=0,C=0,T=0,S=0,w=0,E=0,M=0;if(y=u-h,_=_||!1)if(l(y)>=2*n)y=2*n;else for(;y<0;)y+=2*n;else if(l(y)>=2*n)y=2*-n;else for(;y>0;)y-=2*n;for(p=0|s(1,r(l(y)/(.5*n)+.5,5)),v=l(4/3*(1-a(f=y/p/2))/o(f)),_||(v=-v),d=0;d<=p;d++)A=e+(g=a(m=h+y*(d/p)))*c,x=i+(b=o(m))*c,C=-b*c*v,T=g*c*v,0===d?t.moveTo(A,x):t.bezierCurveTo(S+E,w+M,A-C,x-T,A,x),S=A,w=x,E=C,M=T},ellipse:function(t,e,i,n,r){t.moveTo(e-n,i),t.bezierCurveTo(e-n,i+r*h,e-n*h,i+r,e,i+r),t.bezierCurveTo(e+n*h,i+r,e+n,i+r*h,e+n,i),t.bezierCurveTo(e+n,i-r*h,e+n*h,i-r,e,i-r),t.bezierCurveTo(e-n*h,i-r,e-n,i-r*h,e-n,i),t.close()},roundRect:function(t,e,i,n,s,a){if(a<.1)t.rect(e,i,n,s);else{var o=r(a,.5*l(n))*c(n),u=r(a,.5*l(s))*c(s);t.moveTo(e,i+u),t.lineTo(e,i+s-u),t.bezierCurveTo(e,i+s-u*(1-h),e+o*(1-h),i+s,e+o,i+s),t.lineTo(e+n-o,i+s),t.bezierCurveTo(e+n-o*(1-h),i+s,e+n,i+s-u*(1-h),e+n,i+s-u),t.lineTo(e+n,i+u),t.bezierCurveTo(e+n,i+u*(1-h),e+n-o*(1-h),i,e+n-o,i),t.lineTo(e+o,i),t.bezierCurveTo(e+o*(1-h),i,e,i+u*(1-h),e,i+u),t.close()}},tesselateBezier:function t(e,n,r,s,a,o,c,h,u,_,f){var d,p,m,y,v,g,b,A,x,C,T,S,w,E,M,D;_>10||(v=.5*(o+h),g=.5*(c+u),b=.5*((d=.5*(n+s))+(m=.5*(s+o))),A=.5*((p=.5*(r+a))+(y=.5*(a+c))),((M=l((s-h)*(E=u-r)-(a-u)*(w=h-n)))+(D=l((o-h)*E-(c-u)*w)))*(M+D)0){for(var p=new DataView(i,r),m=n,y=l.num,v=0;v0||this.disableRender()},_updateMaterial:function(){var t=this.textures;if(t&&t.length>0)for(var e=this._getDefaultMaterial(),i=0;i>2,f=h.vertexOffset,d=c._vData,p=c._iData;!i.worldMatDirty&&this._worldDatas[n]||this._updateWorldVertices(n,a,r,s,t.node._worldMatrix),d.set(this._worldDatas[n],_);for(var m=0;ms&&(this._accumulator=s);this._accumulator>r;)e.Step(r,i,n),this._accumulator-=r}else{var a=1/cc.game.config.frameRate;e.Step(a,i,n)}this.debugDrawFlags&&(this._checkDebugDrawValid(),this._debugDrawer.clear(),e.DrawDebugData()),this._steping=!1;for(var o=this._delayEvents,l=0,c=o.length;l0){for(var a=n.getPoints(),l=n.getNormals(),c=n.getFractions(),h=[],u=0,d=r.length;u0}function l(t,e,i){return m(t,e,i)>=0}function c(t,e,i){return m(t,e,i)<=0}function h(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function u(t){_(t)||t.reverse()}function _(t){return t.length<3||f(t)>0}function f(t){var e,i=0;for(e=0;eE&&(M=S,E=D)}y=n(T,M,e),v=n(M,T,e)}return(g=g.concat(t(y))).concat(t(v))}for(g.push(e),T=g.length-1;T>=0;T--)0==g[T].length&&g.splice(T,0);return g},ForceCounterClockWise:u,IsCounterClockWise:_}}),{}],216:[(function(t,e){"use strict";var i=t("../CCNode").EventType,n=t("./CCPhysicsTypes").PTM_RATIO,r=t("./CCPhysicsTypes").ANGLE_TO_PHYSICS_ANGLE,s=t("./CCPhysicsTypes").PHYSICS_ANGLE_TO_ANGLE,a=t("./utils").getWorldRotation,o=t("./CCPhysicsTypes").BodyType,l=new b2.Vec2,c=new b2.Vec2,h=cc.Vec2.ZERO,u=cc.Class({name:"cc.RigidBody",extends:cc.Component,editor:!1,properties:{_type:o.Dynamic,_allowSleep:!0,_gravityScale:1,_linearDamping:0,_angularDamping:0,_linearVelocity:cc.v2(0,0),_angularVelocity:0,_fixedRotation:!1,enabled:{get:function(){return this._enabled},set:function(){cc.warnID(8200)},visible:!1,override:!0},enabledContactListener:{default:!1,tooltip:!1},bullet:{default:!1,tooltip:!1},type:{type:o,tooltip:!1,get:function(){return this._type},set:function(t){this._type=t,this._b2Body&&(t===o.Animated?this._b2Body.SetType(o.Kinematic):this._b2Body.SetType(t))}},allowSleep:{tooltip:!1,get:function(){return this._b2Body?this._b2Body.IsSleepingAllowed():this._allowSleep},set:function(t){this._allowSleep=t,this._b2Body&&this._b2Body.SetSleepingAllowed(t)}},gravityScale:{tooltip:!1,get:function(){return this._gravityScale},set:function(t){this._gravityScale=t,this._b2Body&&this._b2Body.SetGravityScale(t)}},linearDamping:{tooltip:!1,get:function(){return this._linearDamping},set:function(t){this._linearDamping=t,this._b2Body&&this._b2Body.SetLinearDamping(this._linearDamping)}},angularDamping:{tooltip:!1,get:function(){return this._angularDamping},set:function(t){this._angularDamping=t,this._b2Body&&this._b2Body.SetAngularDamping(t)}},linearVelocity:{tooltip:!1,type:cc.Vec2,get:function(){var t=this._linearVelocity;if(this._b2Body){var e=this._b2Body.GetLinearVelocity();t.x=e.x*n,t.y=e.y*n}return t},set:function(t){this._linearVelocity=t;var e=this._b2Body;if(e){var i=e.m_linearVelocity;i.Set(t.x/n,t.y/n),e.SetLinearVelocity(i)}}},angularVelocity:{tooltip:!1,get:function(){return this._b2Body?this._b2Body.GetAngularVelocity()*s:this._angularVelocity},set:function(t){this._angularVelocity=t,this._b2Body&&this._b2Body.SetAngularVelocity(t*r)}},fixedRotation:{tooltip:!1,get:function(){return this._fixedRotation},set:function(t){this._fixedRotation=t,this._b2Body&&this._b2Body.SetFixedRotation(t)}},awake:{visible:!1,tooltip:!1,get:function(){return!!this._b2Body&&this._b2Body.IsAwake()},set:function(t){this._b2Body&&this._b2Body.SetAwake(t)}},awakeOnLoad:{default:!0,tooltip:!1,animatable:!1},active:{visible:!1,get:function(){return!!this._b2Body&&this._b2Body.IsActive()},set:function(t){this._b2Body&&this._b2Body.SetActive(t)}}},getLocalPoint:function(t,e){if(e=e||cc.v2(),this._b2Body){l.Set(t.x/n,t.y/n);var i=this._b2Body.GetLocalPoint(l,e);e.x=i.x*n,e.y=i.y*n}return e},getWorldPoint:function(t,e){if(e=e||cc.v2(),this._b2Body){l.Set(t.x/n,t.y/n);var i=this._b2Body.GetWorldPoint(l,e);e.x=i.x*n,e.y=i.y*n}return e},getWorldVector:function(t,e){if(e=e||cc.v2(),this._b2Body){l.Set(t.x/n,t.y/n);var i=this._b2Body.GetWorldVector(l,e);e.x=i.x*n,e.y=i.y*n}return e},getLocalVector:function(t,e){if(e=e||cc.v2(),this._b2Body){l.Set(t.x/n,t.y/n);var i=this._b2Body.GetLocalVector(l,e);e.x=i.x*n,e.y=i.y*n}return e},getWorldPosition:function(t){if(t=t||cc.v2(),this._b2Body){var e=this._b2Body.GetPosition();t.x=e.x*n,t.y=e.y*n}return t},getWorldRotation:function(){return this._b2Body?this._b2Body.GetAngle()*s:0},getLocalCenter:function(t){if(t=t||cc.v2(),this._b2Body){var e=this._b2Body.GetLocalCenter();t.x=e.x*n,t.y=e.y*n}return t},getWorldCenter:function(t){if(t=t||cc.v2(),this._b2Body){var e=this._b2Body.GetWorldCenter();t.x=e.x*n,t.y=e.y*n}return t},getLinearVelocityFromWorldPoint:function(t,e){if(e=e||cc.v2(),this._b2Body){l.Set(t.x/n,t.y/n);var i=this._b2Body.GetLinearVelocityFromWorldPoint(l,e);e.x=i.x*n,e.y=i.y*n}return e},getMass:function(){return this._b2Body?this._b2Body.GetMass():0},getInertia:function(){return this._b2Body?this._b2Body.GetInertia()*n*n:0},getJointList:function(){if(!this._b2Body)return[];var t=[],e=this._b2Body.GetJointList();if(!e)return[];t.push(e.joint._joint);for(var i=e.prev;i;)t.push(i.joint._joint),i=i.prev;for(var n=e.next;n;)t.push(n.joint._joint),n=n.next;return t},applyForce:function(t,e,i){this._b2Body&&(l.Set(t.x/n,t.y/n),c.Set(e.x/n,e.y/n),this._b2Body.ApplyForce(l,c,i))},applyForceToCenter:function(t,e){this._b2Body&&(l.Set(t.x/n,t.y/n),this._b2Body.ApplyForceToCenter(l,e))},applyTorque:function(t,e){this._b2Body&&this._b2Body.ApplyTorque(t/n,e)},applyLinearImpulse:function(t,e,i){this._b2Body&&(l.Set(t.x/n,t.y/n),c.Set(e.x/n,e.y/n),this._b2Body.ApplyLinearImpulse(l,c,i))},applyAngularImpulse:function(t,e){this._b2Body&&this._b2Body.ApplyAngularImpulse(t/n/n,e)},syncPosition:function(t){var e=this._b2Body;if(e){var i,r=this.node.convertToWorldSpaceAR(h);if((i=this.type===o.Animated?e.GetLinearVelocity():e.GetPosition()).x=r.x/n,i.y=r.y/n,this.type===o.Animated&&t){var s=e.GetPosition(),a=cc.game.config.frameRate;i.x=(i.x-s.x)*a,i.y=(i.y-s.y)*a,e.SetAwake(!0),e.SetLinearVelocity(i)}else e.SetTransformVec(i,e.GetAngle())}},syncRotation:function(t){var e=this._b2Body;if(e){var i=r*a(this.node);if(this.type===o.Animated&&t){var n=e.GetAngle(),s=cc.game.config.frameRate;e.SetAwake(!0),e.SetAngularVelocity((i-n)*s)}else e.SetTransformVec(e.GetPosition(),i)}},resetVelocity:function(){var t=this._b2Body;if(t){var e=t.m_linearVelocity;e.Set(0,0),t.SetLinearVelocity(e),t.SetAngularVelocity(0)}},onEnable:function(){this._init()},onDisable:function(){this._destroy()},_registerNodeEvents:function(){var t=this.node;t.on(i.POSITION_CHANGED,this._onNodePositionChanged,this),t.on(i.ROTATION_CHANGED,this._onNodeRotationChanged,this),t.on(i.SCALE_CHANGED,this._onNodeScaleChanged,this)},_unregisterNodeEvents:function(){var t=this.node;t.off(i.POSITION_CHANGED,this._onNodePositionChanged,this),t.off(i.ROTATION_CHANGED,this._onNodeRotationChanged,this),t.off(i.SCALE_CHANGED,this._onNodeScaleChanged,this)},_onNodePositionChanged:function(){this.syncPosition(!0)},_onNodeRotationChanged:function(){this.syncRotation(!0)},_onNodeScaleChanged:function(){if(this._b2Body)for(var t=this.getComponents(cc.PhysicsCollider),e=0;e=0;n--){var r=t[n];r.collider=null,i._unregisterContactFixture(r),e&&e.DestroyFixture(r)}this.body=null,this._fixtures.length=0,this._shapes.length=0,this._inited=!1}},_createShape:function(){},apply:function(){this._destroy(),this._init()},getAABB:function(){for(var t=1e7,e=1e7,n=-1e7,s=-1e7,a=this.body._getBody().GetTransform(),o=this._fixtures,l=0;ln&&(n=r.upperBound.x),r.upperBound.y>s&&(s=r.upperBound.y);t*=i,e*=i,n*=i,s*=i;var _=this._rect;return _.x=t,_.y=e,_.width=n-t,_.height=s-e,_}});cc.PhysicsCollider=e.exports=s}),{"../CCPhysicsTypes":214,"../utils":237}],222:[(function(t,e){"use strict";var i=t("../CCPhysicsTypes").PTM_RATIO,n=t("../CCPolygonSeparator"),r=cc.Class({name:"cc.PhysicsPolygonCollider",extends:cc.PhysicsCollider,mixins:[cc.Collider.Polygon],editor:{menu:!1,inspector:!1,requireComponent:cc.RigidBody},_createShape:function(t){var e=[],r=this.points;r.length>0&&r[0].equals(r[r.length-1])&&(r.length-=1);for(var s=n.ConvexPartition(r),a=this.offset,o=0;o=2?1:n)},i.prototype.getFixtures=function(){return this._fixtures},i.prototype.getPoints=function(){return this._points},i.prototype.getNormals=function(){return this._normals},i.prototype.getFractions=function(){return this._fractions},cc.PhysicsRayCastCallback=e.exports=i}),{}],237:[(function(t,e){"use strict";e.exports={getWorldRotation:function(t){for(var e=t.angle,i=t.parent;i.parent;)e+=i.angle,i=i.parent;return-e},getWorldScale:function(t){for(var e=t.scaleX,i=t.scaleY,n=t.parent;n.parent;)e*=n.scaleX,i*=n.scaleY,n=n.parent;return cc.v2(e,i)},convertToNodeRotation:function(t,e){e-=-t.angle;for(var i=t.parent;i.parent;)e-=-i.angle,i=i.parent;return e}}}),{}],238:[(function(t,e){"use strict";var i=t("./js"),n=t("./CCEnum"),r=t("./utils"),s=(r.isPlainEmptyObj_DEV,r.cloneable_DEV,t("./attribute")),a=s.DELIMETER,o=t("./preprocess-class");t("./requiring-frame");var l=["name","extends","mixins","ctor","__ctor__","properties","statics","editor","__ES6__"];function c(t,e){t.indexOf(e)<0&&t.push(e)}var h={datas:null,push:function(t){if(this.datas)this.datas.push(t);else{this.datas=[t];var e=this;setTimeout((function(){e.init()}),0)}},init:function(){var t=this.datas;if(t){for(var e=0;e0?a:null,!0);var u=o.prototype;if(e&&(h||(i.extend(o,e),u=o.prototype),o.$super=e),n){for(var _=n.length-1;_>=0;_--){var f=n[_];p(u,f.prototype),p(o,f,(function(t){return f.hasOwnProperty(t)&&!0})),M._isCCClass(f)&&p(s.getClassAttrs(o),s.getClassAttrs(f))}u.constructor=o}return h||(u.__initProps__=x),i.setClassName(t,o),o}function y(t,e,n,r){var s=cc.Component,a=cc._RF.peek();if(a&&i.isChildClassOf(e,s)){if(i.isChildClassOf(a.cls,s))return cc.errorID(3615),null;t=t||a.script}var o=m(t,e,n,r);if(a)if(i.isChildClassOf(e,s)){var l=a.uuid;l&&i._setClassId(l,o),a.cls=o}else i.isChildClassOf(a.cls,s)||(a.cls=o);return o}function v(t){for(var e=i.getClassName(t),n=t.constructor,r="new "+e+"(",s=0;s0){var a="].apply(this,arguments);\n";if(1===s)r+="CCClass.__ctors__[0"+a;else{r+="var cs=CCClass.__ctors__;\n";for(var o=0;o=0)){var s=e[r];if("function"==typeof s){var a=i.getPropertyDescriptor(t.prototype,r);if(a){var o=a.value;if("function"==typeof o){S.test(s)&&(n=!0,e[r]=(function(t,e){return function(){var i=this._super;this._super=t;var n=e.apply(this,arguments);return this._super=i,n}})(o,s));continue}}}}return n}function E(t,e,i,n,r,l){if(t.__props__=[],n&&n.__props__&&(t.__props__=n.__props__.slice()),r)for(var c=0;c=0)){var f=t[_];o.validateMethodWithProps(f,_,e,s,n)&&i.value(s.prototype,_,f,!0,!0)}var d=t.editor;return d&&i.isChildClassOf(n,cc.Component)&&cc.Component._registerEditorProps(s,d),s}/xyz/.test((function(){xyz})),M._isCCClass=function(t){return t&&t.hasOwnProperty("__ctors__")},M._fastDefine=function(t,e,n){i.setClassName(t,e);for(var r=e.__props__=e.__values__=Object.keys(n),o=s.getClassAttrs(e),l=0;l=2&&((o||c())[l+"min"]=_[0],o[l+"max"]=_[1],_.length>2&&(o[l+"step"]=_[2])),u("min","number"),u("max","number"),u("step","number")}cc.Class=M,e.exports={isArray:function(t){return t=d(t),Array.isArray(t)},fastDefine:M._fastDefine,getNewValueTypeCode:v,IDENTIFIER_RE:A,escapeForJS:g,getDefault:d}}),{"./CCEnum":240,"./attribute":250,"./js":259,"./preprocess-class":260,"./requiring-frame":261,"./utils":262}],239:[(function(t,e){"use strict";t("./CCClass");var i=t("./preprocess-class"),n=t("./js"),r="__ccclassCache__";function s(t){return t}function a(t,e){return t[e]||(t[e]={})}function o(t){return function(e){return"function"==typeof e?t(e):function(i){return t(i,e)}}}function l(t,e){return function(t){return function(i){return e(i,t)}}}var c=l.bind(null,!1);function h(){return l.bind(null,!1)}var u=h(),_=h();function f(t){return a(t,r)}function d(t){var e;try{e=t()}catch(i){return t}return"object"!=typeof e||null===e?e:t}function p(t){var e;try{e=new t}catch(i){return{}}return e}function m(t,e,r,s,a,o){var l,c=a&&(a.get||a.set);s&&(l=i.getFullFormOfProperty(s,c));var h=e[r],u=n.mixin(h||{},l||s||{});if(c)a.get&&(u.get=a.get),a.set&&(u.set=a.set);else{var _=void 0;if(a)a.initializer&&(_=d(a.initializer));else{var f=o.default||(o.default=p(t));f.hasOwnProperty(r)&&(_=f[r])}u.default=_}e[r]=u}var y=o((function(t,e){var i=n.getSuper(t);i===Object&&(i=null);var s={name:e,extends:i,ctor:t,__ES6__:!0},a=t[r];if(a){var o=a.proto;o&&n.mixin(s,o),t[r]=void 0}return cc.Class(s)}));function v(t,e,i){return t((function(t,n){var r=f(t);if(r){var s=void 0!==i?i:n,o=a(r,"proto");a(o,"editor")[e]=s}}),e)}function g(t){return t(s)}var b=g(o),A=v(c,"requireComponent"),x=g(u),C=v(_,"executionOrder"),T=g(o),S=g(o),w=g(u),E=g(u),M=g(u);cc._decorator=e.exports={ccclass:y,property:function(t,e,i){var n=null;function r(t,e,i){var r=f(t.constructor);if(r){var s=a(r,"proto"),o=a(s,"properties");m(t.constructor,o,e,n,i,r)}}if(void 0===e)return n=t,r;r(t,e,i)},executeInEditMode:b,requireComponent:A,menu:x,executionOrder:C,disallowMultiple:T,playOnFocus:S,inspector:w,icon:E,help:M,mixins:function(){for(var t=[],e=0;es)return this._removeUsedIndexBit(i),delete this._touchesIntegerDict[n.getID()],i;t>>=1}return-1},_removeUsedIndexBit:function(t){if(!(t<0||t>=this._maxTouches)){var e=1<0){this._glView._convertTouchesWithScale(a);var _=new cc.Event.EventTouch(a);_._eventCode=cc.Event.EventTouch.BEGAN,r.dispatchEvent(_)}},handleTouchesMove:function(t){for(var e,i,s,a=[],o=this._touches,l=n.now(),c=0,h=t.length;c0){this._glView._convertTouchesWithScale(a);var u=new cc.Event.EventTouch(a);u._eventCode=cc.Event.EventTouch.MOVED,r.dispatchEvent(u)}},handleTouchesEnd:function(t){var e=this.getSetOfTouchesEndOrCancel(t);if(e.length>0){this._glView._convertTouchesWithScale(e);var i=new cc.Event.EventTouch(e);i._eventCode=cc.Event.EventTouch.ENDED,r.dispatchEvent(i)}this._preTouchPool.length=0},handleTouchesCancel:function(t){var e=this.getSetOfTouchesEndOrCancel(t);if(e.length>0){this._glView._convertTouchesWithScale(e);var i=new cc.Event.EventTouch(e);i._eventCode=cc.Event.EventTouch.CANCELED,r.dispatchEvent(i)}this._preTouchPool.length=0},getSetOfTouchesEndOrCancel:function(t){for(var e,i,n,r=[],s=this._touches,a=this._touchesIntegerDict,o=0,l=t.length;o=0;r--)if(i[r].getID()===n){e=i[r];break}return e||(e=t),e},setPreTouch:function(t){for(var e=!1,i=this._preTouchPool,n=t.getID(),r=i.length-1;r>=0;r--)if(i[r].getID()===n){i[r]=t,e=!0;break}e||(i.length<=50?i.push(t):(i[this._preTouchPoolPointer]=t,this._preTouchPoolPointer=(this._preTouchPoolPointer+1)%50))},getTouchByXY:function(t,e,i){var n=this._preTouchPoint,r=this._glView.convertToLocationInView(t,e,i),s=new cc.Touch(r.x,r.y,0);return s._setPrevPoint(n.x,n.y),n.x=r.x,n.y=r.y,s},getMouseEvent:function(t,e,i){var n=this._prevMousePoint,r=new cc.Event.EventMouse(i);return r._setPrevCursor(n.x,n.y),n.x=t.x,n.y=t.y,this._glView._convertMouseToLocationInView(n,e),r.setLocation(n.x,n.y),r},getPointByEvent:function(t,e){return cc.sys.browserType!==cc.sys.BROWSER_TYPE_QQ&&cc.sys.browserType!==cc.sys.BROWSER_TYPE_UC&&cc.sys.browserType!==cc.sys.BROWSER_TYPE_SAFARI||this._updateCanvasBoundingRect(),null!=t.pageX?{x:t.pageX,y:t.pageY}:(e.left-=document.body.scrollLeft,e.top-=document.body.scrollTop,{x:t.clientX,y:t.clientY})},getTouchesByEvent:function(t,e){for(var i,r,s,o=[],l=this._glView,c=this._preTouchPoint,h=t.changedTouches.length,u=0;uthis._accelInterval&&(this._accelCurTime-=this._accelInterval,r.dispatchEvent(new cc.Event.EventAcceleration(this._acceleration))),this._accelCurTime+=t}};e.exports=cc.internal.inputManager=o}),{"../event-manager":183,"./CCMacro":243,"./CCSys":247}],243:[(function(t,e){"use strict";cc.macro={RAD:Math.PI/180,DEG:180/Math.PI,REPEAT_FOREVER:Number.MAX_VALUE-1,FLT_EPSILON:1.192092896e-7,MIN_ZINDEX:-Math.pow(2,15),MAX_ZINDEX:Math.pow(2,15)-1,ONE:1,ZERO:0,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,DST_ALPHA:772,DST_COLOR:774,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ORIENTATION_PORTRAIT:1,ORIENTATION_LANDSCAPE:2,ORIENTATION_AUTO:3,DENSITYDPI_DEVICE:"device-dpi",DENSITYDPI_HIGH:"high-dpi",DENSITYDPI_MEDIUM:"medium-dpi",DENSITYDPI_LOW:"low-dpi",FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX:!0,DIRECTOR_STATS_POSITION:cc.v2(0,0),ENABLE_STACKABLE_ACTIONS:!0,TOUCH_TIMEOUT:5e3,BATCH_VERTEX_COUNT:2e4,ENABLE_TILEDMAP_CULLING:!0,ENABLE_TRANSPARENT_CANVAS:!1,ENABLE_WEBGL_ANTIALIAS:!1,ENABLE_CULLING:!1,CLEANUP_IMAGE_CACHE:!1,SHOW_MESH_WIREFRAME:!1,SHOW_MESH_NORMAL:!1,ENABLE_MULTI_TOUCH:!0,ALLOW_IMAGE_BITMAP:!cc.sys.isMobile,ENABLE_NATIVE_TTF_RENDERER:!0},Object.defineProperty(cc.macro,"ROTATE_ACTION_CCW",{set:function(t){cc.RotateTo&&cc.RotateBy&&(cc.RotateTo._reverse=cc.RotateBy._reverse=t)}}),cc.macro.SUPPORT_TEXTURE_FORMATS=[".pkm",".pvr",".webp",".jpg",".jpeg",".bmp",".png"],cc.macro.KEY={none:0,back:6,menu:18,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pause:19,capslock:20,escape:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,select:41,insert:45,Delete:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,num0:96,num1:97,num2:98,num3:99,num4:100,num5:101,num6:102,num7:103,num8:104,num9:105,"*":106,"+":107,"-":109,numdel:110,"/":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,numlock:144,scrolllock:145,";":186,semicolon:186,equal:187,"=":187,",":188,comma:188,dash:189,".":190,period:190,forwardslash:191,grave:192,"[":219,openbracket:219,backslash:220,"]":221,closebracket:221,quote:222,dpadLeft:1e3,dpadRight:1001,dpadUp:1003,dpadDown:1004,dpadCenter:1005},cc.macro.ImageFormat=cc.Enum({JPG:0,PNG:1,TIFF:2,WEBP:3,PVR:4,ETC:5,S3TC:6,ATITC:7,TGA:8,RAWDATA:9,UNKNOWN:10}),cc.macro.BlendFactor=cc.Enum({ONE:1,ZERO:0,SRC_ALPHA:770,SRC_COLOR:768,DST_ALPHA:772,DST_COLOR:774,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775}),cc.macro.TextAlignment=cc.Enum({LEFT:0,CENTER:1,RIGHT:2}),cc.macro.VerticalTextAlignment=cc.Enum({TOP:0,CENTER:1,BOTTOM:2}),e.exports=cc.macro}),{}],244:[(function(t,e){"use strict";var i=t("./js"),n=t("./CCClass"),r=1;function s(){this._name="",this._objFlags=0}n.fastDefine("cc.Object",s,{_name:"",_objFlags:0}),i.value(s,"Flags",{Destroyed:r,DontSave:8,EditorOnly:16,Dirty:32,DontDestroy:64,PersistentMask:-4192741,Destroying:128,Deactivating:256,LockedInEditor:512,HideInHierarchy:1024,IsPreloadStarted:8192,IsOnLoadStarted:32768,IsOnLoadCalled:16384,IsOnEnableCalled:2048,IsStartCalled:65536,IsEditorOnEnableCalled:4096,IsPositionLocked:1<<21,IsRotationLocked:1<<17,IsScaleLocked:1<<18,IsAnchorLocked:1<<19,IsSizeLocked:1<<20});var a=[];i.value(s,"_deferredDestroy",(function(){for(var t=a.length,e=0;e0)return void(t.webkitEnterFullscreen&&t.webkitEnterFullscreen());t.setAttribute("x5-video-player-fullscreen","true")}if(this._supportsFullScreen){if(t=t||document.documentElement,e){var n=this._fn.fullscreenchange;this._onfullscreenchange&&document.removeEventListener(n,this._onfullscreenchange),this._onfullscreenchange=e,document.addEventListener(n,e,!1)}if(i){var r=this._fn.fullscreenerror;this._onfullscreenerror&&document.removeEventListener(r,this._onfullscreenerror),this._onfullscreenerror=i,document.addEventListener(r,i,{once:!0})}var s=t[this._fn.requestFullscreen]();void 0===document[this._fn.fullscreenerror]&&window.Promise&&s instanceof Promise&&s.catch((function(){}))}},exitFullScreen:function(t){if(t&&"video"===t.tagName.toLowerCase()){if(cc.sys.os===cc.sys.OS_IOS&&cc.sys.isBrowser)return void(t.webkitExitFullscreen&&t.webkitExitFullscreen());t.setAttribute("x5-video-player-fullscreen","false")}return!this._supportsFullScreen||document[this._fn.exitFullscreen]()},autoFullScreen:function(t,e){t=t||document.body,this._ensureFullScreen(t,e),this.requestFullScreen(t,e)},disableAutoFullScreen:function(t){var e=cc.game.canvas||t,i=this._touchEvent;this._preOnTouch&&(e.removeEventListener(i,this._preOnTouch),this._preOnTouch=null)},_ensureFullScreen:function(t,e){var i=this,n=cc.game.canvas||t,r=this._fn.fullscreenerror,s=this._touchEvent;function a(){i._preOnFullScreenError=null,i._preOnTouch&&n.removeEventListener(s,i._preOnTouch),i._preOnTouch=function(){i._preOnTouch=null,i.requestFullScreen(t,e)},n.addEventListener(s,i._preOnTouch,{once:!0})}this._preOnFullScreenError&&t.removeEventListener(r,this._preOnFullScreenError),this._preOnFullScreenError=a,t.addEventListener(r,a,{once:!0})}},cc.screen.init()}),{}],247:[(function(t,e){"use strict";window._CCSettings&&_CCSettings.platform;var i="undefined"==typeof window?global:window,n=cc&&cc.sys?cc.sys:(function(){cc.sys={};var t,e,n=cc.sys;if(n.LANGUAGE_ENGLISH="en",n.LANGUAGE_CHINESE="zh",n.LANGUAGE_FRENCH="fr",n.LANGUAGE_ITALIAN="it",n.LANGUAGE_GERMAN="de",n.LANGUAGE_SPANISH="es",n.LANGUAGE_DUTCH="du",n.LANGUAGE_RUSSIAN="ru",n.LANGUAGE_KOREAN="ko",n.LANGUAGE_JAPANESE="ja",n.LANGUAGE_HUNGARIAN="hu",n.LANGUAGE_PORTUGUESE="pt",n.LANGUAGE_ARABIC="ar",n.LANGUAGE_NORWEGIAN="no",n.LANGUAGE_POLISH="pl",n.LANGUAGE_TURKISH="tr",n.LANGUAGE_UKRAINIAN="uk",n.LANGUAGE_ROMANIAN="ro",n.LANGUAGE_BULGARIAN="bg",n.LANGUAGE_UNKNOWN="unknown",n.OS_IOS="iOS",n.OS_ANDROID="Android",n.OS_WINDOWS="Windows",n.OS_MARMALADE="Marmalade",n.OS_LINUX="Linux",n.OS_BADA="Bada",n.OS_BLACKBERRY="Blackberry",n.OS_OSX="OS X",n.OS_WP8="WP8",n.OS_WINRT="WINRT",n.OS_UNKNOWN="Unknown",n.UNKNOWN=-1,n.WIN32=0,n.LINUX=1,n.MACOS=2,n.ANDROID=3,n.IPHONE=4,n.IPAD=5,n.BLACKBERRY=6,n.NACL=7,n.EMSCRIPTEN=8,n.TIZEN=9,n.WINRT=10,n.WP8=11,n.MOBILE_BROWSER=100,n.DESKTOP_BROWSER=101,n.EDITOR_PAGE=102,n.EDITOR_CORE=103,n.WECHAT_GAME=104,n.QQ_PLAY=105,n.FB_PLAYABLE_ADS=106,n.BAIDU_GAME=107,n.VIVO_GAME=108,n.OPPO_GAME=109,n.HUAWEI_GAME=110,n.XIAOMI_GAME=111,n.JKW_GAME=112,n.ALIPAY_GAME=113,n.WECHAT_GAME_SUB=114,n.BAIDU_GAME_SUB=115,n.QTT_GAME=116,n.BYTEDANCE_GAME=117,n.BYTEDANCE_GAME_SUB=118,n.LINKSURE=119,n.BROWSER_TYPE_WECHAT="wechat",n.BROWSER_TYPE_ANDROID="androidbrowser",n.BROWSER_TYPE_IE="ie",n.BROWSER_TYPE_EDGE="edge",n.BROWSER_TYPE_QQ="qqbrowser",n.BROWSER_TYPE_MOBILE_QQ="mqqbrowser",n.BROWSER_TYPE_UC="ucbrowser",n.BROWSER_TYPE_UCBS="ucbs",n.BROWSER_TYPE_360="360browser",n.BROWSER_TYPE_BAIDU_APP="baiduboxapp",n.BROWSER_TYPE_BAIDU="baidubrowser",n.BROWSER_TYPE_MAXTHON="maxthon",n.BROWSER_TYPE_OPERA="opera",n.BROWSER_TYPE_OUPENG="oupeng",n.BROWSER_TYPE_MIUI="miuibrowser",n.BROWSER_TYPE_FIREFOX="firefox",n.BROWSER_TYPE_SAFARI="safari",n.BROWSER_TYPE_CHROME="chrome",n.BROWSER_TYPE_LIEBAO="liebao",n.BROWSER_TYPE_QZONE="qzone",n.BROWSER_TYPE_SOUGOU="sogou",n.BROWSER_TYPE_HUAWEI="huawei",n.BROWSER_TYPE_UNKNOWN="unknown",n.isNative=!1,n.isBrowser="object"==typeof window&&"object"==typeof document&&!0,n.glExtension=function(t){return!!cc.renderer.device.ext(t)},n.getMaxJointMatrixSize=function(){if(!n._maxJointMatrixSize){var t=cc.game._renderContext,e=Math.floor(t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS)/4)-10;n._maxJointMatrixSize=e<50?0:50}return n._maxJointMatrixSize},n.getSafeAreaRect=function(){var t=cc.view.getVisibleSize();return cc.rect(0,0,t.width,t.height)},i.__globalAdapter&&i.__globalAdapter.adaptSys)i.__globalAdapter.adaptSys(n);else{var r=window,s=r.navigator,a=document,o=a.documentElement,l=s.userAgent.toLowerCase();n.isMobile=/mobile|android|iphone|ipad/.test(l),"undefined"!=typeof FbPlayableAd?n.platform=n.FB_PLAYABLE_ADS:n.platform=n.isMobile?n.MOBILE_BROWSER:n.DESKTOP_BROWSER;var c=s.language;c=c||s.browserLanguage,n.languageCode=c.toLowerCase(),c=c?c.split("-")[0]:n.LANGUAGE_ENGLISH,n.language=c;var h=!1,u=!1,_="",f=0,d=/android\s*(\d+(?:\.\d+)*)/i.exec(l)||/android\s*(\d+(?:\.\d+)*)/i.exec(s.platform);d&&(h=!0,_=d[1]||"",f=parseInt(_)||0),(d=/(iPad|iPhone|iPod).*OS ((\d+_?){2,3})/i.exec(l))?(u=!0,_=d[2]||"",f=parseInt(_)||0):(/(iPhone|iPad|iPod)/.exec(s.platform)||"MacIntel"===s.platform&&s.maxTouchPoints&&s.maxTouchPoints>1)&&(u=!0,_="",f=0);var p=n.OS_UNKNOWN;-1!==s.appVersion.indexOf("Win")?p=n.OS_WINDOWS:u?p=n.OS_IOS:-1!==s.appVersion.indexOf("Mac")?p=n.OS_OSX:-1!==s.appVersion.indexOf("X11")&&-1===s.appVersion.indexOf("Linux")?p=n.OS_UNIX:h?p=n.OS_ANDROID:-1===s.appVersion.indexOf("Linux")&&-1===l.indexOf("ubuntu")||(p=n.OS_LINUX),n.os=p,n.osVersion=_,n.osMainVersion=f,n.browserType=n.BROWSER_TYPE_UNKNOWN,(function(){var t=/mqqbrowser|micromessenger|qqbrowser|sogou|qzone|liebao|maxthon|ucbs|360 aphone|360browser|baiduboxapp|baidubrowser|maxthon|mxbrowser|miuibrowser/i.exec(l)||/qq|ucbrowser|ubrowser|edge|HuaweiBrowser/i.exec(l)||/chrome|safari|firefox|trident|opera|opr\/|oupeng/i.exec(l),e=t?t[0].toLowerCase():n.BROWSER_TYPE_UNKNOWN;"safari"===e&&h?e=n.BROWSER_TYPE_ANDROID:"qq"===e&&l.match(/android.*applewebkit/i)&&(e=n.BROWSER_TYPE_ANDROID);var i={micromessenger:n.BROWSER_TYPE_WECHAT,trident:n.BROWSER_TYPE_IE,edge:n.BROWSER_TYPE_EDGE,"360 aphone":n.BROWSER_TYPE_360,mxbrowser:n.BROWSER_TYPE_MAXTHON,"opr/":n.BROWSER_TYPE_OPERA,ubrowser:n.BROWSER_TYPE_UC,huaweibrowser:n.BROWSER_TYPE_HUAWEI};n.browserType=i[e]||e})(),n.browserVersion="",(e=l.match(/(mqqbrowser|micromessenger|qqbrowser|sogou|qzone|liebao|maxthon|uc|ucbs|360 aphone|360|baiduboxapp|baidu|maxthon|mxbrowser|miui(?:.hybrid)?)(mobile)?(browser)?\/?([\d.]+)/i))||(e=l.match(/(qq|chrome|safari|firefox|trident|opera|opr\/|oupeng)(mobile)?(browser)?\/?([\d.]+)/i)),n.browserVersion=e?e[4]:"";var m=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,v=window.devicePixelRatio||1;n.windowPixelResolution={width:v*m,height:v*y},n._checkWebGLRenderMode=function(){if(cc.game.renderType!==cc.game.RENDER_TYPE_WEBGL)throw new Error("This feature supports WebGL render mode only.")};var g=document.createElement("canvas");try{var b=n.localStorage=r.localStorage;b.setItem("storage",""),b.removeItem("storage"),b=null}catch(M){var A=function(){cc.warnID(5200)};n.localStorage={getItem:A,setItem:A,removeItem:A,clear:A}}var x=g.toDataURL("image/webp").startsWith("data:image/webp"),C=!!g.getContext("2d"),T=!1;r.WebGLRenderingContext&&(T=!0);var S,w=n.capabilities={canvas:C,opengl:T,webp:x,imageBitmap:!1};"undefined"!=typeof createImageBitmap&&"undefined"!=typeof Blob&&(g.width=g.height=2,createImageBitmap(g,{}).then((function(t){w.imageBitmap=!0,t.close&&t.close()})).catch((function(){}))),(void 0!==o.ontouchstart||void 0!==a.ontouchstart||s.msPointerEnabled)&&(w.touches=!0),void 0!==o.onmouseup&&(w.mouse=!0),void 0!==o.onkeyup&&(w.keyboard=!0),(r.DeviceMotionEvent||r.DeviceOrientationEvent)&&(w.accelerometer=!0),(function(){n.browserVersion;var t=!!(window.AudioContext||window.webkitAudioContext||window.mozAudioContext);S={ONLY_ONE:!1,WEB_AUDIO:t,DELAY_CREATE_CTX:!1},n.os===n.OS_IOS&&(S.USE_LOADER_EVENT="loadedmetadata"),n.browserType===n.BROWSER_TYPE_FIREFOX&&(S.DELAY_CREATE_CTX=!0,S.USE_LOADER_EVENT="canplay"),n.os===n.OS_ANDROID&&n.browserType===n.BROWSER_TYPE_UC&&(S.ONE_SOURCE=!0)})();try{S.WEB_AUDIO&&(S.context=new(window.AudioContext||window.webkitAudioContext||window.mozAudioContext),S.DELAY_CREATE_CTX&&setTimeout((function(){S.context=new(window.AudioContext||window.webkitAudioContext||window.mozAudioContext)}),0))}catch(D){S.WEB_AUDIO=!1,cc.logID(5201)}var E=[];(t=document.createElement("audio")).canPlayType&&(t.canPlayType('audio/ogg; codecs="vorbis"')&&E.push(".ogg"),t.canPlayType("audio/mpeg")&&E.push(".mp3"),t.canPlayType('audio/wav; codecs="1"')&&E.push(".wav"),t.canPlayType("audio/mp4")&&E.push(".mp4"),t.canPlayType("audio/x-m4a")&&E.push(".m4a")),S.format=E,n.__audioSupport=S}return n.NetworkType={NONE:0,LAN:1,WWAN:2},n.getNetworkType=function(){return n.NetworkType.LAN},n.getBatteryLevel=function(){return 1},n.garbageCollect=function(){},n.restartVM=function(){},n.isObjectValid=function(t){return!!t},n.dump=function(){var t="";t+="isMobile : "+this.isMobile+"\r\n",t+="language : "+this.language+"\r\n",t+="browserType : "+this.browserType+"\r\n",t+="browserVersion : "+this.browserVersion+"\r\n",t+="capabilities : "+JSON.stringify(this.capabilities)+"\r\n",t+="os : "+this.os+"\r\n",t+="osVersion : "+this.osVersion+"\r\n",t+="platform : "+this.platform+"\r\n",t+="Using "+(cc.game.renderType===cc.game.RENDER_TYPE_WEBGL?"WEBGL":"CANVAS")+" renderer.\r\n",cc.log(t)},n.openURL=function(t){window.open(t)},n.now=function(){return Date.now?Date.now():+new Date},n})();e.exports=n}),{}],248:[(function(t,e){"use strict";var i=t("../event/event-target"),n=t("../platform/js"),r=t("../renderer");t("../platform/CCClass");var s={init:function(){this.html=document.getElementsByTagName("html")[0]},availWidth:function(t){return t&&t!==this.html?t.clientWidth:window.innerWidth},availHeight:function(t){return t&&t!==this.html?t.clientHeight:window.innerHeight},meta:{width:"device-width"},adaptationType:cc.sys.browserType};switch(cc.sys.os===cc.sys.OS_IOS&&(s.adaptationType=cc.sys.BROWSER_TYPE_SAFARI),s.adaptationType){case cc.sys.BROWSER_TYPE_SAFARI:case cc.sys.BROWSER_TYPE_SOUGOU:case cc.sys.BROWSER_TYPE_UC:s.meta["minimal-ui"]="true",s.availWidth=function(t){return t.clientWidth},s.availHeight=function(t){return t.clientHeight}}var a=null,o=function(){i.call(this);var t=this,e=cc.ContainerStrategy,n=cc.ContentStrategy;s.init(this),t._frameSize=cc.size(0,0),t._designResolutionSize=cc.size(0,0),t._originalDesignResolutionSize=cc.size(0,0),t._scaleX=1,t._scaleY=1,t._viewportRect=cc.rect(0,0,0,0),t._visibleRect=cc.rect(0,0,0,0),t._autoFullScreen=!1,t._devicePixelRatio=1,t._maxPixelRatio=2,t._retinaEnabled=!1,t._resizeCallback=null,t._resizing=!1,t._resizeWithBrowserSize=!1,t._orientationChanging=!0,t._isRotated=!1,t._orientation=cc.macro.ORIENTATION_AUTO,t._isAdjustViewport=!0,t._antiAliasEnabled=!1,t._resolutionPolicy=null,t._rpExactFit=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.EXACT_FIT),t._rpShowAll=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.SHOW_ALL),t._rpNoBorder=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.NO_BORDER),t._rpFixedHeight=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.FIXED_HEIGHT),t._rpFixedWidth=new cc.ResolutionPolicy(e.EQUAL_TO_FRAME,n.FIXED_WIDTH),cc.game.once(cc.game.EVENT_ENGINE_INITED,this.init,this)};cc.js.extend(o,i),cc.js.mixin(o.prototype,{init:function(){this._initFrameSize();var t=cc.game.canvas.width,e=cc.game.canvas.height;this._designResolutionSize.width=t,this._designResolutionSize.height=e,this._originalDesignResolutionSize.width=t,this._originalDesignResolutionSize.height=e,this._viewportRect.width=t,this._viewportRect.height=e,this._visibleRect.width=t,this._visibleRect.height=e,cc.winSize.width=this._visibleRect.width,cc.winSize.height=this._visibleRect.height,cc.visibleRect&&cc.visibleRect.init(this._visibleRect)},_resizeEvent:function(t){var e;e=this.setDesignResolutionSize?this:cc.view;var i=cc.sys;if(i.browserType!==i.BROWSER_TYPE_UC||i.os!==i.OS_IOS){var n=e._frameSize.width,r=e._frameSize.height,s=e._isRotated;if(cc.sys.isMobile){var a=cc.game.container.style,o=a.margin;a.margin="0",a.display="none",e._initFrameSize(),a.margin=o,a.display="block"}else e._initFrameSize();if(!0===t||e._isRotated!==s||e._frameSize.width!==n||e._frameSize.height!==r){var l=e._originalDesignResolutionSize.width,c=e._originalDesignResolutionSize.height;e._resizing=!0,l>0&&e.setDesignResolutionSize(l,c,e._resolutionPolicy),e._resizing=!1,e.emit("canvas-resize"),e._resizeCallback&&e._resizeCallback.call()}}else setTimeout((function(){e._resizeEvent(t)}),0)},_orientationChange:function(){cc.view._orientationChanging=!0,cc.view._resizeEvent(),cc.sys.browserType===cc.sys.BROWSER_TYPE_SAFARI&&cc.sys.isMobile&&setTimeout((function(){window.innerHeight>window.innerWidth&&window.scrollTo(0,1)}),500)},_resize:function(){cc.view._resizeEvent(!1)},resizeWithBrowserSize:function(t){t?this._resizeWithBrowserSize||(this._resizeWithBrowserSize=!0,window.addEventListener("resize",this._resize),window.addEventListener("orientationchange",this._orientationChange)):this._resizeWithBrowserSize&&(this._resizeWithBrowserSize=!1,window.removeEventListener("resize",this._resize),window.removeEventListener("orientationchange",this._orientationChange))},setResizeCallback:function(t){"function"!=typeof t&&null!=t||(this._resizeCallback=t)},setOrientation:function(t){if((t&=cc.macro.ORIENTATION_AUTO)&&this._orientation!==t){this._orientation=t;var e=this._originalDesignResolutionSize.width,i=this._originalDesignResolutionSize.height;this.setDesignResolutionSize(e,i,this._resolutionPolicy)}},_initFrameSize:function(){var t=this._frameSize,e=s.availWidth(cc.game.frame),i=s.availHeight(cc.game.frame),n=e>=i;!cc.sys.isMobile||n&&this._orientation&cc.macro.ORIENTATION_LANDSCAPE||!n&&this._orientation&cc.macro.ORIENTATION_PORTRAIT?(t.width=e,t.height=i,cc.game.container.style["-webkit-transform"]="rotate(0deg)",cc.game.container.style.transform="rotate(0deg)",this._isRotated=!1):(t.width=i,t.height=e,cc.game.container.style["-webkit-transform"]="rotate(90deg)",cc.game.container.style.transform="rotate(90deg)",cc.game.container.style["-webkit-transform-origin"]="0px 0px 0px",cc.game.container.style.transformOrigin="0px 0px 0px",this._isRotated=!0),this._orientationChanging&&setTimeout((function(){cc.view._orientationChanging=!1}),1e3)},_setViewportMeta:function(t,e){var i=document.getElementById("cocosMetaElement");i&&e&&document.head.removeChild(i);var n,r,s,a=document.getElementsByName("viewport"),o=a?a[0]:null;for(r in n=o?o.content:"",(i=i||document.createElement("meta")).id="cocosMetaElement",i.name="viewport",i.content="",t)-1==n.indexOf(r)?n+=","+r+"="+t[r]:e&&(s=new RegExp(r+"s*=s*[^,]+"),n=n.replace(s,r+"="+t[r]));/^,/.test(n)&&(n=n.substr(1)),i.content=n,o&&(o.content=n),document.head.appendChild(i)},_adjustViewportMeta:function(){this._isAdjustViewport&&(this._setViewportMeta(s.meta,!1),this._isAdjustViewport=!1)},adjustViewportMeta:function(t){this._isAdjustViewport=t},enableRetina:function(t){this._retinaEnabled=!!t},isRetinaEnabled:function(){return this._retinaEnabled},enableAntiAlias:function(t){if(cc.warnID(9200),this._antiAliasEnabled!==t)if(this._antiAliasEnabled=t,cc.game.renderType===cc.game.RENDER_TYPE_WEBGL)cc.assetManager.assets.forEach((function(e){if(e instanceof cc.Texture2D){var i=cc.Texture2D.Filter;t?e.setFilters(i.LINEAR,i.LINEAR):e.setFilters(i.NEAREST,i.NEAREST)}}));else if(cc.game.renderType===cc.game.RENDER_TYPE_CANVAS){var e=cc.game.canvas.getContext("2d");e.imageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t}},isAntiAliasEnabled:function(){return this._antiAliasEnabled},enableAutoFullScreen:function(t){t&&t!==this._autoFullScreen&&cc.sys.isMobile?(this._autoFullScreen=!0,cc.screen.autoFullScreen(cc.game.frame)):(this._autoFullScreen=!1,cc.screen.disableAutoFullScreen(cc.game.frame))},isAutoFullScreenEnabled:function(){return this._autoFullScreen},setCanvasSize:function(t,e){var i=cc.game.canvas,n=cc.game.container;i.width=t*this._devicePixelRatio,i.height=e*this._devicePixelRatio,i.style.width=t+"px",i.style.height=e+"px",n.style.width=t+"px",n.style.height=e+"px",this._resizeEvent()},getCanvasSize:function(){return cc.size(cc.game.canvas.width,cc.game.canvas.height)},getFrameSize:function(){return cc.size(this._frameSize.width,this._frameSize.height)},setFrameSize:function(t,e){this._frameSize.width=t,this._frameSize.height=e,cc.game.frame.style.width=t+"px",cc.game.frame.style.height=e+"px",this._resizeEvent(!0)},getVisibleSize:function(){return cc.size(this._visibleRect.width,this._visibleRect.height)},getVisibleSizeInPixel:function(){return cc.size(this._visibleRect.width*this._scaleX,this._visibleRect.height*this._scaleY)},getVisibleOrigin:function(){return cc.v2(this._visibleRect.x,this._visibleRect.y)},getVisibleOriginInPixel:function(){return cc.v2(this._visibleRect.x*this._scaleX,this._visibleRect.y*this._scaleY)},getResolutionPolicy:function(){return this._resolutionPolicy},setResolutionPolicy:function(t){var e=this;if(t instanceof cc.ResolutionPolicy)e._resolutionPolicy=t;else{var i=cc.ResolutionPolicy;t===i.EXACT_FIT&&(e._resolutionPolicy=e._rpExactFit),t===i.SHOW_ALL&&(e._resolutionPolicy=e._rpShowAll),t===i.NO_BORDER&&(e._resolutionPolicy=e._rpNoBorder),t===i.FIXED_HEIGHT&&(e._resolutionPolicy=e._rpFixedHeight),t===i.FIXED_WIDTH&&(e._resolutionPolicy=e._rpFixedWidth)}},setDesignResolutionSize:function(t,e,i){if(t>0&&e>0){this.setResolutionPolicy(i);var n=this._resolutionPolicy;if(n&&n.preApply(this),cc.sys.isMobile&&this._adjustViewportMeta(),this._orientationChanging=!0,this._resizing||this._initFrameSize(),n){this._originalDesignResolutionSize.width=this._designResolutionSize.width=t,this._originalDesignResolutionSize.height=this._designResolutionSize.height=e;var s=n.apply(this,this._designResolutionSize);if(s.scale&&2===s.scale.length&&(this._scaleX=s.scale[0],this._scaleY=s.scale[1]),s.viewport){var a=this._viewportRect,o=this._visibleRect,l=s.viewport;a.x=l.x,a.y=l.y,a.width=l.width,a.height=l.height,o.x=0,o.y=0,o.width=l.width/this._scaleX,o.height=l.height/this._scaleY}n.postApply(this),cc.winSize.width=this._visibleRect.width,cc.winSize.height=this._visibleRect.height,cc.visibleRect&&cc.visibleRect.init(this._visibleRect),r.updateCameraViewport(),cc.internal.inputManager._updateCanvasBoundingRect(),this.emit("design-resolution-changed")}else cc.logID(2201)}else cc.errorID(2200)},getDesignResolutionSize:function(){return cc.size(this._designResolutionSize.width,this._designResolutionSize.height)},setRealPixelResolution:function(t,e,i){this._setViewportMeta({width:t},!0),document.documentElement.style.width=t+"px",document.body.style.width=t+"px",document.body.style.left="0px",document.body.style.top="0px",this.setDesignResolutionSize(t,e,i)},setViewportInPoints:function(t,e,i,n){var r=this._scaleX,s=this._scaleY;cc.game._renderContext.viewport(t*r+this._viewportRect.x,e*s+this._viewportRect.y,i*r,n*s)},setScissorInPoints:function(t,e,i,n){var r=this._scaleX,s=this._scaleY,o=Math.ceil(t*r+this._viewportRect.x),l=Math.ceil(e*s+this._viewportRect.y),c=Math.ceil(i*r),h=Math.ceil(n*s),u=cc.game._renderContext;if(!a){var _=u.getParameter(u.SCISSOR_BOX);a=cc.rect(_[0],_[1],_[2],_[3])}a.x===o&&a.y===l&&a.width===c&&a.height===h||(a.x=o,a.y=l,a.width=c,a.height=h,u.scissor(o,l,c,h))},isScissorEnabled:function(){return cc.game._renderContext.isEnabled(gl.SCISSOR_TEST)},getScissorRect:function(){if(!a){var t=gl.getParameter(gl.SCISSOR_BOX);a=cc.rect(t[0],t[1],t[2],t[3])}var e=1/this._scaleX,i=1/this._scaleY;return cc.rect((a.x-this._viewportRect.x)*e,(a.y-this._viewportRect.y)*i,a.width*e,a.height*i)},getViewportRect:function(){return this._viewportRect},getScaleX:function(){return this._scaleX},getScaleY:function(){return this._scaleY},getDevicePixelRatio:function(){return this._devicePixelRatio},convertToLocationInView:function(t,e,i,n){var r=n||cc.v2(),s=i.adjustedLeft?i.adjustedLeft:i.left,a=i.adjustedTop?i.adjustedTop:i.top,o=this._devicePixelRatio*(t-s),l=this._devicePixelRatio*(a+i.height-e);return this._isRotated?(r.x=cc.game.canvas.width-l,r.y=o):(r.x=o,r.y=l),r},_convertMouseToLocationInView:function(t,e){var i=this._viewportRect;t.x=(this._devicePixelRatio*(t.x-e.left)-i.x)/this._scaleX,t.y=(this._devicePixelRatio*(e.top+e.height-t.y)-i.y)/this._scaleY},_convertPointWithScale:function(t){var e=this._viewportRect;t.x=(t.x-e.x)/this._scaleX,t.y=(t.y-e.y)/this._scaleY},_convertTouchesWithScale:function(t){for(var e,i,n,r=this._viewportRect,s=this._scaleX,a=this._scaleY,o=0;o=0;n--){var s=i[n];s.hasOwnProperty("__attrs__")&&s.__attrs__||r(s,(e=i[n+1])&&e.__attrs__)}return r(t,(e=i[0])&&e.__attrs__),t.__attrs__}function a(t){return t.hasOwnProperty("__attrs__")&&t.__attrs__||s(t)}function o(t,e){this.name=t,this.default=e}o.prototype.toString=function(){return this.name},cc.Integer=new o("Integer",0),cc.Float=new o("Float",0),cc.Boolean=new o("Boolean",!1),cc.String=new o("String",""),e.exports={PrimitiveType:o,attr:function(t,e){var i=a(t),r=e+n,s={};for(var o in i)o.startsWith(r)&&(s[o.slice(r.length)]=i[o]);return s},getClassAttrs:a,setClassAttr:function(t,e,i,r){a(t)[e+n+i]=r},DELIMETER:n,getTypeChecker_ET:!1,getObjTypeChecker_ET:!1,ScriptUuid:{}}}),{"./CCClass":238,"./js":259,"./utils":262}],251:[(function(t,e){"use strict";var i=t("./js"),n=i.array.fastRemoveAt;function r(){}function s(){this.callback=r,this.target=void 0,this.once=!1}s.prototype.set=function(t,e,i){this.callback=t,this.target=e,this.once=!!i};var a=new i.Pool(function(t){return t.callback=r,t.target=void 0,t.once=!1,!0},32);function o(){this.callbackInfos=[],this.isInvoking=!1,this.containCanceled=!1}a.get=function(){return this._get()||new s};var l=o.prototype;l.removeByCallback=function(t){for(var e=0;e=0;--t)this.callbackInfos[t]||n(this.callbackInfos,t);this.containCanceled=!1},l.clear=function(){this.cancelAll(),this.callbackInfos.length=0,this.isInvoking=!1,this.containCanceled=!1};var c=new i.Pool(function(t){return t.callbackInfos=[],t.isInvoking=!1,t.containCanceled=!1,!0},16);function h(){this._callbackTable=i.createMap(!0)}c.get=function(){return this._get()||new o},(l=h.prototype).on=function(t,e,i,n){var r=this._callbackTable[t];r||(r=this._callbackTable[t]=c.get());var s=a.get();s.set(e,i,n),r.callbackInfos.push(s)},l.hasEventListener=function(t,e,i){var n=this._callbackTable[t];if(!n)return!1;var r=n.callbackInfos;if(!e){if(n.isInvoking){for(var s=0;s0}for(var a=0;a=0?a[i[l]]=o:a[~l]=o}for(;r=0?c[i[u]]=h:c[~u]=h}}function A(t,e){for(var i=t[4][e[0]],n=i[0],r=new(0,n[0]),s=n[1],a=n[2],o=i[i.length-1],l=1;l=0?e[i]=t[5][n]:t[7][3*~n]=e}function T(t){return function(e,i,n,r){i[n]=r;for(var s=0;s=0){var u=o[c];e[a]=x(t,u,h)}else(0,E[c=~c])(t,e,a,h)}return r}function D(t,e){return t||O.reportMissingClass(e),Object}function B(t,e,i,n,r,s){var a=t(e);if(!a){if(r)return void(i[n]=(function(e,i,n){return function(){var r=t(n)||D(s,n);return e[i]=r,new r}})(i,n,e));a=D(s,e)}i[n]=a}function I(t,e,i){for(var r=i||n.default._getClassById,s=t[3],a=0;a=0?i[c]:~c,s[o]=c);var h=a[o];"number"==typeof h&&(a[o]=n[h])}}function O(t,e,i){"string"==typeof t&&(t=JSON.parse(t));var n=!e;(e=e||g.pool.get()).init(t),i=i||{};var r=t[0],s=!1;if("object"==typeof r&&(s=r.preprocessed,r=r.version),r<1)throw new Error(cc.debug.getError(5304,r));i._version=r,i.result=e,t[0]=i,s||(I(t,!1,i.classFinder),P(t)),cc.game._isCloning=!0;var a=t[5],o=M(t);return cc.game._isCloning=!1,t[7]&&b(t[7],a,t[2]),R(t),n&&g.pool.put(e),a[o]}E[0]=function(t,e,i,n){e[i]=n},E[1]=C,E[2]=T(C),E[3]=T(S),E[4]=w,E[5]=function(t,e,i,n){m[n[0]](e[i],n)},E[6]=S,E[7]=function(t,e,i,n){e[i].set(n)},E[8]=function(t,e,i,n){var r=new d[n[0]];m[n[0]](r,n),e[i]=r},E[9]=T(w),E[10]=function(t,e,i,n){var r=t[3][n[0]];e[i]=x(t,r,n[1])},E[11]=function(t,e,i,n){var r=n[0];e[i]=r;for(var s=1;s0&&(i=_+this.globalVariables.join(",")+";");var n=l.flattenCodeArray(["return (function(R){",i||[],this.codeArray,"return o;","})"]);this.result=Function("O","F",n)(this.objs,this.funcs);for(var r=0,s=this.objsToClear_iN$t.length;r1)t.push(d+"="+this._targetExp+";"),e=d;else{if(1!==this._exps.length)return;e=this._targetExp}for(var i=0;i=0&&(_(t,i),!0)}function d(t,e){void 0===e&&(e=t,t=null),this.get=null,this.count=0,this._pool=new Array(e),this._cleanup=t}s.formatStr=function(){var t=arguments.length;if(0===t)return"";var e=arguments[0];if(1===t)return""+e;var i="string"==typeof e&&h.test(e);if(i)for(var n=1;n=0&&(t[i]=t[t.length-1],--t.length)},removeAt:_,fastRemoveAt:function(t,e){var i=t.length;e<0||e>=i||(t[e]=t[i-1],t.length=i-1)},contains:function(t,e){return t.indexOf(e)>=0},verifyType:function(t,e){if(t&&t.length>0)for(var i=0;i0){--this.count;var t=this._pool[this.count];return this._pool[this.count]=null,t}return null},d.prototype.put=function(t){var e=this._pool;if(this.count=0&&(this._pool.length=t,this.count>t&&(this.count=t))},s.Pool=d,cc.js=s,e.exports=s}),{"../utils/mutable-forward-iterator":324,"./id-generater":255}],260:[(function(t,e,i){"use strict";var n=t("./js"),r=t("./attribute"),s={default:{},serializable:{},editorOnly:{},formerlySerializedAs:{}};function a(t,e,i,n){if(!t.get&&!t.set&&t.hasOwnProperty("default")){var r="_N$"+e;t.get=function(){return this[r]},t.set=function(t){var e=this[r];this[r]=t,i.call(this,e)};var a={};for(var o in n[r]=a,s){var l=s[o];t.hasOwnProperty(o)&&(a[o]=t[o],l.canUsedInGet||delete t[o])}}}function o(t,e,i,n){if(Array.isArray(e)){if(!(e.length>0))return cc.errorID(5508,i,n);t.type=e=e[0]}"function"==typeof e&&(e===String?t.type=cc.String:e===Boolean?t.type=cc.Boolean:e===Number&&(t.type=cc.Float))}function l(t,e,i){var n=t?{_short:!0}:{_short:!0,default:e};return i&&(n.type=i),n}i.getFullFormOfProperty=function(t,e){return t&&t.constructor===Object?null:Array.isArray(t)&&t.length>0?l(e,[],t):"function"==typeof t?l(e,n.isChildClassOf(t,cc.ValueType)?new t:null,t):t instanceof r.PrimitiveType?l(e,t.default):l(e,t)},i.preprocessAttrs=function(t,e){for(var n in t){var r=t[n],s=i.getFullFormOfProperty(r,!1);if(s&&(r=t[n]=s),r){var l=r.notify;l&&a(r,n,l,t),"type"in r&&o(r,r.type,e,n)}}},i.validateMethodWithProps=function(t){return"function"==typeof t||null===t}}),{"./CCClass":238,"./attribute":250,"./js":259}],261:[(function(){"use strict";var t=[];cc._RF={push:function(e,i,n){void 0===n&&(n=i,i=""),t.push({uuid:i,script:n,module:e,exports:e.exports,beh:null})},pop:function(){var e=t.pop(),i=e.module,n=i.exports;if(n===e.exports){for(var r in n)return;i.exports=n=e.cls}},peek:function(){return t[t.length-1]}}}),{}],262:[(function(t,e){"use strict";t("./js"),e.exports={contains:function(t,e){if("function"==typeof t.contains)return t.contains(e);if("function"==typeof t.compareDocumentPosition)return!!(16&t.compareDocumentPosition(e));var i=e.parentNode;if(i)do{if(i===t)return!0;i=i.parentNode}while(null!==i);return!1},isDomNode:"object"==typeof window&&("function"==typeof Node?function(t){return t instanceof Node}:function(t){return t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName}),callInNextTick:function(t,e,i){t&&setTimeout((function(){t(e,i)}),0)}}}),{"./js":259}],263:[(function(t){"use strict";t("./platform/js"),t("./value-types"),t("./utils"),t("./platform/CCInputManager"),t("./platform/CCInputExtension"),t("./event"),t("./platform/CCSys"),t("./platform/CCMacro"),t("./asset-manager"),t("./CCDirector"),t("./renderer"),t("./platform/CCView"),t("./platform/CCScreen"),t("./CCScheduler"),t("./event-manager")}),{"./CCDirector":70,"./CCScheduler":75,"./asset-manager":93,"./event":187,"./event-manager":183,"./platform/CCInputExtension":241,"./platform/CCInputManager":242,"./platform/CCMacro":243,"./platform/CCScreen":246,"./platform/CCSys":247,"./platform/CCView":248,"./platform/js":259,"./renderer":270,"./utils":322,"./value-types":338}],264:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("./assembler")),r=a(t("./utils/dynamic-atlas/manager")),s=a(t("./webgl/render-data"));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i>2,l=s._vData;n.length+o>l.length?l.set(n.subarray(0,l.length-o),o):l.set(n,o);for(var c=s._iData,h=a.indiceOffset,u=a.vertexOffset,_=0,f=r.length;_this.maxSize||(this._clean(t),i[e].push(t),this.count++)}},r.get=function(t){var e;if(this.enabled){var i=this._pool,n=a(t);e=i[n]&&i[n].pop()}return e?this.count--:e=new t,e},r.clear=function(){this._pool={},this.count=0},r._clean=function(t){t._renderComp=null},n}(r.default));r.default.register("assembler",o);var l=o;i.default=l,e.exports=i.default}),{"../utils/pool":325}],267:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("./webgl/vertex-format"),s=(n=t("./assembler-pool"))&&n.__esModule?n:{default:n},a=(function(){function t(){this._extendNative&&this._extendNative()}var e=t.prototype;return e.init=function(t){this._renderComp=t},e.updateRenderData=function(){},e.fillBuffers=function(){},e.getVfmt=function(){return r.vfmtPosUvColor},t})();i.default=a,a.register=function(t,e){t.__assembler__=e},a.init=function(t){for(var e=t.constructor,i=e.__assembler__;!i;){if(!(e=e.$super))return void cc.warn("Can not find assembler for render component : ["+cc.js.getClassName(t)+"]");i=e.__assembler__}if(i.getConstructor&&(i=i.getConstructor(t)),!t._assembler||t._assembler.constructor!==i){var n=s.default.get(i);n.init(t),t._assembler=n}},cc.Assembler=a,e.exports=i.default}),{"./assembler-pool":266,"./webgl/vertex-format":312}],268:[(function(t,e){"use strict";var i=function(t){var e;try{e=t.getContext("2d")}catch(i){return void console.error(i)}this._canvas=t,this._ctx=e,this._caps={},this._stats={drawcalls:0},this._vx=this._vy=this._vw=this._vh=0,this._sx=this._sy=this._sw=this._sh=0};i.prototype._restoreTexture=function(){},i.prototype.setViewport=function(t,e,i,n){this._vx===t&&this._vy===e&&this._vw===i&&this._vh===n||(this._vx=t,this._vy=e,this._vw=i,this._vh=n)},i.prototype.setScissor=function(t,e,i,n){this._sx===t&&this._sy===e&&this._sw===i&&this._sh===n||(this._sx=t,this._sy=e,this._sw=i,this._sh=n)},i.prototype.clear=function(t){var e=this._ctx;e.clearRect(this._vx,this._vy,this._vw,this._vh),!t||0===t[0]&&0===t[1]&&0===t[2]||(e.fillStyle="rgb("+t[0]+","+t[1]+","+t[2]+")",e.globalAlpha=t[3],e.fillRect(this._vx,this._vy,this._vw,this._vh))},i.prototype.resetDrawCalls=function(){this._stats.drawcalls=0},i.prototype.getDrawCalls=function(){return this._stats.drawcalls},e.exports=i}),{}],269:[(function(t,e){"use strict";var i=function(t,e){this._device=t,this._width=4,this._height=4,this._image=null,e&&(void 0!==e.width&&(this._width=e.width),void 0!==e.height&&(this._height=e.height),this.updateImage(e))};i.prototype.update=function(t){this.updateImage(t)},i.prototype.updateImage=function(t){if(t.images&&t.images[0]){var e=t.images[0];e&&e!==this._image&&(this._image=e)}},i.prototype.destroy=function(){this._image=null},e.exports=i}),{}],270:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("../../renderer/gfx")),r=a(t("../../renderer/core/input-assembler")),s=a(t("../../renderer/core/pass"));function a(t){return t&&t.__esModule?t:{default:t}}var o=cc.renderer={Texture2D:null,InputAssembler:r.default,Pass:s.default,renderEngine:null,canvas:null,device:null,scene:null,drawCalls:0,_handle:null,_cameraNode:null,_camera:null,_forward:null,_flow:null,initWebGL:function(e,i){t("./webgl/assemblers");var r=t("./webgl/model-batcher");this.Texture2D=n.default.Texture2D,this.canvas=e,this._flow=cc.RenderFlow;var s=t("../../renderer/scene/scene"),a=t("../../renderer/renderers/forward-renderer");this.device=new n.default.Device(e,i),this.scene=new s;var o,l=(o=this.device,{defaultTexture:new n.default.Texture2D(o,{images:[],width:128,height:128,wrapS:n.default.WRAP_REPEAT,wrapT:n.default.WRAP_REPEAT,format:n.default.TEXTURE_FMT_RGB8,genMipmaps:!1}),programTemplates:[],programChunks:{}});this._forward=new a(this.device,l),this._handle=new r(this.device,this.scene),this._flow.init(this._handle,this._forward)},initCanvas:function(e){var i=t("./canvas"),n=t("./canvas/Texture2D"),r=t("./canvas/Device");this.Device=r,this.Texture2D=n,this.canvas=e,this.device=new r(e),this._camera={a:1,b:0,c:0,d:1,tx:0,ty:0},this._handle=new i.RenderComponentHandle(this.device,this._camera),this._forward=new i.ForwardRenderer,this._flow=cc.RenderFlow,this._flow.init(this._handle,this._forward)},updateCameraViewport:function(){if(cc.director){var t=cc.director.getScene();t&&t.setScale(1,1,1)}if(cc.game.renderType===cc.game.RENDER_TYPE_CANVAS){var e=cc.view.getViewportRect();this.device.setViewport(e.x,e.y,e.width,e.height),this._camera.a=cc.view.getScaleX(),this._camera.d=cc.view.getScaleY(),this._camera.tx=e.x,this._camera.ty=e.y+e.height}},render:function(t,e){this.device.resetDrawCalls(),t&&(this._flow.render(t,e),this.drawCalls=this.device.getDrawCalls())},clear:function(){this._handle.reset(),this._forward.clear()}};i.default=o,e.exports=i.default}),{"../../renderer/core/input-assembler":361,"../../renderer/core/pass":362,"../../renderer/gfx":371,"../../renderer/renderers/forward-renderer":390,"../../renderer/scene/scene":394,"./canvas":void 0,"./canvas/Device":268,"./canvas/Texture2D":269,"./webgl/assemblers":282,"./webgl/model-batcher":308}],271:[(function(t,e){"use strict";var i,n,r=0,s=1<0;)i&t&&(e=C(i,e)),i>>=1;return e}function S(t){var e=t._renderFlag;(x[e]=T(e))._func(t)}g.flows=x,g.createFlow=C;var w=[];g.registerValidate=function(t){t._inValidateList||(w.push(t),t._inValidateList=!0)},g.validateRenderers=function(){for(var t=0,e=w.length;tthis._width&&(this._x=n,this._y=this._nexty),this._y+l+n>this._nexty&&(this._nexty=this._y+l+n),this._nexty>this._height)return null;cc.dynamicAtlasManager.textureBleeding&&((o<=8||l<=8)&&(this._texture.drawTextureAt(i,this._x-1,this._y-1),this._texture.drawTextureAt(i,this._x-1,this._y+1),this._texture.drawTextureAt(i,this._x+1,this._y-1),this._texture.drawTextureAt(i,this._x+1,this._y+1)),this._texture.drawTextureAt(i,this._x-1,this._y),this._texture.drawTextureAt(i,this._x+1,this._y),this._texture.drawTextureAt(i,this._x,this._y-1),this._texture.drawTextureAt(i,this._x,this._y+1)),this._texture.drawTextureAt(i,this._x,this._y),this._innerTextureInfos[i._id]={x:this._x,y:this._y,texture:i},this._count++,s+=this._x,a+=this._y,this._x+=o+n,this._dirty=!0}var c={x:s,y:a,texture:this._texture};return this._innerSpriteFrames.push(t),c},update:function(){this._dirty&&(this._texture.update(),this._dirty=!1)},deleteInnerTexture:function(t){t&&this._innerTextureInfos[t._id]&&(delete this._innerTextureInfos[t._id],this._count--)},isEmpty:function(){return this._count<=0},reset:function(){this._x=n,this._y=n,this._nexty=n;for(var t=this._innerSpriteFrames,e=0,i=t.length;e=0;e--)n[e].deleteInnerTexture(t),n[e].isEmpty()&&(n[e].destroy(),n.splice(e,1),r--)},showDebug:!1,update:function(){if(this.enabled)for(var t=0;t<=r;t++)n[t].update()}};e.exports=cc.dynamicAtlasManager=_}),{"./atlas":272}],274:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../../assembler-2d"))&&n.__esModule?n:{default:n},s=t("../../../utils/text-utils"),a=t("../../../platform/CCMacro"),o=t("../../../components/CCLabel").Overflow,l=t("../utils").shareLabelInfo,c=function(){this.char="",this.valid=!0,this.x=0,this.y=0,this.line=0,this.hash=""},h=cc.rect(),u=null,_=[],f=[],d=[],p=[],m=null,y=0,v=0,g=0,b=0,A=0,x=1,C=null,T=cc.size(),S="",w=0,E=0,M=0,D=0,B=0,I=0,P=0,R=!1,O=0,L=0,F=0,V=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.updateRenderData=function(t){t._vertsDirty&&u!==t&&(u=t,this._reserveQuads(t,t.string.toString().length),this._updateFontFamily(t),this._updateProperties(t),this._updateLabelInfo(t),this._updateContent(),this.updateWorldVerts(t),u._actualFontSize=w,u.node.setContentSize(T),u._vertsDirty=!1,u=null,this._resetProperties())},r._updateFontScale=function(){x=w/E},r._updateFontFamily=function(t){var e=t.font;C=e.spriteFrame,m=e._fntConfig,l.fontAtlas=e._fontDefDictionary,this.packToDynamicAtlas(t,C)},r._updateLabelInfo=function(){l.hash="",l.margin=0},r._updateProperties=function(t){S=t.string.toString(),w=t.fontSize,E=m?m.fontSize:t.fontSize,M=t.horizontalAlign,D=t.verticalAlign,B=t.spacingX,P=t.overflow,I=t._lineHeight,T.width=t.node.width,T.height=t.node.height,P===o.NONE?(R=!1,T.width+=2*l.margin,T.height+=2*l.margin):P===o.RESIZE_HEIGHT?(R=!0,T.height+=2*l.margin):R=t.enableWrapText,l.lineHeight=I,l.fontSize=w,this._setupBMFontOverflowMetrics()},r._resetProperties=function(){m=null,C=null,l.hash="",l.margin=0},r._updateContent=function(){this._updateFontScale(),this._computeHorizontalKerningForText(),this._alignText()},r._computeHorizontalKerningForText=function(){var t,e=S,i=e.length,n=_;if(m&&(t=m.kerningDict),t&&!cc.js.isEmptyObject(t))for(var r=-1,s=0;s0&&n>0&&G+f.w*x>F&&!s.isUnicodeSpace(C)){d.push(c),c=0,i++,n=0,r-=I*this._getFontScale()+0,N=!0;break}p.x=G,p.y=r-f.offsetY*x+l.margin,this._recordLetterInfo(p,C,z,i),z+1<_.length&&zp.y-f.h*x&&(M=p.y-f.h*x)}else{this._recordPlaceholderInfo(z,C);var U="";m&&(U=m.atlasName),console.log("Can't find letter definition in texture atlas "+U+" for letter:"+C)}else this._recordPlaceholderInfo(z,C)}N||(n=V,hM&&(u=M),a<(c=D)&&(a=c),g+=w)}else d.push(c),c=0,i++,n=0,r-=I*this._getFontScale()+0,this._recordPlaceholderInfo(g,C),g++}return d.push(c),v=(y=i+1)*I*this._getFontScale(),y>1&&(v+=0*(y-1)),T.width=O,T.height=L,O<=0&&(T.width=parseFloat(a.toFixed(2))+2*l.margin),L<=0&&(T.height=parseFloat(v.toFixed(2))+2*l.margin),b=T.height,A=0,P!==o.CLAMP&&(h>0&&(b=T.height+h),u<-v&&(A=v+u)),!0},r._getFirstCharLen=function(){return 1},r._getFontScale=function(){return P===o.SHRINK?x:1},r._getFirstWordLen=function(t,e,i){var n=t.charAt(e);if(s.isUnicodeCJK(n)||"\n"===n||s.isUnicodeSpace(n))return 1;var r=1,a=l.fontAtlas.getLetterDefinitionForChar(n,l);if(!a)return r;for(var o=a.xAdvance*x+B,c=e+1;cF&&!s.isUnicodeSpace(n)&&F>0)return r;if(o+=a.xAdvance*x+B,"\n"===n||s.isUnicodeSpace(n)||s.isUnicodeCJK(n))break;r++}return r},r._multilineTextWrapByWord=function(){return this._multilineTextWrap(this._getFirstWordLen)},r._multilineTextWrapByChar=function(){return this._multilineTextWrap(this._getFirstCharLen)},r._recordPlaceholderInfo=function(t,e){if(t>=f.length){var i=new c;f.push(i)}f[t].char=e,f[t].hash=e.charCodeAt(0)+l.hash,f[t].valid=!1},r._recordLetterInfo=function(t,e,i,n){if(i>=f.length){var r=new c;f.push(r)}var s=e.charCodeAt(0)+l.hash;f[i].line=n,f[i].char=e,f[i].hash=s,f[i].valid=l.fontAtlas.getLetter(s).valid,f[i].x=t.x,f[i].y=t.y},r._alignText=function(){v=0,d.length=0,this._multilineTextWrapByWord(),this._computeAlignmentOffset(),P===o.SHRINK&&w>0&&this._isVerticalClamp()&&this._shrinkLabelToContentSize(this._isVerticalClamp),this._updateQuads()||P===o.SHRINK&&this._shrinkLabelToContentSize(this._isHorizontalClamp)},r._scaleFontSizeDown=function(t){var e=!0;t||(t=.1,e=!1),w=t,e&&this._updateContent()},r._shrinkLabelToContentSize=function(t){for(var e=0,i=0|w,n=0;e>1;if(r<=0)break;x=r/E,this._multilineTextWrapByWord(),this._computeAlignmentOffset(),t()?i=n-1:e=n}var s=e;s>=0&&this._scaleFontSizeDown(s)},r._isVerticalClamp=function(){return v>T.height},r._isHorizontalClamp=function(){for(var t=!1,e=0,i=S.length;e0)if(R){if(d[a]>T.width&&(s>T.width||s<0)){t=!0;break}}else if(s>T.width){t=!0;break}}}return t},r._isHorizontalClamped=function(t,e){var i=d[e],n=t>T.width||t<0;return R?i>T.width&&n:n},r._updateQuads=function(){var t=C?C._texture:l.fontAtlas.getTexture(),e=u.node;this.verticesCount=this.indicesCount=0,this._renderData&&(this._renderData.dataLength=0);for(var i=T,n=e._anchorPoint.x*i.width,r=e._anchorPoint.y*i.height,s=!0,a=0,c=S.length;a0){if(m>b){var y=m-b;h.y+=y,h.height-=y,m-=y}m-d.h*x0&&this._isHorizontalClamped(w,v))if(P===o.CLAMP)h.width=0;else if(P===o.SHRINK){if(T.width>d.w){s=!1;break}h.width=0}if(h.height>0&&h.width>0){var E=this._determineRect(h),M=_.x+p[_.line];this.appendQuad(u,t,h,E,M-n,m-r,x)}}}return this._quadsUpdated(u),s},r._determineRect=function(t){var e=C.isRotated(),i=C._originalSize,n=C._rect,r=C._offset,s=r.x+(i.width-n.width)/2,a=r.y-(i.height-n.height)/2;if(e){var o=t.x;t.x=n.x+n.height-t.y-t.height-a,t.y=o+n.y-s,t.y<0&&(t.height=t.height+a)}else t.x+=n.x-s,t.y+=n.y+a;return e},r._computeAlignmentOffset=function(){switch(p.length=0,M){case a.TextAlignment.LEFT:for(var t=0;t0){var c=e.out||p;t.strokeStyle="rgba("+c.r+", "+c.g+", "+c.b+", "+c.a/255+")",t.lineWidth=2*e.margin,t.strokeText(this._char,s,a)}t.fillText(this._char,s,a),this._texture.handleLoadedTexture()},destroy:function(){this._texture.destroy(),this._texture=null,s._canvasPool.put(this._data)}},cc.js.mixin(g.prototype,{insertLetterTexture:function(t){var e=t._texture,i=e.width,n=e.height;if(this._x+i+m>this._width&&(this._x=m,this._y=this._nexty),this._y+n>this._nexty&&(this._nexty=this._y+n+m),this._nexty>this._height)return null;this._fontDefDictionary._texture.drawTextureAt(e,this._x,this._y),this._dirty=!0;var r=new f;return r.u=this._x+1,r.v=this._y+1,r.texture=this._fontDefDictionary._texture,r.valid=!0,r.w=t._width-2,r.h=t._height-2,r.xAdvance=r.w,r.offsetY=t._offsetY,this._x+=i+m,this._fontDefDictionary.addLetterDefinitions(t._hash,r),r},update:function(){this._dirty&&(this._fontDefDictionary._texture.update(),this._dirty=!1)},reset:function(){this._x=m,this._y=m,this._nexty=m;for(var t=this._fontDefDictionary._letterDefinitions,e=0,i=t.length;e0&&(n=n+e.margin+e.out.toHEX()),""+e.fontSize+e.fontFamily+i+n)},r._getFontDesc=function(){return _.fontSize.toString()+"px "+_.fontFamily},r._computeHorizontalKerningForText=function(){},r._determineRect=function(){return!1},n})(r.default);i.default=A,e.exports=i.default}),{"../../../assets/CCRenderTexture":113,"../../../components/CCComponent":148,"../../../components/CCLabel":150,"../../../components/CCLabelOutline":151,"../../../utils/text-utils":330,"../../webgl/assemblers/label/2d/bmfont":283,"../utils":278}],277:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r,s=(n=t("../../assembler-2d"))&&n.__esModule?n:{default:n},a=t("../../../utils/text-utils"),o=t("../../../platform/CCMacro"),l=t("../../../components/CCLabel"),c=t("../../../components/CCLabelOutline"),h=t("../../../components/CCLabelShadow"),u=l.Overflow,_=t("../utils").deleteFromDynamicAtlas,f=t("../utils").getFontFamily,d=(1/255).toFixed(3),p=null,m=null,y=null,v="",g="",b=0,A=0,x=[],C=cc.Size.ZERO,T=0,S=0,w=0,E=null,M="",D=u.NONE,B=!1,I=!1,P=null,R=cc.Color.WHITE,O=null,L=cc.Color.BLACK,F=cc.rect(),V=cc.Size.ZERO,N=cc.Size.ZERO,k=!1,z=!1,G=!1,U=0,j=cc.Vec2.ZERO,H=0,W=["left","center","right"],X=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=n.prototype;return s._getAssemblerData=function(){return(r=l._canvasPool.get()).canvas.width=r.canvas.height=1,r},s._resetAssemblerData=function(t){t&&l._canvasPool.put(t)},s.updateRenderData=function(e){t.prototype.updateRenderData.call(this,e),e._vertsDirty&&(this._updateProperties(e),this._calculateLabelFont(),this._updateLabelDimensions(),this._updateTexture(e),this._calDynamicAtlas(e),e._actualFontSize=b,e.node.setContentSize(N),this.updateVerts(e),e._vertsDirty=!1,p=null,m=null,y=null)},s.updateVerts=function(){},s._updatePaddingRect=function(){var t=0,e=0,i=0,n=0,r=0;if(V.width=V.height=0,P&&(t=e=i=n=r=P.width,V.width=V.height=2*r),O){var s=O.blur+r;i=Math.max(i,-O._offset.x+s),n=Math.max(n,O._offset.x+s),t=Math.max(t,O._offset.y+s),e=Math.max(e,-O._offset.y+s)}if(z){var a=A*Math.tan(.20943951);n+=a,V.width+=a}F.x=i,F.y=t,F.width=i+n,F.height=t+e},s._updateProperties=function(t){var e=t._assemblerData;p=e.context,m=e.canvas,y=t._frame._original?t._frame._original._texture:t._frame._texture,g=t.string.toString(),b=t._fontSize,A=b,U=t.underlineHeight||A/8,D=t.overflow,C.width=t.node.width,C.height=t.node.height,N=t.node.getContentSize(),T=t._lineHeight,S=t.horizontalAlign,w=t.verticalAlign,E=t.node.color,k=t.enableBold,z=t.enableItalic,G=t.enableUnderline,M=f(t),I=t.srcBlendFactor===cc.macro.BlendFactor.ONE,B=D!==u.NONE&&(D===u.RESIZE_HEIGHT||t.enableWrapText),(P=(P=c&&t.getComponent(c))&&P.enabled&&P.width>0?P:null)&&R.set(P.color),(O=(O=h&&t.getComponent(h))&&O.enabled?O:null)&&(L.set(O.color),L.a=L.a*t.node.color.a/255),this._updatePaddingRect()},s._calculateFillTextStartPosition=function(){var t=0;S===o.TextAlignment.RIGHT?t=C.width-F.width:S===o.TextAlignment.CENTER&&(t=(C.width-F.width)/2);var e=this._getLineHeight()*(x.length-1),i=b*(1-a.BASELINE_RATIO/2);if(w!==o.VerticalTextAlignment.TOP){var n=e+F.height+b-C.height;w===o.VerticalTextAlignment.BOTTOM?i-=n+=a.BASELINE_RATIO/2*b:i-=n/2}return i+=a.BASELINE_OFFSET*b,cc.v2(t+F.x,i+F.y)},s._setupOutline=function(){p.strokeStyle="rgba("+R.r+", "+R.g+", "+R.b+", "+R.a/255+")",p.lineWidth=2*P.width},s._setupShadow=function(){p.shadowColor="rgba("+L.r+", "+L.g+", "+L.b+", "+L.a/255+")",p.shadowBlur=O.blur,p.shadowOffsetX=O.offset.x,p.shadowOffsetY=-O.offset.y},s._drawTextEffect=function(t,e){if(O||P||G){var i=x.length>1&&O,n=this._measureText(p,v),r=0,s=0;O&&this._setupShadow(),P&&this._setupOutline();for(var a=0;a>1)<=0){cc.logID(4003);break}b=h,v=this._getFontDesc(),p.font=v;var u=this._getLineHeight();for(n=0,i=0;io?c=h-1:l=h}0===l?cc.logID(4003):(b=l,v=this._getFontDesc(),p.font=v)}else{for(n=t.length*this._getLineHeight(),i=0;ir?e:r}i=(x.length+a.BASELINE_RATIO)*this._getLineHeight();var s=parseFloat(e.toFixed(2)),o=parseFloat(i.toFixed(2));C.width=s+F.width,C.height=o+F.height,N.width=s+V.width,N.height=o+V.height;break;case u.SHRINK:this._calculateShrinkFont(t),this._calculateWrapText(t);break;case u.CLAMP:this._calculateWrapText(t);break;case u.RESIZE_HEIGHT:this._calculateWrapText(t);var l=(x.length+a.BASELINE_RATIO)*this._getLineHeight();C.height=l+F.height,N.height=l+V.height}},n})(s.default);i.default=X,e.exports=i.default}),{"../../../components/CCLabel":150,"../../../components/CCLabelOutline":151,"../../../components/CCLabelShadow":152,"../../../platform/CCMacro":243,"../../../utils/text-utils":330,"../../assembler-2d":264,"../utils":278}],278:[(function(t,e){"use strict";var i=t("./dynamic-atlas/manager"),n=cc.Color.WHITE,r={fontAtlas:null,fontSize:0,lineHeight:0,hAlign:0,vAlign:0,hash:"",fontFamily:"",fontDesc:"Arial",color:n,isOutlined:!1,out:n,margin:0};e.exports={deleteFromDynamicAtlas:function(t,e){e&&e._original&&i&&(i.deleteAtlasSpriteFrame(e),e._resetDynamicAtlasFrame())},getFontFamily:function(t){return t.useSystemFont?t.fontFamily||"Arial":t.font?t.font._nativeAsset?t.font._nativeAsset:(cc.assetManager.postLoadNative(t.font,(function(){t.isValid&&t.setVertsDirty()})),"Arial"):"Arial"},shareLabelInfo:r}}),{"./dynamic-atlas/manager":273}],279:[(function(t,e){"use strict";function i(t,e,i){i=i||2;var r,a,o,l,c,u,_,f=e&&e.length,d=f?e[0]*i:t.length,p=n(t,0,d,i,!0),m=[];if(!p)return m;if(f&&(p=h(t,e,p,i)),t.length>80*i){r=o=t[0],a=l=t[1];for(var y=i;yo&&(o=c),u>l&&(l=u);_=Math.max(o-r,l-a)}return s(p,m,i,r,a,_),m}function n(t,e,i,n,r){var s,a;if(r===B(t,e,i,n)>0)for(s=e;s=e;s-=n)a=E(s,t[s],t[s+1],a);return a&&A(a,a.next)&&(M(a),a=a.next),a}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!A(n,n.next)&&0!==b(n.prev,n,n.next))n=n.next;else{if(M(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function s(t,e,i,n,h,u,_){if(t){!_&&u&&d(t,n,h,u);for(var f,p,m=t;t.prev!==t.next;)if(f=t.prev,p=t.next,u?o(t,n,h,u):a(t))e.push(f.i/i),e.push(t.i/i),e.push(p.i/i),M(t),t=p.next,m=p.next;else if((t=p)===m){_?1===_?s(t=l(t,e,i),e,i,n,h,u,2):2===_&&c(t,e,i,n,h,u):s(r(t),e,i,n,h,u,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(b(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(v(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&b(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function o(t,e,i,n){var r=t.prev,s=t,a=t.next;if(b(r,s,a)>=0)return!1;for(var o=r.xs.x?r.x>a.x?r.x:a.x:s.x>a.x?s.x:a.x,h=r.y>s.y?r.y>a.y?r.y:a.y:s.y>a.y?s.y:a.y,u=m(o,l,e,i,n),_=m(c,h,e,i,n),f=t.nextZ;f&&f.z<=_;){if(f!==t.prev&&f!==t.next&&v(r.x,r.y,s.x,s.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=u;){if(f!==t.prev&&f!==t.next&&v(r.x,r.y,s.x,s.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function l(t,e,i){var n=t;do{var r=n.prev,s=n.next.next;!A(r,s)&&x(r,n,n.next,s)&&T(r,s)&&T(s,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(s.i/i),M(n),M(n.next),n=t=s),n=n.next}while(n!==t);return n}function c(t,e,i,n,a,o){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&g(l,c)){var h=w(l,c);return l=r(l,l.next),h=r(h,h.next),s(l,e,i,n,a,o),void s(h,e,i,n,a,o)}c=c.next}l=l.next}while(l!==t)}function h(t,e,i,s){var a,o,l,c=[];for(a=0,o=e.length;a=n.next.y){var o=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=r&&o>a){if(a=o,o===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x=n.x&&n.x>=h&&v(si.x)&&T(n,t)&&(i=n,_=l),n=n.next;return i}function d(t,e,i,n){var r=t;do{null===r.z&&(r.z=m(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,p(r)}function p(t){var e,i,n,r,s,a,o,l,c=1;do{for(i=t,t=null,s=null,a=0;i;){for(a++,n=i,o=0,e=0;e0||l>0&&n;)0===o?(r=n,n=n.nextZ,l--):0!==l&&n?i.z<=n.z?(r=i,i=i.nextZ,o--):(r=n,n=n.nextZ,l--):(r=i,i=i.nextZ,o--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,c*=2}while(a>1);return t}function m(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function y(t){var e=t,i=t;do{e.x=0&&(t-a)*(n-o)-(i-a)*(e-o)>=0&&(i-a)*(s-o)-(r-a)*(n-o)>=0}function g(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!C(t,e)&&T(t,e)&&T(e,t)&&S(t,e)}function b(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function A(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(A(t,e)&&A(i,n)||A(t,n)&&A(i,e))||b(t,e,i)>0!=b(t,e,n)>0&&b(i,n,t)>0!=b(i,n,e)>0}function C(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&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}function T(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function S(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}function w(t,e){var i=new D(t.i,t.x,t.y),n=new D(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function E(t,e,i,n){var r=new D(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function M(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)}function D(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}function B(t,e,i,n){for(var r=0,s=e,a=i-n;s0&&(n+=t[r-1].length,i.holes.push(n))}return i}}),{}],280:[(function(t,e){"use strict";var i=t("../../../../graphics/helper"),n=t("../../../../graphics/types").PointFlags,r=cc.Graphics.Point=cc.Class({name:"cc.GraphicsPoint",extends:cc.Vec2,ctor:function(){this.reset()},reset:function(){this.dx=0,this.dy=0,this.dmx=0,this.dmy=0,this.flags=0,this.len=0}});function s(){this.reset()}function a(){this._tessTol=.25,this._distTol=.01,this._updatePathOffset=!1,this._paths=null,this._pathLength=0,this._pathOffset=0,this._points=null,this._pointsOffset=0,this._commandx=0,this._commandy=0,this._paths=[],this._points=[]}cc.js.mixin(s.prototype,{reset:function(){this.closed=!1,this.nbevel=0,this.complex=!0,this.points?this.points.length=0:this.points=[]}}),cc.js.mixin(a.prototype,{moveTo:function(t,e){this._updatePathOffset&&(this._pathOffset=this._pathLength,this._updatePathOffset=!1),this._addPath(),this._addPoint(t,e,n.PT_CORNER),this._commandx=t,this._commandy=e},lineTo:function(t,e){this._addPoint(t,e,n.PT_CORNER),this._commandx=t,this._commandy=e},bezierCurveTo:function(t,e,r,s,a,o){var l=this._curPath,c=l.points[l.points.length-1];c.x!==t||c.y!==e||r!==a||s!==o?(i.tesselateBezier(this,c.x,c.y,t,e,r,s,a,o,0,n.PT_CORNER),this._commandx=a,this._commandy=o):this.lineTo(a,o)},quadraticCurveTo:function(t,e,i,n){var r=this._commandx,s=this._commandy;this.bezierCurveTo(r+2/3*(t-r),s+2/3*(e-s),i+2/3*(t-i),n+2/3*(e-n),i,n)},arc:function(t,e,n,r,s,a){i.arc(this,t,e,n,r,s,a)},ellipse:function(t,e,n,r){i.ellipse(this,t,e,n,r),this._curPath.complex=!1},circle:function(t,e,n){i.ellipse(this,t,e,n,n),this._curPath.complex=!1},rect:function(t,e,i,n){this.moveTo(t,e),this.lineTo(t,e+n),this.lineTo(t+i,e+n),this.lineTo(t+i,e),this.close(),this._curPath.complex=!1},roundRect:function(t,e,n,r,s){i.roundRect(this,t,e,n,r,s),this._curPath.complex=!1},clear:function(t){this._pathLength=0,this._pathOffset=0,this._pointsOffset=0,this._curPath=null,t&&(this._paths.length=0,this._points.length=0)},close:function(){this._curPath.closed=!0},_addPath:function(){var t=this._pathLength,e=this._paths[t];return e?e.reset():(e=new s,this._paths.push(e)),this._pathLength++,this._curPath=e,e},_addPoint:function(t,e,i){var n=this._curPath;if(n){var s,a=this._points,o=n.points;(s=a[this._pointsOffset++])?(s.x=t,s.y=e):(s=new r(t,e),a.push(s)),s.flags=i,o.push(s)}}}),cc.Graphics._Impl=a,e.exports=a}),{"../../../../graphics/helper":202,"../../../../graphics/types":204}],281:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(t("../../../assembler")),r=s(t("../../../../../renderer/core/input-assembler"));function s(t){return t&&t.__esModule?t:{default:t}}var a=t("../../mesh-buffer"),o=t("../../../index"),l=t("../../../../graphics/graphics"),c=t("../../../../graphics/types").PointFlags,h=l.LineJoin,u=l.LineCap,_=t("./earcut");t("./impl");var f=Math.PI,d=Math.min,p=Math.max,m=Math.ceil,y=Math.acos,v=Math.cos,g=Math.sin,b=Math.atan2;function A(t,e,i){return ti?i:t}var x=cc.gfx,C=new x.VertexFormat([{name:x.ATTR_POSITION,type:x.ATTR_TYPE_FLOAT32,num:2},{name:x.ATTR_COLOR,type:x.ATTR_TYPE_UINT8,num:4,normalize:!0},{name:"a_dist",type:x.ATTR_TYPE_FLOAT32,num:1}]);C.name="vfmtPosColorSdf";var T=(function(t){var e,i;function n(e){var i;return(i=t.call(this,e)||this)._buffer=null,i._buffers=[],i._bufferOffset=0,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=n.prototype;return s.getVfmt=function(){return C},s.getVfmtFloatCount=function(){return 4},s.requestBuffer=function(){var t={indiceStart:0,vertexStart:0},e=new a(o._handle,this.getVfmt());t.meshbuffer=e;var i=new r.default(e._vb,e._ib);return t.ia=i,this._buffers.push(t),t},s.getBuffers=function(){return 0===this._buffers.length&&this.requestBuffer(),this._buffers},s.clear=function(t){this._bufferOffset=0;var e=this._buffers;if(t){for(var i=0,n=e.length;i65535||3*s>131070)&&(++this._bufferOffset,s=e,this._bufferOffsetr.vertexOffset&&r.requestStatic(e,3*e),this._buffer=n,n},s.stroke=function(t){this._curColor=t._strokeColor._val,this._flattenPaths(t._impl),this._expandStroke(t),t._impl._updatePathOffset=!0},s.fill=function(t){this._curColor=t._fillColor._val,this._expandFill(t),t._impl._updatePathOffset=!0},s._expandStroke=function(t){var e,i,n,r,s=.5*t.lineWidth,a=t.lineCap,o=t.lineJoin,l=t.miterLimit,_=t._impl,d=(e=s,i=f,n=_._tessTol,r=2*y(e/(e+n)),p(2,m(i/r)));this._calculateJoins(_,s,o,l);for(var v=_._paths,g=0,b=_._pathOffset,A=_._pathLength;b0&&(r=1/e);for(var s=t._paths,a=t._pathOffset,o=t._pathLength;a1e-6){var T=1/v;T>600&&(T=600),m.dmx*=T,m.dmy*=T}m.dx*f.dy-f.dx*m.dy>0&&(m.flags|=c.PT_LEFT),v*(g=p(11,d(f.len,m.len)*r))*g<1&&(m.flags|=c.PT_INNERBEVEL);var S=m.dmx*e,w=m.dmy*e,E=S*S+w*w;(E>m.len*m.len||E>f.len*f.len)&&(m.flags|=c.PT_INNERBEVEL),m.flags&c.PT_CORNER&&(v*n*n<1||i===h.BEVEL||i===h.ROUND)&&(m.flags|=c.PT_BEVEL),0!=(m.flags&(c.PT_BEVEL|c.PT_INNERBEVEL))&&l.nbevel++,f=m,m=u[y+1]}}},s._flattenPaths=function(t){for(var e=t._paths,i=t._pathOffset,n=t._pathLength;i2&&a.equals(o)&&(r.closed=!0,s.pop(),a=s[s.length-1]);for(var l=0,c=s.length;lC&&(T-=2*f),this._vset(d,p,1),this._vset(h-s*n,e.y-a*n,-1);for(var S=A(m((C-T)/f)*r,2,r),w=0;w "+n+"/"+i+".")},e._updateCfgFlag=function(t){var e=this._cfgFields.updateFlags;this._setBufferFlag(this._cfg,e.offset,e.size,e.type,t)},e._setBufferValue=function(t,e,i,n,r){"float"==n&&4==i?t.setFloat32(e,r,jsb.__isLittleEndian__):"int32"==n&&4==i?t.setInt32(e,r,jsb.__isLittleEndian__):"bool"==n&&1==i?t.setInt8(e,r?1:0,jsb.__isLittleEndian__):"Color4B"==n&&4==i?(t.setUint8(e,r.r),t.setUint8(e+1,r.g),t.setUint8(e+2,r.b),t.setUint8(e+3,r.a)):"int8"==n&&1==i?t.setUint8(e,r):cc.warn("dont know how to set value to buffer, type/size -> "+n+"/"+i+".")},e._setFieldValue=function(t,e,i,n){var r=e[i];this._setBufferValue(t,r.offset,r.size,r.type,n)},e._getBufferValue=function(t,e,i,n){return"float"==n&&4==i?t.getFloat32(e,jsb.__isLittleEndian__):"int32"==n&&4==i?t.getInt32(e,jsb.__isLittleEndian__):"bool"==n&&1==i?0!=t.getInt8(e,jsb.__isLittleEndian__):"Color4B"==n&&4==i?{r:t.getUint8(e),g:t.getUint8(e+1),b:t.getUint8(e+2),a:t.getUint8(e+3)}:"int8"==n&&1==i?t.getUint8(e):void cc.warn("dont know how to get value from buffer, type/size -> "+n+"/"+i+".")},e._getFieldValue=function(t,e,i){var n=e[i];return this._getBufferValue(t,n.offset,n.size,n.type)},e._getLayoutValue=function(t){return this._getFieldValue(this._layoutInfo,this._layoutFields,t)},e._setLayoutValue=function(t,e){return this._setFieldValue(this._layoutInfo,this._layoutFields,t,e)},e._updateCfgFlag_Content=function(){this._updateCfgFlag(1)},e._updateCfgFlag_Font=function(){this._updateCfgFlag(2)},e._colorEqual=function(t,e){return t.r==e.r&&t.g==e.g&&t.b==e.b&&t.a==e.a},e._colorToObj=function(t,e,i,n){return{r:t,g:e,b:i,a:n}},e.setString=function(t){t!=this._layout.string&&(this._layout.string=t,this._updateCfgFlag_Content())},e.setFontPath=function(t){t!=this._layout.fontPath&&(this._layout.fontPath=t,this._updateCfgFlag_Font())},e.setFontSize=function(t,e){this._getFieldValue(this._cfg,this._cfgFields,"fontSize")!=t&&(this._setFieldValue(this._cfg,this._cfgFields,"fontSize",t),this._setFieldValue(this._cfg,this._cfgFields,"fontSizeRetina",e),this._updateCfgFlag_Font())},e.setOutline=function(t){var e=this._getLayoutValue("outlineSize");e>0!=t>0&&this._updateCfgFlag_Font(),e!=t&&(this._updateCfgFlag_Content(),this._setLayoutValue("outlineSize",t))},e.setOutlineColor=function(t){var e=this._getLayoutValue("outlineColor");this._colorEqual(e,t)||(this._setLayoutValue("outlineColor",t),this._updateCfgFlag_Content())},e.setLineHeight=function(t){this._getLayoutValue("lineHeight")!=t&&(this._setLayoutValue("lineHeight",t),this._updateCfgFlag_Content())},e.setOverFlow=function(t){this._getLayoutValue("overflow")!=t&&(this._setLayoutValue("overflow",t),this._updateCfgFlag_Content())},e.setEnableWrap=function(t){this._getLayoutValue("wrap")!=t&&(this._setLayoutValue("wrap",t),this._updateCfgFlag_Content())},e.setVerticalAlign=function(t){this._getLayoutValue("valign")!=t&&(this._setLayoutValue("valign",t),this._updateCfgFlag_Content())},e.setHorizontalAlign=function(t){this._getLayoutValue("halign")!=t&&(this._setLayoutValue("halign",t),this._updateCfgFlag_Content())},e.setContentSize=function(t,e){var i=this._getLayoutValue("width"),n=this._getLayoutValue("height");i==t&&n==e||(this._setLayoutValue("height",e),this._setLayoutValue("width",t),this._updateCfgFlag_Content())},e.setAnchorPoint=function(t,e){var i=this._getLayoutValue("anchorX"),n=this._getLayoutValue("anchorY");i==t&&n==e||(this._setLayoutValue("anchorX",t),this._setLayoutValue("anchorY",e),this._updateCfgFlag_Content())},e.setColor=function(t){var e=this._getLayoutValue("color");this._colorEqual(e,t)||(this._setLayoutValue("color",t),this._updateCfgFlag_Content())},e.setShadow=function(t,e,i){var n=this._getLayoutValue("shadowBlur"),r=this._getLayoutValue("shadowX"),s=this._getLayoutValue("shadowY");n>0!=i>0&&this._updateCfgFlag_Font();var a=!1;n!=i&&(this._setLayoutValue("shadowBlur",i),a=!0),r!=t&&(this._setLayoutValue("shadowX",t),a=!0),s!=e&&(this._setLayoutValue("shadowY",e),a=!0),a&&this._updateCfgFlag_Content()},e.setShadowColor=function(t){var e=this._getLayoutValue("shadowColor");this._colorEqual(e,t)||(this._setLayoutValue("shadowColor",t),this._updateCfgFlag_Content())},e.setItalic=function(t){this._getLayoutValue("italic")!=t&&(this._setLayoutValue("italic",t),this._updateCfgFlag_Content())},e.setBold=function(t){this._getLayoutValue("bold")!=t&&(this._setLayoutValue("bold",t),this._updateCfgFlag_Content(),this._updateCfgFlag_Font())},e.setUnderline=function(t){this._getLayoutValue("underline")!=t&&(this._setLayoutValue("underline",t),this._updateCfgFlag_Content())},e.setSpacingX=function(t){this._getLayoutValue("spaceX")==t||"number"!=typeof t||isNaN(t)||(this._setLayoutValue("spaceX",t),this._updateCfgFlag_Content())},e.updateRenderData=function(t){if(t._vertsDirty){t.font&&t.font.nativeUrl&&this.setFontPath(cc.assetManager.cacheManager.getCache(t.font.nativeUrl)||t.font.nativeUrl);var e=this._layout,i=t.node.color,n=t.node,r=t.fontSize;this.setString(t.string),this.setFontSize(t.fontSize,r/72*t.fontSize),this.setLineHeight(t.lineHeight),this.setEnableWrap(t.enableWrapText),this.setItalic(t.enableItalic),this.setUnderline(t.enableUnderline),this.setBold(t.enableBold),this.setOverFlow(t.overflow),this.setVerticalAlign(t.verticalAlign),this.setHorizontalAlign(t.horizontalAlign),this.setSpacingX(t.spacingX),this.setContentSize(n.getContentSize().width,n.getContentSize().height),this.setAnchorPoint(n.anchorX,n.anchorY),this.setColor(this._colorToObj(i.getR(),i.getG(),i.getB(),Math.ceil(i.getA()*n.opacity/255)));var s=n.getComponent(cc.LabelShadow);if(s&&s.enabled){var a=s.color;this.setShadow(s.offset.x,s.offset.y,s.blur),this.setShadowColor(this._colorToObj(a.getR(),a.getG(),a.getB(),Math.ceil(a.getA()*n.opacity/255)))}else this.setShadow(0,0,-1);this._updateTTFMaterial(t),e.render()}},e._bindMaterial=function(t){var e=this.labelMaterial;return e||(e=r.default.createWithBuiltin("2d-label",t),this.labelMaterial=e),e},e._updateTTFMaterial=function(t){var e=this._bindMaterial(t),i=this._label.node,n=this._layout,r=i.getComponent(cc.LabelOutline),s=0;if(r&&r.enabled&&r.width>0){s=Math.max(Math.min(r.width/10,.4),.1);var a=r.color;this.setOutlineColor(this._colorToObj(a.getR(),a.getG(),a.getB(),Math.ceil(a.getA()*i.opacity/255)))}this.setOutline(s),e.define("CC_USE_MODEL",!0),e.define("USE_TEXTURE_ALPHAONLY",!0),e.define("USE_SDF",s>0||t.enableBold),e.define("USE_SDF_EXTEND",t.enableBold?1:0),void 0!==e.getDefine("CC_SUPPORT_standard_derivatives")&&cc.sys.glExtension("OES_standard_derivatives")&&e.define("CC_SUPPORT_standard_derivatives",!0),n.setEffect(e.effect._nativeObj)},e.fillBuffers=function(){this._layout.render()},e.getVfmt=function(){},t})();i.default=s,e.exports=i.default}),{"../../../../../assets/material/CCMaterial":123,"../../../../../assets/material/material-variant":130,"../../../../../components/CCLabel":150,"../../../../../components/CCLabelOutline":151,"../../../../../components/CCLabelShadow":152}],286:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../../../../utils/label/ttf"))&&n.__esModule?n:{default:n},s=t("../../../../../components/CCLabelShadow"),a=cc.color(255,255,255,255),o=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.updateUVs=function(t){for(var e=this._renderData.vDatas[0],i=t._frame.uv,n=this.uvOffset,r=this.floatsPerVert,s=0;s<4;s++){var a=2*s,o=r*s+n;e[o]=i[a],e[o+1]=i[a+1]}},r.updateColor=function(e){a._fastSetA(e.node._color.a);var i=a._val;t.prototype.updateColor.call(this,e,i)},r.updateVerts=function(t){var e=t.node,i=t._ttfTexture.width,n=t._ttfTexture.height,r=e.anchorX*e.width,a=e.anchorY*e.height,o=s&&t.getComponent(s);if(o&&o._enabled){var l=(i-e.width)/2,c=(n-e.height)/2,h=o.offset;-h.x>l?r+=i-e.width:l>h.x&&(r+=l-h.x),-h.y>c?a+=n-e.height:c>h.y&&(a+=c-h.y)}var u=this._local;u[0]=-r,u[1]=-a,u[2]=i-r,u[3]=n-a,this.updateUVs(t),this.updateWorldVerts(t)},n})(r.default);i.default=o,e.exports=i.default}),{"../../../../../components/CCLabelShadow":152,"../../../../utils/label/ttf":277}],287:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../../../../../value-types/vec3"))&&n.__esModule?n:{default:n},s=t("../../../../assembler-3d"),a=t("../2d/bmfont"),o=new r.default,l=new r.default,c=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}return i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n})(a);i.default=c,cc.js.mixin(c.prototype,s,{updateWorldVerts:function(t){for(var e=t.node._worldMatrix,i=this._local,n=this._renderData.vDatas[0],s=this.floatsPerVert,a=0;a=32||this.pool.push(t)}},e.default.register(cc.Label,{getConstructor:function(t){var e=t.node.is3DNode,c=e?a.default:n.default;return t.font instanceof cc.BitmapFont?c=e?o.default:r.default:t.cacheMode===i.default.CacheMode.CHAR&&(cc.sys.platform===cc.sys.WECHAT_GAME_SUB?cc.warn("sorry, subdomain does not support CHAR mode currently!"):c=e?l.default:s.default),c},TTF:n.default,Bmfont:r.default,Letter:s.default,TTF3D:a.default,Bmfont3D:o.default,Letter3D:l.default,NativeTTF:void 0})}),{"../../../../components/CCLabel":150,"../../../assembler":267,"./2d/bmfont":283,"./2d/letter":284,"./2d/nativeTTF":285,"./2d/ttf":286,"./3d/bmfont":287,"./3d/letter":288,"./3d/ttf":289}],291:[(function(t,e,i){"use strict";i.__esModule=!0,i.MaskAssembler=void 0;var n,r=(n=t("../../assembler"))&&n.__esModule?n:{default:n},s=t("../../../components/CCMask"),a=t("../../render-flow"),o=t("./sprite/2d/simple"),l=t("./graphics"),c=t("../../../../renderer/gfx"),h=t("../vertex-format").vfmtPos,u=8,_=[];function f(){return 1<<_.length-1}function d(){for(var t=0,e=0;e<_.length;++e)t+=1<u&&cc.errorID(9e3,u),_.push(t)}function y(t,e){0===_.length&&cc.errorID(9001),_.pop(),0===_.length?e._flushMaterial(t._exitMaterial):b(e)}function v(t,e){var i=c.DS_FUNC_NEVER,n=f(),r=n,s=n,a=t.inverted?c.STENCIL_OP_REPLACE:c.STENCIL_OP_ZERO;p(t._clearMaterial,i,a,n,r,s);var o=e.getBuffer("mesh",h),l=o.request(4,6),u=l.indiceOffset,_=l.byteOffset>>2,d=l.vertexOffset,m=o._vData,y=o._iData;m[_++]=-1,m[_++]=-1,m[_++]=-1,m[_++]=1,m[_++]=1,m[_++]=1,m[_++]=1,m[_++]=-1,y[u++]=d,y[u++]=d+3,y[u++]=d+1,y[u++]=d+1,y[u++]=d+3,y[u++]=d+2,e.node=e._dummyNode,e.material=t._clearMaterial,e._flush()}function g(t,e){var i=c.DS_FUNC_NEVER,n=f(),r=n,a=n,h=t.inverted?c.STENCIL_OP_ZERO:c.STENCIL_OP_REPLACE;p(t._materials[0],i,h,n,r,a),e.material=t._materials[0],t._type===s.Type.IMAGE_STENCIL?(e.node=e._dummyNode,o.prototype.fillBuffers.call(t._assembler,t,e),e._flush()):(e.node=t.node,l.prototype.fillBuffers.call(t._graphics._assembler,t._graphics,e))}function b(t){var e=c.DS_FUNC_EQUAL,i=c.STENCIL_OP_KEEP,n=d(),r=n,s=f(),a=_[_.length-1];p(a._enableMaterial,e,i,n,r,s),t._flushMaterial(a._enableMaterial)}var A=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.updateRenderData=function(t){t._type===s.Type.IMAGE_STENCIL?t.spriteFrame?o.prototype.updateRenderData.call(this,t):t.setMaterial(0,null):(t._graphics.setMaterial(0,t._materials[0]),l.prototype.updateRenderData.call(t._graphics._assembler,t._graphics,t._graphics))},r.fillBuffers=function(t,e){(t._type!==s.Type.IMAGE_STENCIL||t.spriteFrame)&&(m(t),v(t,e),g(t,e),b(e)),t.node._renderFlag|=a.FLAG_UPDATE_RENDER_DATA},r.postFillBuffers=function(t,e){(t._type!==s.Type.IMAGE_STENCIL||t.spriteFrame)&&y(t,e),t.node._renderFlag|=a.FLAG_UPDATE_RENDER_DATA},n})(o);i.MaskAssembler=A,r.default.register(s,A)}),{"../../../../renderer/gfx":371,"../../../components/CCMask":154,"../../assembler":267,"../../render-flow":271,"../vertex-format":312,"./graphics":281,"./sprite/2d/simple":296}],292:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../../assembler-2d"))&&n.__esModule?n:{default:n},s=t("../../../components/CCMotionStreak"),a=t("../../render-flow");function o(t,e){this.point=t||cc.v2(),this.dir=e||cc.v2(),this.distance=0,this.time=0}o.prototype.setPoint=function(t,e){this.point.x=t,this.point.y=e},o.prototype.setDir=function(t,e){this.dir.x=t,this.dir.y=e},cc.v2(),cc.v2();var l=cc.v2(),c=cc.v2();function h(t,e){return t.x=-e.y,t.y=e.x,t}var u=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.initData=function(){this._renderData.createFlexData(0,16,42)},r.update=function(t,e){var i,n=t._stroke/2,r=t.node._worldMatrix.m,s=r[12],a=r[13],u=t._points;if(u.length>1){var _=u[0].point.x-s,f=u[0].point.y-a;_*_+f*f=0;E--){var M=u[E],D=M.point,B=M.dir;if(M.time-=e,M.time<0)u.splice(E,1);else{var I=M.time/S,P=u[E-1];if(!w){if(!P){u.splice(E,1);continue}D.x=P.point.x-B.x*I,D.y=P.point.y-B.y*I}w=!0,h(l,B);var R=(I*b<<24>>>0)+(g<<16)+(v<<8)+y,O=5*p;C[O]=D.x+l.x*n,C[O+1]=D.y+l.y*n,C[O+2]=1,C[O+3]=I,T[O+4]=R,C[O+=5]=D.x-l.x*n,C[O+1]=D.y-l.y*n,C[O+2]=0,C[O+3]=I,T[O+4]=R,p+=2}}d=p<=2?0:3*(p-2),x.used(p,d)}},r.fillBuffers=function(t,e){var i=this._renderData._flexBuffer,n=i.vData,r=i.usedVertices,s=i.usedIndices,o=i.usedVerticesFloats,l=e._meshBuffer,c=l.request(r,s),h=c.byteOffset>>2,u=l._vData;n.length+h>u.length?u.set(n.subarray(0,o),h):u.set(n,h);for(var _=l._iData,f=c.indiceOffset,d=c.vertexOffset,p=0,m=r;p1?1:n)<0?0:n;var r=(i=(i=i>1?1:i)<0?0:i)+(n=(n-=i)<0?0:n);r=r>1?1:r,this.updateUVs(t,i,r),this.updateVerts(t,i,r),t._vertsDirty=!1}},r.updateUVs=function(t,e,i){var n,r,a,o,l,c,h,u,_,f,d=t._spriteFrame,p=d._texture.width,m=d._texture.height,y=d._rect;d._rotated?(n=y.x/p,r=(y.y+y.width)/m,a=l=n,h=_=(y.x+y.height)/p,c=f=r,o=u=y.y/m):(n=y.x/p,r=(y.y+y.height)/m,a=h=n,l=_=(y.x+y.width)/p,o=c=r,u=f=y.y/m);var v=this._renderData.vDatas[0],g=this.uvOffset,b=this.floatsPerVert;switch(t._fillType){case s.HORIZONTAL:v[g]=a+(l-a)*e,v[g+1]=o+(c-o)*e,v[g+b]=a+(l-a)*i,v[g+b+1]=o+(c-o)*i,v[g+2*b]=h+(_-h)*e,v[g+2*b+1]=u+(f-u)*e,v[g+3*b]=h+(_-h)*i,v[g+3*b+1]=u+(f-u)*i;break;case s.VERTICAL:v[g]=a+(h-a)*e,v[g+1]=o+(u-o)*e,v[g+b]=l+(_-l)*e,v[g+b+1]=c+(f-c)*e,v[g+2*b]=a+(h-a)*i,v[g+2*b+1]=o+(u-o)*i,v[g+3*b]=l+(_-l)*i,v[g+3*b+1]=c+(f-c)*i;break;default:cc.errorID(2626)}},r.updateVerts=function(t,e,i){var n,r=t.node,a=r.width,o=r.height,l=r.anchorX*a,c=r.anchorY*o,h=-l,u=-c,_=a-l,f=o-c;switch(t._fillType){case s.HORIZONTAL:n=h+(_-h)*i,h+=(_-h)*e,_=n;break;case s.VERTICAL:n=u+(f-u)*i,u+=(f-u)*e,f=n;break;default:cc.errorID(2626)}var d=this._local;d[0]=h,d[1]=u,d[2]=_,d[3]=f,this.updateWorldVerts(t)},n})(r.default);i.default=a,e.exports=i.default}),{"../../../../../components/CCSprite":165,"../../../../assembler-2d":264}],294:[(function(t,e,i){"use strict";var n;i.__esModule=!0,i.default=void 0;var r=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.initData=function(){this._renderData.createFlexData(0,4,6,this.getVfmt())},r.updateRenderData=function(t){this.packToDynamicAtlas(t,t._spriteFrame);var e=t.spriteFrame;if(e){var i=e.vertices;if(i){this.verticesCount=i.x.length,this.indicesCount=i.triangles.length;var n=this._renderData._flexBuffer;n.reserve(this.verticesCount,this.indicesCount)&&(this.updateColor(t),t._vertsDirty=!0),n.used(this.verticesCount,this.indicesCount),this.updateIndices(i.triangles),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),this.updateWorldVerts(t),t._vertsDirty=!1)}}},r.updateIndices=function(t){this._renderData.iDatas[0].set(t)},r.updateUVs=function(t){for(var e=t.spriteFrame.vertices,i=e.nu,n=e.nv,r=this.uvOffset,s=this.floatsPerVert,a=this._renderData.vDatas[0],o=0;o0){var u=r.y+o*(t-r.x);a[0].x=t,a[0].y=u}if((e-r.x)*h>0){var _=r.y+o*(e-r.x);a[2].x=e,a[2].y=_}}if(0!==Math.sin(s)){if(l=h/c,(n-r.y)*c>0){var f=r.x+l*(n-r.y);a[3].x=f,a[3].y=n}if((i-r.y)*c>0){var d=r.x+l*(i-r.y);a[1].x=d,a[1].y=i}}}function d(t){var e=t.node,i=e.width,n=e.height,r=e.anchorX*i,s=e.anchorY*n,l=-r,c=-s,h=i-r,f=n-s,d=o;d[0]=l,d[1]=c,d[2]=h,d[3]=f;var p=t._fillCenter,m=u.x=Math.min(Math.max(0,p.x),1)*(h-l)+l,y=u.y=Math.min(Math.max(0,p.y),1)*(f-c)+c;a[0].x=a[3].x=l,a[1].x=a[2].x=h,a[0].y=a[1].y=c,a[2].y=a[3].y=f,_.length=0,m!==d[0]&&(_[0]=[3,0]),m!==d[2]&&(_[2]=[1,2]),y!==d[1]&&(_[1]=[0,1]),y!==d[3]&&(_[3]=[2,3])}function p(t,e){var i,n;if(i=e.x-t.x,n=e.y-t.y,0!==i||0!==n){if(0===i)return n>0?.5*Math.PI:1.5*Math.PI;var r=Math.atan(n/i);return i<0&&(r+=Math.PI),r}}var m=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.initData=function(){this._renderData.createFlexData(0,4,6,this.getVfmt()),this.updateIndices()},r.updateRenderData=function(e){t.prototype.updateRenderData.call(this,e);var i,n,r,a,_,p,m,y,v,g=e.spriteFrame;if(this.packToDynamicAtlas(e,g),e._vertsDirty){var b=e._fillStart,A=e._fillRange;for(A<0&&(b+=A,A=-A);b>=1;)b-=1;for(;b<0;)b+=1;b*=s,A*=s,d(e),p=(i=g)._texture.width,m=i._texture.height,y=i._rect,v=l,i._rotated?(n=y.x/p,r=(y.x+y.height)/p,a=y.y/m,_=(y.y+y.width)/m,v[0]=v[2]=n,v[4]=v[6]=r,v[3]=v[7]=_,v[1]=v[5]=a):(n=y.x/p,r=(y.x+y.width)/p,a=y.y/m,_=(y.y+y.height)/m,v[0]=v[4]=n,v[2]=v[6]=r,v[1]=v[3]=_,v[5]=v[7]=a),f(o[0],o[2],o[1],o[3],u,b,c),f(o[0],o[2],o[1],o[3],u,b+A,h),this.updateVerts(e,b,A),e._vertsDirty=!1}},r.updateVerts=function(t,e,i){var n=e+i,r=this._local;r.length=0;for(var o=0,l=3*this.floatsPerVert,f=0;f<4;++f){var d=_[f];if(d)if(i>=s)r.length=o+l,this._generateTriangle(r,o,u,a[d[0]],a[d[1]]),o+=l;else{var m=p(u,a[d[0]]),y=p(u,a[d[1]]);y=n||(m>=e?(r.length=o+l,y>=n?this._generateTriangle(r,o,u,a[d[0]],h[f]):this._generateTriangle(r,o,u,a[d[0]],a[d[1]]),o+=l):y<=e||(y<=n?(r.length=o+l,this._generateTriangle(r,o,u,c[f],a[d[1]]),o+=l):(r.length=o+l,this._generateTriangle(r,o,u,c[f],h[f]),o+=l))),m+=s,y+=s}}this.allocWorldVerts(t),this.updateWorldVerts(t)},r.allocWorldVerts=function(t){var e=t.node._color._val,i=this._renderData,n=this.floatsPerVert,r=this._local,s=r.length/n;this.verticesCount=this.indicesCount=s;var a=i._flexBuffer;a.reserve(s,s)&&this.updateIndices(),a.used(this.verticesCount,this.indicesCount);for(var o=i.vDatas[0],l=i.uintVDatas[0],c=this.uvOffset,h=0;h0)){this._renderData.createData(0,this.verticesFloats,this.indicesCount);for(var t=this._renderData.iDatas[0],e=0,i=0;i<3;++i)for(var n=0;n<3;++n){var r=4*i+n;t[e++]=r,t[e++]=r+1,t[e++]=r+4,t[e++]=r+1,t[e++]=r+5,t[e++]=r+4}}},r.initLocal=function(){this._local=[],this._local.length=8},r.updateRenderData=function(t){var e=t._spriteFrame;this.packToDynamicAtlas(t,e),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),t._vertsDirty=!1)},r.updateVerts=function(t){var e=t.node,i=e.width,n=e.height,r=e.anchorX*i,s=e.anchorY*n,a=t.spriteFrame,o=a.insetLeft,l=a.insetRight,c=a.insetTop,h=a.insetBottom,u=i-o-l,_=n-c-h,f=i/(o+l),d=n/(c+h);f=isNaN(f)||f>1?1:f,d=isNaN(d)||d>1?1:d,u=u<0?0:u,_=_<0?0:_;var p=this._local;p[0]=-r,p[1]=-s,p[2]=o*f-r,p[3]=h*d-s,p[4]=p[2]+u,p[5]=p[3]+_,p[6]=i-r,p[7]=n-s,this.updateWorldVerts(t)},r.updateUVs=function(t){for(var e=this._renderData.vDatas[0],i=t.spriteFrame.uvSliced,n=this.uvOffset,r=this.floatsPerVert,s=0;s<4;++s)for(var a=0;a<4;++a){var o=4*s+a,l=i[o],c=o*r;e[c+n]=l.u,e[c+n+1]=l.v}},r.updateWorldVerts=function(t){for(var e=t.node._worldMatrix.m,i=e[0],n=e[1],r=e[4],s=e[5],a=e[12],o=e[13],l=this._local,c=this._renderData.vDatas[0],h=this.floatsPerVert,u=0;u<4;++u)for(var _=l[2*u+1],f=0;f<4;++f){var d=l[2*f],p=(4*u+f)*h;c[p]=d*i+_*r+a,c[p+1]=d*n+_*s+o}},n})(((n=t("../../../../assembler-2d"))&&n.__esModule?n:{default:n}).default);i.default=r,Object.assign(r.prototype,{verticesCount:16,indicesCount:54}),e.exports=i.default}),{"../../../../assembler-2d":264}],298:[(function(t,e,i){"use strict";var n;i.__esModule=!0,i.default=void 0;var r=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.initData=function(){this.verticesCount=0,this.contentWidth=0,this.contentHeight=0,this.rectWidth=0,this.rectHeight=0,this.hRepeat=0,this.vRepeat=0,this.row=0,this.col=0,this._renderData.createFlexData(0,4,6,this.getVfmt()),this._updateIndices()},r.initLocal=function(){this._local={x:[],y:[]}},r._updateIndices=function(){for(var t=this._renderData.iDatas[0],e=0,i=0,n=t.length;e0?this.sizableWidth:0,this.sizableHeight=this.sizableHeight>0?this.sizableHeight:0;var _=this.hRepeat=0===l?this.sizableWidth:this.sizableWidth/l,f=this.vRepeat=0===u?this.sizableHeight:this.sizableHeight/u,d=(this.row=Math.ceil(f+2))*(this.col=Math.ceil(_+2));this.verticesCount=4*d,this.indicesCount=6*d;var p=this._renderData._flexBuffer;p.reserve(this.verticesCount,this.indicesCount)&&(this._updateIndices(),this.updateColor(t)),p.used(this.verticesCount,this.indicesCount),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),t._vertsDirty=!1)},r.updateVerts=function(t){var e=t._spriteFrame,i=e._rect,n=t.node,r=n.anchorX*n.width,s=n.anchorY*n.height,a=this.row,o=this.col,l=this.contentWidth,c=this.contentHeight,h=this._local,u=h.x,_=h.y;u.length=_.length=0;var f,d,p=e.insetLeft,m=e.insetRight,y=i.width-p-m,v=e.insetTop,g=e.insetBottom,b=i.height-v-g,A=n.width/(p+m)>1?1:n.width/(p+m),x=n.height/(v+g)>1?1:n.height/(v+g);f=y>0?Math.floor(1e3*this.sizableWidth)/1e3%y==0?y:this.sizableWidth%y:this.sizableWidth,d=b>0?Math.floor(1e3*this.sizableHeight)/1e3%b==0?b:this.sizableHeight%b:this.sizableHeight;for(var C=0;C<=o;C++)0===C?u[C]=-r:C>0&&C0?C===o-1?p+f+y*(C-2)-r:p+Math.min(y,this.sizableWidth)+y*(C-2)-r:p+this.sizableWidth-r:C===o&&(u[C]=Math.min(p+this.sizableWidth+m,l)-r);for(var T=0;T<=a;T++)0===T?_[T]=-s:T>0&&T0?T===a-1?g+d+(T-2)*b-s:g+Math.min(b,this.sizableHeight)+(T-2)*b-s:g+this.sizableHeight-s:T===a&&(_[T]=Math.min(g+this.sizableHeight+v,c)-s);this.updateWorldVerts(t)},r.updateWorldVerts=function(t){for(var e,i,n,r,s=this._renderData,a=this._local,o=a.x,l=a.y,c=s.vDatas[0],h=this.row,u=this.col,_=t.node._worldMatrix.m,f=_[0],d=_[1],p=_[4],m=_[5],y=_[12],v=_[13],g=this.floatsPerVert,b=0,A=0,x=h;Ac?this.sizableHeight>=C*c?1:f%1:f;for(var S=0,w=u;Sa?this.sizableWidth>=S*a?1:_%1:_,v?(0===C?(A[0]=y[0].u,A[1]=y[0].u,A[2]=y[4].u+(y[8].u-y[4].u)*p):C>2,n=this.vData.length,r=!1;if(i>n){for(;ns){for(;s>2,this._handler.updateMeshRange(t,e)},e.reset=function(){var t=this._initVerticesCount*this._verticesBytes>>2;this._reallocVData(t),this._reallocIData(this._initIndicesCount),this.usedVertices=0,this.usedVerticesFloats=0,this.usedIndices=0},t})();i.default=n,cc.FlexBuffer=n,e.exports=i.default}),{}],307:[(function(t,e){"use strict";var i,n=(i=t("../../../renderer/gfx"))&&i.__esModule?i:{default:i},r=(cc.sys.os===cc.sys.OS_IOS||cc.sys.os===cc.sys.MACOS)&&cc.sys.isBrowser&&/(OS 1[4-9])|(Version\/1[4-9])/.test(window.navigator.userAgent),s=cc.Class({name:"cc.MeshBuffer",ctor:function(t,e){this.init(t,e)},init:function(t,e){this.byteOffset=0,this.indiceOffset=0,this.vertexOffset=0,this.indiceStart=0,this._dirty=!1,this._vertexFormat=e,this._vertexBytes=this._vertexFormat._bytes,this._arrOffset=0,this._vbArr=[],this._vb=new n.default.VertexBuffer(t._device,e,n.default.USAGE_DYNAMIC,new ArrayBuffer,0),this._vbArr[0]=this._vb,this._ibArr=[],this._ib=new n.default.IndexBuffer(t._device,n.default.INDEX_FMT_UINT16,n.default.USAGE_STATIC,new ArrayBuffer,0),this._ibArr[0]=this._ib,this._vData=null,this._uintVData=null,this._iData=null,this._batcher=t,this._initVDataCount=256*e._bytes,this._initIDataCount=1536,this._offsetInfo={byteOffset:0,vertexOffset:0,indiceOffset:0},this._reallocBuffer()},uploadData:function(){if(0!==this.byteOffset&&this._dirty){var t=new Float32Array(this._vData.buffer,0,this.byteOffset>>2),e=new Uint16Array(this._iData.buffer,0,this.indiceOffset);this._vb.update(0,t),this._ib.update(0,e),this._dirty=!1}},switchBuffer:function(){var t=++this._arrOffset;this.byteOffset=0,this.vertexOffset=0,this.indiceOffset=0,this.indiceStart=0,t65535&&(this.uploadData(),this._batcher._flush(),this.switchBuffer())},requestStatic:function(t,e){this.checkAndSwitchBuffer(t);var i=this.byteOffset+t*this._vertexBytes,n=this.indiceOffset+e,r=this._vData.byteLength,s=this._iData.length;if(i>r||n>s){for(;r65535&&(this.uploadData(),this._batcher._flush())},s.prototype.forwardIndiceStartToOffset=function(){this.uploadData(),this.switchBuffer()}),cc.MeshBuffer=e.exports=s}),{"../../../renderer/gfx":371}],308:[(function(t,e){"use strict";var i=s(t("../../../renderer/core/input-assembler")),n=s(t("../../../renderer/memop/recycle-pool")),r=s(t("../../../renderer/scene/model"));function s(t){return t&&t.__esModule?t:{default:t}}var a=t("./vertex-format"),o=a.vfmtPosUvColor,l=a.vfmt3D,c=t("./quad-buffer"),h=t("./mesh-buffer"),u=t("./spine-buffer"),_=t("../../assets/material/CCMaterial"),f=(new(t("../../platform/id-generater"))("VertextFormat"),{}),d=new _,p=new i.default;p._count=0;var m=function(t,e){this._renderScene=e,this._device=t,this.walking=!1,this.material=d,this.cullingMask=1,this._iaPool=new n.default(function(){return new i.default},16),this._modelPool=new n.default(function(){return new r.default},16),this._quadBuffer=this.getBuffer("quad",o),this._meshBuffer=this.getBuffer("mesh",o),this._quadBuffer3D=this.getBuffer("quad",l),this._meshBuffer3D=this.getBuffer("mesh",l),this._buffer=this._meshBuffer,this._batchedModels=[],this._dummyNode=new cc.Node,this._sortKey=0,this.node=this._dummyNode,this.parentOpacity=1,this.parentOpacityDirty=0,this.worldMatDirty=0};m.prototype={constructor:m,reset:function(){this._iaPool.reset();for(var t=this._renderScene,e=this._batchedModels,i=0;i>2);this._vb.update(0,t),this._dirty=!1}},switchBuffer:function(){this._super();var t=new Uint16Array(this._iData.buffer,0,this._initIDataCount);this._ib.update(0,t)},_reallocBuffer:function(){this._reallocVData(!0),this._reallocIData(),this._fillQuadBuffer()}});cc.QuadBuffer=e.exports=n}),{"./mesh-buffer":307}],310:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=a;var n,r=(n=t("./flex-buffer"))&&n.__esModule?n:{default:n},s=t("./vertex-format");function a(){this.vDatas=[],this.uintVDatas=[],this.iDatas=[],this.meshCount=0,this._infos=null,this._flexBuffer=null}cc.js.mixin(a.prototype,{init:function(){},clear:function(){this.vDatas.length=0,this.iDatas.length=0,this.uintVDatas.length=0,this.meshCount=0,this._infos=null,this._flexBuffer&&this._flexBuffer.reset()},updateMesh:function(t,e,i){this.vDatas[t]=e,this.uintVDatas[t]=new Uint32Array(e.buffer,0,e.length),this.iDatas[t]=i,this.meshCount=this.vDatas.length},updateMeshRange:function(){},createData:function(t,e,i){var n=new Float32Array(e),r=new Uint16Array(i);this.updateMesh(t,n,r)},createQuadData:function(t,e,i){this.createData(t,e,i),this.initQuadIndices(this.iDatas[t])},createFlexData:function(t,e,i,n){n=n||s.vfmtPosUvColor,this._flexBuffer=new r.default(this,t,e,i,n)},initQuadIndices:function(t){for(var e=t.length/6,i=0,n=0;ir||n>s){for(;r0&&(t=t.substring(0,i));var n=/(\/|\\)([^\/\\]+)$/g.exec(t.replace(/(\/|\\)$/,""));if(!n)return t;var r=n[2];return e&&t.substring(t.length-e.length).toLowerCase()===e.toLowerCase()?r.substring(0,r.length-e.length):r},dirname:function(t){var e=n.exec(t);return e?e[2]:""},changeExtname:function(t,e){e=e||"";var i=t.indexOf("?"),n="";return i>0&&(n=t.substring(i),t=t.substring(0,i)),(i=t.lastIndexOf("."))<0?t+e+n:t.substring(0,i)+e+n},changeBasename:function(t,e,i){if(0===e.indexOf("."))return this.changeExtname(t,e);var n=t.indexOf("?"),r="",s=i?this.extname(t):"";return n>0&&(r=t.substring(n),t=t.substring(0,n)),n=(n=t.lastIndexOf("/"))<=0?0:n+1,t.substring(0,n)+e+s+r},_normalize:function(t){var e=t=String(t);do{e=t,t=t.replace(r,"")}while(e.length!==t.length);return t},sep:cc.sys.os===cc.sys.OS_WINDOWS?"\\":"/",stripSep:function(t){return t.replace(/[\/\\]$/,"")}},e.exports=cc.path}),{"../platform/CCSys":247}],314:[(function(t,e){"use strict";var i=function(t,e,i,n,r,s){this.a=t,this.b=e,this.c=i,this.d=n,this.tx=r,this.ty=s};i.create=function(t,e,i,n,r,s){return{a:t,b:e,c:i,d:n,tx:r,ty:s}},i.identity=function(){return{a:1,b:0,c:0,d:1,tx:0,ty:0}},i.clone=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,tx:t.tx,ty:t.ty}},i.concat=function(t,e,i){var n=e.a,r=e.b,s=e.c,a=e.d,o=e.tx,l=e.ty;return t.a=n*i.a+r*i.c,t.b=n*i.b+r*i.d,t.c=s*i.a+a*i.c,t.d=s*i.b+a*i.d,t.tx=o*i.a+l*i.c+i.tx,t.ty=o*i.b+l*i.d+i.ty,t},i.invert=function(t,e){var i=e.a,n=e.b,r=e.c,s=e.d,a=1/(i*s-n*r),o=e.tx,l=e.ty;return t.a=a*s,t.b=-a*n,t.c=-a*r,t.d=a*i,t.tx=a*(r*l-s*o),t.ty=a*(n*o-i*l),t},i.fromMat4=function(t,e){var i=e.m;return t.a=i[0],t.b=i[1],t.c=i[4],t.d=i[5],t.tx=i[12],t.ty=i[13],t},i.transformVec2=function(t,e,i,n){var r,s;return void 0===n?(n=i,r=e.x,s=e.y):(r=e,s=i),t.x=n.a*r+n.c*s+n.tx,t.y=n.b*r+n.d*s+n.ty,t},i.transformSize=function(t,e,i){return t.width=i.a*e.width+i.c*e.height,t.height=i.b*e.width+i.d*e.height,t},i.transformRect=function(t,e,i){var n=e.x,r=e.y,s=n+e.width,a=r+e.height,o=i.a*n+i.c*r+i.tx,l=i.b*n+i.d*r+i.ty,c=i.a*s+i.c*r+i.tx,h=i.b*s+i.d*r+i.ty,u=i.a*n+i.c*a+i.tx,_=i.b*n+i.d*a+i.ty,f=i.a*s+i.c*a+i.tx,d=i.b*s+i.d*a+i.ty,p=Math.min(o,c,u,f),m=Math.max(o,c,u,f),y=Math.min(l,h,_,d),v=Math.max(l,h,_,d);return t.x=p,t.y=y,t.width=m-p,t.height=v-y,t},i.transformObb=function(t,e,i,n,r,s){var a=r.x,o=r.y,l=r.width,c=r.height,h=s.a*a+s.c*o+s.tx,u=s.b*a+s.d*o+s.ty,_=s.a*l,f=s.b*l,d=s.c*c,p=s.d*c;e.x=h,e.y=u,i.x=_+h,i.y=f+u,t.x=d+h,t.y=p+u,n.x=_+d+h,n.y=f+p+u},cc.AffineTransform=e.exports=i}),{}],315:[(function(t,e){"use strict";var i=t("../platform/CCObject").Flags,n=t("./misc"),r=t("../platform/js"),s=t("../platform/id-generater"),a=t("../event-manager"),o=t("../renderer/render-flow"),l=i.Destroying,c=i.DontDestroy,h=i.Deactivating,u=new s("Node");function _(t){return t?"string"==typeof t?r.getClassByName(t):t:(cc.errorID(3804),null)}function f(t,e){if(e._sealed)for(var i=0;i0&&(r=p(n._children,e)))return r}return null}function m(t,e,i){for(var n=0;n0&&m(r._children,e,i)}}var y=cc.Class({name:"cc._BaseNode",extends:cc.Object,properties:{_parent:null,_children:[],_active:!0,_components:[],_prefab:null,_persistNode:{get:function(){return(this._objFlags&c)>0},set:function(t){t?this._objFlags|=c:this._objFlags&=~c}},name:{get:function(){return this._name},set:function(t){this._name=t}},uuid:{get:function(){return this._id}},children:{get:function(){return this._children}},childrenCount:{get:function(){return this._children.length}},active:{get:function(){return this._active},set:function(t){if(t=!!t,this._active!==t){this._active=t;var e=this._parent;e&&e._activeInHierarchy&&cc.director._nodeActivator.activateNode(this,t)}}},activeInHierarchy:{get:function(){return this._activeInHierarchy}}},ctor:function(t){this._name=void 0!==t?t:"New Node",this._activeInHierarchy=!1,this._id=u.getNewId(),cc.director._scheduler&&cc.director._scheduler.enableForTarget(this),this.__eventTargets=[]},getParent:function(){return this._parent},setParent:function(t){if(this._parent!==t){var e=this._parent;if(this._parent=t||null,this._onSetParent(t),t&&(a._setDirtyForNode(this),t._children.push(this),t.emit&&t.emit("child-added",this),t._renderFlag|=o.FLAG_CHILDREN),e){if(!(e._objFlags&l)){var i=e._children.indexOf(this);e._children.splice(i,1),e.emit&&e.emit("child-removed",this),this._onHierarchyChanged(e),0===e._children.length&&(e._renderFlag&=~o.FLAG_CHILDREN)}}else t&&this._onHierarchyChanged(null)}},attr:function(t){r.mixin(this,t)},getChildByUuid:function(t){if(!t)return cc.log("Invalid uuid"),null;for(var e=this._children,i=0,n=e.length;i0?(c=n,i=n._children,r=0,l[o]=i[r],o++):(l[o]=n,o++,s=!0);l.length=0,a._stackId--},cleanup:function(){},removeFromParent:function(t){this._parent&&(void 0===t&&(t=!0),this._parent.removeChild(this,t))},removeChild:function(t,e){this._children.indexOf(t)>-1&&((e||void 0===e)&&t.cleanup(),t.parent=null)},removeAllChildren:function(t){var e=this._children;void 0===t&&(t=!0);for(var i=e.length-1;i>=0;i--){var n=e[i];n&&(t&&n.cleanup(),n.parent=null)}this._children.length=0},isChildOf:function(t){var e=this;do{if(e===t)return!0;e=e._parent}while(e);return!1},getComponent:function(t){var e=_(t);return e?f(this,e):null},getComponents:function(t){var e=_(t),i=[];return e&&d(this,e,i),i},getComponentInChildren:function(t){var e=_(t);return e?p(this._children,e):null},getComponentsInChildren:function(t){var e=_(t),i=[];return e&&(d(this,e,i),m(this._children,e,i)),i},_checkMultipleComp:!1,addComponent:function(t){var e;if("string"==typeof t){if(!(e=r.getClassByName(t)))return cc.errorID(3807,t),cc._RFpeek()&&cc.errorID(3808,t),null}else{if(!t)return cc.errorID(3804),null;e=t}if("function"!=typeof e)return cc.errorID(3809),null;if(!r.isChildClassOf(e,cc.Component))return cc.errorID(3810),null;var i=e._requireComponent;if(i&&!this.getComponent(i)&&!this.addComponent(i))return null;var n=new e;return n.node=this,this._components.push(n),this._activeInHierarchy&&cc.director._nodeActivator.activateComp(n),n},_addComponentAt:!1,removeComponent:function(t){t?(t instanceof cc.Component||(t=this.getComponent(t)),t&&t.destroy()):cc.errorID(3813)},_getDependComponent:!1,_removeComponent:function(t){if(t){if(!(this._objFlags&l)){var e=this._components.indexOf(t);-1!==e?this._components.splice(e,1):t.node!==this&&cc.errorID(3815)}}else cc.errorID(3814)},destroy:function(){cc.Object.prototype.destroy.call(this)&&(this.active=!1)},destroyAllChildren:function(){for(var t=this._children,e=0;e>>1;i<=n;r=i+n>>>1){var s=t[r];if(s>e+1e-6)n=r-1;else{if(!(s>2],s[a[r++]]=n[(3&o)<<2|l>>4],s[a[r++]]=n[15&l]}return s.join("")}}),{"./misc":323}],319:[(function(t,e){"use strict";cc.find=e.exports=function(t,e){if(null==t)return cc.errorID(3814),null;if(e);else{var i=cc.director.getScene();if(!i)return null;e=i}for(var n=e,r="/"!==t[0]?0:1,s=t.split("/"),a=r;a"]),this._specialSymbolArray.push([/&/g,"&"]),this._specialSymbolArray.push([/"/g,'"']),this._specialSymbolArray.push([/'/g,"'"]),this._specialSymbolArray.push([/ /g," "])};r.prototype={constructor:r,parse:function(t){this._resultObjectArray=[],this._stack=[];for(var e=0,i=t.length;e",e),r=-1;if(n>=0&&(r=t.lastIndexOf("<",n))",r+1)),r<0)this._stack.pop(),this._processResult(t.substring(e)),e=i;else{var s=t.substring(e,r),a=t.substring(r+1,n);""===a&&(s=t.substring(e,n+1)),this._processResult(s),-1===n?n=r:"/"===t.charAt(r+1)?this._stack.pop():this._addToStack(a),e=n+1}}return this._resultObjectArray},_attributeToObject:function(t){var e,i,r,s,a={},o=(t=t.trim()).match(/^(color|size)(\s)*=/);if(o){if(e=o[0],""===(t=t.substring(e.length).trim()))return a;switch(i=t.indexOf(" "),e[0]){case"c":a.color=i>-1?t.substring(0,i).trim():t;break;case"s":a.size=parseInt(t)}return i>-1&&(s=t.substring(i+1).trim(),r=this._processEventHandler(s),a.event=r),a}if((o=t.match(/^(br(\s)*\/)/))&&o[0].length>0&&(e=o[0].trim()).startsWith("br")&&"/"===e[e.length-1])return a.isNewLine=!0,this._resultObjectArray.push({text:"",style:{newline:!0}}),a;if((o=t.match(/^(img(\s)*src(\s)*=[^>]+\/)/))&&o[0].length>0&&(e=o[0].trim()).startsWith("img")&&"/"===e[e.length-1]){var l;o=t.match(n);for(var c=!1;o;){if(e=(t=t.substring(t.indexOf(o[0]))).substr(0,o[0].length),u=(i=(l=t.substring(e.length).trim()).indexOf(" "))>-1?l.substr(0,i):l,e=(e=e.replace(/[^a-zA-Z]/g,"").trim()).toLocaleLowerCase(),t=l.substring(i).trim(),u.endsWith("/")&&(u=u.slice(0,-1)),"src"===e){switch(u.charCodeAt(0)){case 34:case 39:c=!0,u=u.slice(1,-1)}a.isImage=!0,a.src=u}else if("height"===e)a.imageHeight=parseInt(u);else if("width"===e)a.imageWidth=parseInt(u);else if("align"===e){switch(u.charCodeAt(0)){case 34:case 39:u=u.slice(1,-1)}a.imageAlign=u.toLocaleLowerCase()}else"offset"===e?a.imageOffset=u:"click"===e&&(a.event=this._processEventHandler(e+"="+u));a.event&&"param"===e&&(a.event.param=u.replace(/^\"|\"$/g,"")),o=t.match(n)}return c&&a.isImage&&this._resultObjectArray.push({text:"",style:a}),{}}if(o=t.match(/^(outline(\s)*[^>]*)/)){var h={color:"#ffffff",width:1};if(t=o[0].substring("outline".length).trim()){var u,_=/(\s)*color(\s)*=|(\s)*width(\s)*=|(\s)*click(\s)*=|(\s)*param(\s)*=/;for(o=t.match(_);o;)e=(t=t.substring(t.indexOf(o[0]))).substr(0,o[0].length),u=(i=(l=t.substring(e.length).trim()).indexOf(" "))>-1?l.substr(0,i):l,e=(e=e.replace(/[^a-zA-Z]/g,"").trim()).toLocaleLowerCase(),t=l.substring(i).trim(),"click"===e?a.event=this._processEventHandler(e+"="+u):"color"===e?h.color=u:"width"===e&&(h.width=parseInt(u)),a.event&&"param"===e&&(a.event.param=u.replace(/^\"|\"$/g,"")),o=t.match(_)}a.outline=h}if((o=t.match(/^(on|u|b|i)(\s)*/))&&o[0].length>0){switch(e=o[0],t=t.substring(e.length).trim(),e[0]){case"u":a.underline=!0;break;case"i":a.italic=!0;break;case"b":a.bold=!0}if(""===t)return a;r=this._processEventHandler(t),a.event=r}return a},_processEventHandler:function(t){for(var e=0,n={},r=t.match(i),s=!1;r;){var a=r[0],o="";if(s=!1,'"'===(t=t.substring(a.length).trim()).charAt(0))(e=t.indexOf('"',1))>-1&&(o=t.substring(1,e).trim(),s=!0),e++;else if("'"===t.charAt(0))(e=t.indexOf("'",1))>-1&&(o=t.substring(1,e).trim(),s=!0),e++;else{var l=t.match(/(\S)+/);e=(o=l?l[0]:"").length}s&&(n[a=a.substring(0,a.length-1).trim()]=o),r=(t=t.substring(e).trim()).match(i)}return n},_addToStack:function(t){var e=this._attributeToObject(t);if(0===this._stack.length)this._stack.push(e);else{if(e.isNewLine||e.isImage)return;var i=this._stack[this._stack.length-1];for(var n in i)e[n]||(e[n]=i[n]);this._stack.push(e)}},_processResult:function(t){""!==t&&(t=this._escapeSpecialSymbol(t),this._stack.length>0?this._resultObjectArray.push({text:t,style:this._stack[this._stack.length-1]}):this._resultObjectArray.push({text:t}))},_escapeSpecialSymbol:function(t){for(var e=0;e>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16)},BUILTIN_CLASSID_RE:/^(?:cc|dragonBones|sp|ccsg)\..+/},r=new Array(123),s=0;s<123;++s)r[s]=64;for(var a=0;a<64;++a)r["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charCodeAt(a)]=a;n.BASE64_VALUES=r,n.pushToMap=function(t,e,i,n){var r=t[e];r?Array.isArray(r)?n?(r.push(r[0]),r[0]=i):r.push(i):t[e]=n?[i,r]:[r,i]:t[e]=i},n.clampf=function(t,e,i){if(e>i){var n=e;e=i,i=n}return t=0&&this.removeAt(e)},n.removeAt=function(t){this.array.splice(t,1),t<=this.i&&--this.i},n.fastRemove=function(t){var e=this.array.indexOf(t);e>=0&&this.fastRemoveAt(e)},n.fastRemoveAt=function(t){var e=this.array;e[t]=e[e.length-1],--e.length,t<=this.i&&--this.i},n.push=function(t){this.array.push(t)},e.exports=i}),{}],325:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=(function(){function t(){this.enabled=!1,this.count=0,this.maxSize=1024}var e=t.prototype;return e.get=function(){},e.put=function(){},e.clear=function(){},t})();i.default=n,cc.pool={},n.register=function(t,e){cc.pool[t]=e},e.exports=i.default}),{}],326:[(function(t,e){"use strict";cc._PrefabInfo=cc.Class({name:"cc.PrefabInfo",properties:{root:null,asset:null,fileId:"",sync:!1}}),e.exports={syncWithPrefab:function(t){var e=t._prefab;if(!e.asset)return cc.errorID(3701,t.name),void(t._prefab=null);var i=t._objFlags,n=t._parent,r=t._id,s=t._name,a=t._active,o=t._eulerAngles.x,l=t._eulerAngles.y,c=t._eulerAngles.z,h=t._localZOrder,u=t._trs,_=u[0],f=u[1],d=u[2];cc.game._isCloning=!0,e.asset._doInstantiate(t),cc.game._isCloning=!1,t._objFlags=i,t._parent=n,t._id=r,t._prefab=e,t._name=s,t._active=a,t._localZOrder=h,(u=t._trs)[0]=_,u[1]=f,u[2]=d,t._eulerAngles.x=o,t._eulerAngles.y=l,t._eulerAngles.z=c}}}),{}],327:[(function(t,e){"use strict";var i=t("../../platform/CCMacro"),n=t("./perf-counter"),r=!1,s=15,a=null,o=null,l=null;function c(){if(!a){a={fps:{desc:"Framerate (FPS)",below:30,average:500},draws:{desc:"Draw Call"},frame:{desc:"Frame time (ms)",min:0,max:50,average:500},logic:{desc:"Game Logic (ms)",min:0,max:50,average:500,color:"#080"},render:{desc:"Renderer (ms)",min:0,max:50,average:500,color:"#f90"},mode:{desc:cc.game.renderType===cc.game.RENDER_TYPE_WEBGL?"WebGL":"Canvas",min:1}};var t=performance.now();for(var e in a)a[e]._counter=new n(e,a[e],t)}}function h(){if(!o||!o.isValid){(o=new cc.Node("PROFILER-NODE")).x=o.y=10,o.groupIndex=cc.Node.BuiltinGroupIndex.DEBUG,cc.Camera._setupDebugCamera(),o.zIndex=i.MAX_ZINDEX,cc.game.addPersistRootNode(o);var t=new cc.Node("LEFT-PANEL");t.anchorX=t.anchorY=0;var e=t.addComponent(cc.Label);e.fontSize=s,e.lineHeight=s,t.parent=o;var n=new cc.Node("RIGHT-PANEL");n.anchorX=1,n.anchorY=0,n.x=200;var r=n.addComponent(cc.Label);r.horizontalAlign=cc.Label.HorizontalAlign.RIGHT,r.fontSize=s,r.lineHeight=s,n.parent=o,cc.sys.platform!==cc.sys.BAIDU_GAME_SUB&&cc.sys.platform!==cc.sys.WECHAT_GAME_SUB&&(e.cacheMode=cc.Label.CacheMode.CHAR,r.cacheMode=cc.Label.CacheMode.CHAR),l={left:e,right:r}}}function u(){h();var t=cc.director._lastUpdate;a.frame._counter.start(t),a.logic._counter.start(t)}function _(){var t=performance.now();cc.director.isPaused()?a.frame._counter.start(t):a.logic._counter.end(t),a.render._counter.start(t)}function f(){var t=performance.now();a.render._counter.end(t),a.draws._counter.value=cc.renderer.drawCalls,a.frame._counter.end(t),a.fps._counter.frame(t);var e="",i="";for(var n in a){var r=a[n];r._counter.sample(t),e+=r.desc+"\n",i+=r._counter.human()+"\n"}l&&(l.left.string=e,l.right.string=i)}cc.profiler=e.exports={isShowingStats:function(){return r},hideStats:function(){r&&(o&&(o.active=!1),cc.director.off(cc.Director.EVENT_BEFORE_UPDATE,u),cc.director.off(cc.Director.EVENT_AFTER_UPDATE,_),cc.director.off(cc.Director.EVENT_AFTER_DRAW,f),r=!1)},showStats:function(){r||(c(),o&&(o.active=!0),cc.director.on(cc.Director.EVENT_BEFORE_UPDATE,u),cc.director.on(cc.Director.EVENT_AFTER_UPDATE,_),cc.director.on(cc.Director.EVENT_AFTER_DRAW,f),r=!0)}}}),{"../../platform/CCMacro":243,"./perf-counter":329}],328:[(function(t,e){"use strict";var i=cc.Class({name:"cc.Counter",ctor:function(t,e,i){this._id=t,this._opts=e||{},this._value=0,this._total=0,this._averageValue=0,this._accumValue=0,this._accumSamples=0,this._accumStart=i},properties:{value:{get:function(){return this._value},set:function(t){this._value=t}}},_average:function(t,e){if(this._opts.average){this._accumValue+=t,++this._accumSamples;var i=e;i-this._accumStart>=this._opts.average&&(this._averageValue=this._accumValue/this._accumSamples,this._accumValue=0,this._accumStart=i,this._accumSamples=0)}},sample:function(t){this._average(this._value,t)},human:function(){var t=this._opts.average?this._averageValue:this._value;return Math.round(100*t)/100},alarm:function(){return this._opts.below&&this._valuethis._opts.over}});e.exports=i}),{}],329:[(function(t,e){"use strict";var i=t("./counter"),n=cc.Class({name:"cc.PerfCounter",extends:i,ctor:function(t,e,i){this._time=i},start:function(t){this._time=t},end:function(t){this._value=t-this._time,this._average(this._value)},tick:function(){this.end(),this.start()},frame:function(t){var e=t,i=e-this._time;this._total++,i>(this._opts.average||1e3)&&(this._value=1e3*this._total/i,this._total=0,this._time=e,this._average(this._value))}});e.exports=n}),{"./counter":328}],330:[(function(t,e){"use strict";var i,n=new(((i=t("../platform/js"))&&i.__esModule?i:{default:i}).default.Pool)(2);function r(t){this.count=0,this.limit=t,this.datas={},this.head=null,this.tail=null}n.get=function(){return this._get()||{key:null,value:null,prev:null,next:null}},r.prototype.moveToHead=function(t){t.next=this.head,t.prev=null,null!==this.head&&(this.head.prev=t),this.head=t,null===this.tail&&(this.tail=t),this.count++,this.datas[t.key]=t},r.prototype.put=function(t,e){var i=n.get();if(i.key=t,i.value=e,this.count>=this.limit){var r=this.tail;delete this.datas[r.key],this.count--,this.tail=r.prev,this.tail.next=null,r.prev=null,r.next=null,n.put(r)}this.moveToHead(i)},r.prototype.remove=function(t){null!==t.prev?t.prev.next=t.next:this.head=t.next,null!==t.next?t.next.prev=t.prev:this.tail=t.prev,delete this.datas[t.key],this.count--},r.prototype.get=function(t){var e=this.datas[t];return e?(this.remove(e),this.moveToHead(e),e.value):null},r.prototype.clear=function(){this.count=0,this.datas={},this.head=null,this.tail=null},r.prototype.has=function(t){return!!this.datas[t]},r.prototype.delete=function(t){var e=this.datas[t];this.remove(e)};var s=new r(100),a={BASELINE_RATIO:.26,MIDDLE_RATIO:.37,BASELINE_OFFSET:0,label_wordRex:/([a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430-\u044f\u0410-\u042f\u0401\u0451]+|\S)/,label_symbolRex:/^[!,.:;'}\]%\?>\u3001\u2018\u201c\u300b\uff1f\u3002\uff0c\uff01]/,label_lastWordRex:/([a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430\xed\xec\xcd\xcc\xef\xc1\xc0\xe1\xe0\xc9\xc8\xd2\xd3\xf2\xf3\u0150\u0151\xd9\xda\u0170\xfa\u0171\xf1\xd1\xe6\xc6\u0153\u0152\xc3\xc2\xe3\xd4\xf5\u011b\u0161\u010d\u0159\u017e\xfd\xe1\xed\xe9\xf3\xfa\u016f\u0165\u010f\u0148\u011a\u0160\u010c\u0158\u017d\xc1\xcd\xc9\xd3\xda\u0164\u017c\u017a\u015b\xf3\u0144\u0142\u0119\u0107\u0105\u017b\u0179\u015a\xd3\u0143\u0141\u0118\u0106\u0104-\u044f\u0410-\u042f\u0401\u0451]+|\S)$/,label_lastEnglish:/[a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430\xed\xec\xcd\xcc\xef\xc1\xc0\xe1\xe0\xc9\xc8\xd2\xd3\xf2\xf3\u0150\u0151\xd9\xda\u0170\xfa\u0171\xf1\xd1\xe6\xc6\u0153\u0152\xc3\xc2\xe3\xd4\xf5\u011b\u0161\u010d\u0159\u017e\xfd\xe1\xed\xe9\xf3\xfa\u016f\u0165\u010f\u0148\u011a\u0160\u010c\u0158\u017d\xc1\xcd\xc9\xd3\xda\u0164\u017c\u017a\u015b\xf3\u0144\u0142\u0119\u0107\u0105\u017b\u0179\u015a\xd3\u0143\u0141\u0118\u0106\u0104-\u044f\u0410-\u042f\u0401\u0451]+$/,label_firstEnglish:/^[a-zA-Z0-9\xc4\xd6\xdc\xe4\xf6\xfc\xdf\xe9\xe8\xe7\xe0\xf9\xea\xe2\xee\xf4\xfb\u0430\xed\xec\xcd\xcc\xef\xc1\xc0\xe1\xe0\xc9\xc8\xd2\xd3\xf2\xf3\u0150\u0151\xd9\xda\u0170\xfa\u0171\xf1\xd1\xe6\xc6\u0153\u0152\xc3\xc2\xe3\xd4\xf5\u011b\u0161\u010d\u0159\u017e\xfd\xe1\xed\xe9\xf3\xfa\u016f\u0165\u010f\u0148\u011a\u0160\u010c\u0158\u017d\xc1\xcd\xc9\xd3\xda\u0164\u017c\u017a\u015b\xf3\u0144\u0142\u0119\u0107\u0105\u017b\u0179\u015a\xd3\u0143\u0141\u0118\u0106\u0104-\u044f\u0410-\u042f\u0401\u0451]/,highSurrogateRex:/[\uD800-\uDBFF]/,lowSurrogateRex:/[\uDC00-\uDFFF]/,label_wrapinspection:!0,__CHINESE_REG:/^[\u4E00-\u9FFF\u3400-\u4DFF]+$/,__JAPANESE_REG:/[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g,__KOREAN_REG:/^[\u1100-\u11FF]|[\u3130-\u318F]|[\uA960-\uA97F]|[\uAC00-\uD7AF]|[\uD7B0-\uD7FF]+$/,isUnicodeCJK:function(t){return this.__CHINESE_REG.test(t)||this.__JAPANESE_REG.test(t)||this.__KOREAN_REG.test(t)},isUnicodeSpace:function(t){return(t=t.charCodeAt(0))>=9&&t<=13||32===t||133===t||160===t||5760===t||t>=8192&&t<=8202||8232===t||8233===t||8239===t||8287===t||12288===t},safeMeasureText:function(t,e,i){var n=(i||t.font)+"\ud83c\udfae"+e,r=s.get(n);if(null!==r)return r;var a=t.measureText(e),o=a&&a.width||0;return s.put(n,o),o},_safeSubstring:function(t,e,i){var n=e,r=i,s=t[e];if(this.lowSurrogateRex.test(s)&&n--,void 0!==i)if(i-1!==e){var a=t[i-1];this.highSurrogateRex.test(a)&&r--}else this.highSurrogateRex.test(s)&&r++;return t.substring(n,r)},fragmentText:function(t,e,i,n){var r=[];if(0===t.length||i<0)return r.push(""),r;for(var s=t;e>i&&s.length>1;){for(var a=s.length*(i/e)|0,o=this._safeSubstring(s,a),l=e-n(o),c=o,h=0,u=0;l>i&&u++<10;)a*=i/l,a|=0,l=e-n(o=this._safeSubstring(s,a));for(u=0;l<=i&&u++<10;){if(o){var _=this.label_wordRex.exec(o);h=_?_[0].length:1,c=o}a+=h,l=e-n(o=this._safeSubstring(s,a))}0==(a-=h)?(a=1,c=this._safeSubstring(s,1)):1===a&&this.highSurrogateRex.test(s[0])&&(a=2,c=this._safeSubstring(s,2));var f,d=this._safeSubstring(s,0,a);this.label_wrapinspection&&this.label_symbolRex.test(c||o)&&(0==(a-=(f=this.label_lastWordRex.exec(d))?f[0].length:0)&&(a=1),c=this._safeSubstring(s,a),d=this._safeSubstring(s,0,a)),this.label_firstEnglish.test(c)&&(f=this.label_lastEnglish.exec(d))&&d!==f[0]&&(a-=f[0].length,c=this._safeSubstring(s,a),d=this._safeSubstring(s,0,a)),0===r.length?r.push(d):(d=d.trimLeft()).length>0&&r.push(d),e=n(s=c||o)}return 0===r.length?r.push(s):(s=s.trimLeft()).length>0&&r.push(s),r}};cc.textUtils=e.exports=a}),{"../platform/js":259}],331:[(function(t,e){"use strict";var i=t("../assets/CCTexture2D"),n={loadImage:function(t,e,i){cc.assertID(t,3103);var n=cc.assetManager.assets.get(t);if(n)return n.loaded?(e&&e.call(i,null,n),n):(n.once("load",(function(){e&&e.call(i,null,n)}),i),n);cc.assetManager.loadRemote(t,(function(t,n){e&&e.call(i,t,n)}))},cacheImage:function(t,e){if(t&&e){var n=new i;return n.initWithElement(e),cc.assetManager.assets.add(t,n),n}},postLoadTexture:function(t,e){t.loaded?e&&e():t.nativeUrl?cc.assetManager.postLoadNative(t,e):e&&e()}};e.exports=n}),{"../assets/CCTexture2D":120}],332:[(function(t,e){"use strict";var i=t("./node-unit"),n=t("./node-mem-pool");e.exports={NodeMemPool:new n(i)}}),{"./node-mem-pool":334,"./node-unit":335}],333:[(function(t,e){"use strict";var i=function(t){this._unitClass=t,this._pool=[],this._findOrder=[]},n=i.prototype;n._initNative=function(){this._nativeMemPool=new renderer.MemPool},n._buildUnit=function(t){return new this._unitClass(t,this)},n._destroyUnit=function(t){this._pool[t]=null;for(var e=0,i=this._findOrder.length;e1&&e.isAllFree()&&this._destroyUnit(t.unitID),e},e.exports=i}),{}],334:[(function(t,e){"use strict";var i,n=t("./mem-pool"),r=function(t){n.call(this,t)};(i=function(){}).prototype=n.prototype;var s=r.prototype=new i;s._initNative=function(){this._nativeMemPool=new renderer.NodeMemPool},s._destroyUnit=function(t){n.prototype._destroyUnit.call(this,t)},e.exports=r}),{"./mem-pool":333}],335:[(function(t,e){"use strict";var i,n=t("../../value-types/utils"),r=(Uint32Array,10*n.FLOAT_BYTES),s=16*n.FLOAT_BYTES,a=16*n.FLOAT_BYTES,o=(Uint32Array,Uint32Array,Int32Array,Uint8Array,Uint8Array,Uint32Array,n.FLOAT_BYTES,t("./unit-base")),l=function(t,e){o.call(this,t,e);var i=this._contentNum;this.trsList=new n.FLOAT_ARRAY_TYPE(10*i),this.localMatList=new n.FLOAT_ARRAY_TYPE(16*i),this.worldMatList=new n.FLOAT_ARRAY_TYPE(16*i);for(var l=0;l",e=this._signData[2*e+0];for(var n=0,r="",s=this._contentNum,a=0;a");var o=t+n;console.log("unitID:",this.unitID,"spaceNum:",t,"calc using num:",n,"store using num:",this._data[1],"calc total num:",o,"actually total num:",this._contentNum),console.log("free info:",i),console.log("using info:",r),n!=this._data[1]&&cc.error("using num error","calc using num:",n,"store using num:",this._data[1]),t+n!=this._contentNum&&cc.error("total num error","calc total num:",o,"actually total num:",this._contentNum)},e.exports=i}),{}],337:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=a(t("./value-type")),r=a(t("../platform/CCClass")),s=a(t("../utils/misc"));function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i>>0)+(n<<16)+(i<<8)+(0|e),s}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n.copy=function(t,e){return t.r=e.r,t.g=e.g,t.b=e.b,t.a=e.a,t},n.clone=function(t){return new n(t.r,t.g,t.b,t.a)},n.set=function(t,e,i,n,r){return void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===r&&(r=255),t.r=e,t.g=i,t.b=n,t.a=r,t},n.fromHex=function(t,e){var i=(e>>24)/255,n=(e>>16&255)/255,r=(e>>8&255)/255,s=(255&e)/255;return t.r=i,t.g=n,t.b=r,t.a=s,t},n.fromHEX=function(t,e){return e=0===e.indexOf("#")?e.substring(1):e,t.r=parseInt(e.substr(0,2),16)||0,t.g=parseInt(e.substr(2,2),16)||0,t.b=parseInt(e.substr(4,2),16)||0,t.a=parseInt(e.substr(6,2),16)||255,t._val=(t.a<<24>>>0)+(t.b<<16)+(t.g<<8)+t.r,t},n.add=function(t,e,i){return t.r=e.r+i.r,t.g=e.g+i.g,t.b=e.b+i.b,t.a=e.a+i.a,t},n.subtract=function(t,e,i){return t.r=e.r-i.r,t.g=e.g-i.g,t.b=e.b-i.b,t.a=e.a-i.a,t},n.multiply=function(t,e,i){return t.r=e.r*i.r,t.g=e.g*i.g,t.b=e.b*i.b,t.a=e.a*i.a,t},n.divide=function(t,e,i){return t.r=e.r/i.r,t.g=e.g/i.g,t.b=e.b/i.b,t.a=e.a/i.a,t},n.scale=function(t,e,i){return t.r=e.r*i,t.g=e.g*i,t.b=e.b*i,t.a=e.a*i,t},n.lerp=function(t,e,i,n){var r=e.r,s=e.g,a=e.b,o=e.a;return t.r=r+n*(i.r-r),t.g=s+n*(i.g-s),t.b=a+n*(i.b-a),t.a=o+n*(i.a-o),t},n.toArray=function(t,e,i){void 0===i&&(i=0);var r=e instanceof n||e.a>1?1/255:1;return t[i+0]=e.r*r,t[i+1]=e.g*r,t[i+2]=e.b*r,t[i+3]=e.a*r,t},n.fromArray=function(t,e,i){return void 0===i&&(i=0),e.r=255*t[i+0],e.g=255*t[i+1],e.b=255*t[i+2],e.a=255*t[i+3],e},n.premultiplyAlpha=function(t,e){var i=e.a/255;return t.r=e.r*i,t.g=e.g*i,t.b=e.b*i,t._fastSetA(e.a),t},l(n,null,[{key:"WHITE",get:function(){return new n(255,255,255,255)}},{key:"BLACK",get:function(){return new n(0,0,0,255)}},{key:"TRANSPARENT",get:function(){return new n(0,0,0,0)}},{key:"GRAY",get:function(){return new n(127.5,127.5,127.5)}},{key:"RED",get:function(){return new n(255,0,0)}},{key:"GREEN",get:function(){return new n(0,255,0)}},{key:"BLUE",get:function(){return new n(0,0,255)}},{key:"YELLOW",get:function(){return new n(255,235,4)}},{key:"ORANGE",get:function(){return new n(255,127,0)}},{key:"CYAN",get:function(){return new n(0,255,255)}},{key:"MAGENTA",get:function(){return new n(255,0,255)}}]);var r=n.prototype;return r.clone=function(){var t=new n;return t._val=this._val,t},r.equals=function(t){return t&&this._val===t._val},r.lerp=function(t,e,i){i=i||new n;var r=this.r,s=this.g,a=this.b,o=this.a;return i.r=r+(t.r-r)*e,i.g=s+(t.g-s)*e,i.b=a+(t.b-a)*e,i.a=o+(t.a-o)*e,i},r.toString=function(){return"rgba("+this.r.toFixed()+", "+this.g.toFixed()+", "+this.b.toFixed()+", "+this.a.toFixed()+")"},r.getR=function(){return 255&this._val},r.setR=function(t){return t=~~s.default.clampf(t,0,255),this._val=(4294967040&this._val|t)>>>0,this},r.getG=function(){return(65280&this._val)>>8},r.setG=function(t){return t=~~s.default.clampf(t,0,255),this._val=(4294902015&this._val|t<<8)>>>0,this},r.getB=function(){return(16711680&this._val)>>16},r.setB=function(t){return t=~~s.default.clampf(t,0,255),this._val=(4278255615&this._val|t<<16)>>>0,this},r.getA=function(){return(4278190080&this._val)>>>24},r.setA=function(t){return t=~~s.default.clampf(t,0,255),this._val=(16777215&this._val|t<<24)>>>0,this},r.toCSS=function(t){return t&&"rgba"!==t?"rgb"===t?"rgb("+this.r+","+this.g+","+this.b+")":"#"+this.toHEX(t):"rgba("+this.r+","+this.g+","+this.b+","+(this.a/255).toFixed(2)+")"},r.fromHEX=function(t){t=0===t.indexOf("#")?t.substring(1):t;var e=parseInt(t.substr(0,2),16)||0,i=parseInt(t.substr(2,2),16)||0,n=parseInt(t.substr(4,2),16)||0,r=parseInt(t.substr(6,2),16)||255;return this._val=(r<<24>>>0)+(n<<16)+(i<<8)+e,this},r.toHEX=function(t){var e=[(this.r<16?"0":"")+this.r.toString(16),(this.g<16?"0":"")+this.g.toString(16),(this.b<16?"0":"")+this.b.toString(16)];return"#rgb"===t?(e[0]=e[0][0],e[1]=e[1][0],e[2]=e[2][0]):"#rrggbbaa"===t&&e.push((this.a<16?"0":"")+this.a.toString(16)),e.join("")},r.toRGBValue=function(){return 16777215&this._val},r.fromHSV=function(t,e,i){var n,r,s;if(0===e)n=r=s=i;else if(0===i)n=r=s=0;else{1===t&&(t=0),t*=6;var a=Math.floor(t),o=t-a,l=i*(1-e),c=i*(1-e*o),h=i*(1-e*(1-o));switch(a){case 0:n=i,r=h,s=l;break;case 1:n=c,r=i,s=l;break;case 2:n=l,r=i,s=h;break;case 3:n=l,r=c,s=i;break;case 4:n=h,r=l,s=i;break;case 5:n=i,r=l,s=c}}return n*=255,r*=255,s*=255,this._val=(this.a<<24>>>0)+(s<<16)+(r<<8)+(0|n),this},r.toHSV=function(){var t=this.r/255,e=this.g/255,i=this.b/255,n={h:0,s:0,v:0},r=Math.max(t,e,i),s=Math.min(t,e,i),a=0;return n.v=r,n.s=r?(r-s)/r:0,n.s?(a=r-s,n.h=t===r?(e-i)/a:e===r?2+(i-t)/a:4+(t-e)/a,n.h/=6,n.h<0&&(n.h+=1)):n.h=0,n},r.set=function(t){return t._val?this._val=t._val:(this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a),this},r._fastSetA=function(t){this._val=(16777215&this._val|t<<24)>>>0},r.multiply=function(t){var e=(255&this._val)*t.r>>8,i=(65280&this._val)*t.g>>8,n=(16711680&this._val)*t.b>>8,r=((4278190080&this._val)>>>8)*t.a;return this._val=4278190080&r|16711680&n|65280&i|255&e,this},l(n,[{key:"r",get:function(){return this.getR()},set:function(t){this.setR(t)}},{key:"g",get:function(){return this.getG()},set:function(t){this.setG(t)}},{key:"b",get:function(){return this.getB()},set:function(t){this.setB(t)}},{key:"a",get:function(){return this.getA()},set:function(t){this.setA(t)}}]),n})(n.default);i.default=c,c.div=c.divide,c.sub=c.subtract,c.mul=c.multiply,c.WHITE_R=c.WHITE,c.BLACK_R=c.BLACK,c.TRANSPARENT_R=c.TRANSPARENT,c.GRAY_R=c.GRAY,c.RED_R=c.RED,c.GREEN_R=c.GREEN,c.BLUE_R=c.BLUE,c.YELLOW_R=c.YELLOW,c.ORANGE_R=c.ORANGE,c.CYAN_R=c.CYAN,c.MAGENTA_R=c.MAGENTA,r.default.fastDefine("cc.Color",c,{r:0,g:0,b:0,a:255}),cc.Color=c,cc.color=function(t,e,i,n){return"string"==typeof t?(new c).fromHEX(t):"object"==typeof t?new c(t.r,t.g,t.b,t.a):new c(t,e,i,n)},e.exports=i.default}),{"../platform/CCClass":238,"../utils/misc":323,"./value-type":346}],338:[(function(t,e,i){"use strict";i.__esModule=!0;var n={Vec2:!0,Vec3:!0,Vec4:!0,Mat4:!0,Mat3:!0,Rect:!0,Size:!0,Color:!0,Quat:!0,Trs:!0};i.Trs=i.Quat=i.Color=i.Size=i.Rect=i.Mat3=i.Mat4=i.Vec4=i.Vec3=i.Vec2=void 0;var r=p(t("./vec2"));i.Vec2=r.default;var s=p(t("./vec3"));i.Vec3=s.default;var a=p(t("./vec4"));i.Vec4=a.default;var o=p(t("./mat4"));i.Mat4=o.default;var l=p(t("./mat3"));i.Mat3=l.default;var c=p(t("./rect"));i.Rect=c.default;var h=p(t("./size"));i.Size=h.default;var u=p(t("./color"));i.Color=u.default;var _=p(t("./quat"));i.Quat=_.default;var f=p(t("./trs"));i.Trs=f.default;var d=t("./utils");function p(t){return t&&t.__esModule?t:{default:t}}Object.keys(d).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||t in i&&i[t]===d[t]||(i[t]=d[t]))})),cc.math=e.exports}),{"./color":337,"./mat3":339,"./mat4":340,"./quat":341,"./rect":342,"./size":343,"./trs":344,"./utils":345,"./vec2":347,"./vec3":348,"./vec4":349}],339:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("../value-types/utils"),s=(n=t("./vec3"))&&n.__esModule?n:{default:n},a=(function(){function t(t,e,i,n,s,a,o,l,c){if(void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=1),void 0===a&&(a=0),void 0===o&&(o=0),void 0===l&&(l=0),void 0===c&&(c=1),this.m=void 0,t instanceof r.FLOAT_ARRAY_TYPE)this.m=t;else{this.m=new r.FLOAT_ARRAY_TYPE(9);var h=this.m;h[0]=t,h[1]=e,h[2]=i,h[3]=n,h[4]=s,h[5]=a,h[6]=o,h[7]=l,h[8]=c}}return t.create=function(e,i,n,r,s,a,o,l,c){return void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=1),void 0===a&&(a=0),void 0===o&&(o=0),void 0===l&&(l=0),void 0===c&&(c=1),new t(e,i,n,r,s,a,o,l,c)},t.clone=function(e){var i=e.m;return new t(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8])},t.copy=function(t,e){return t.m.set(e.m),t},t.set=function(t,e,i,n,r,s,a,o,l,c){var h=t.m;return h[0]=e,h[1]=i,h[2]=n,h[3]=r,h[4]=s,h[5]=a,h[6]=o,h[7]=l,h[8]=c,t},t.identity=function(t){var e=t.m;return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,t},t.transpose=function(t,e){var i=e.m,n=t.m;if(t===e){var r=i[1],s=i[2],a=i[5];n[1]=i[3],n[2]=i[6],n[3]=r,n[5]=i[7],n[6]=s,n[7]=a}else n[0]=i[0],n[1]=i[3],n[2]=i[6],n[3]=i[1],n[4]=i[4],n[5]=i[7],n[6]=i[2],n[7]=i[5],n[8]=i[8];return t},t.invert=function(t,e){var i=e.m,n=t.m,r=i[0],s=i[1],a=i[2],o=i[3],l=i[4],c=i[5],h=i[6],u=i[7],_=i[8],f=_*l-c*u,d=-_*o+c*h,p=u*o-l*h,m=r*f+s*d+a*p;return m?(m=1/m,n[0]=f*m,n[1]=(-_*s+a*u)*m,n[2]=(c*s-a*l)*m,n[3]=d*m,n[4]=(_*r-a*h)*m,n[5]=(-c*r+a*o)*m,n[6]=p*m,n[7]=(-u*r+s*h)*m,n[8]=(l*r-s*o)*m,t):t},t.adjoint=function(t,e){var i=e.m,n=t.m,r=i[0],s=i[1],a=i[2],o=i[3],l=i[4],c=i[5],h=i[6],u=i[7],_=i[8];return n[0]=l*_-c*u,n[1]=a*u-s*_,n[2]=s*c-a*l,n[3]=c*h-o*_,n[4]=r*_-a*h,n[5]=a*o-r*c,n[6]=o*u-l*h,n[7]=s*h-r*u,n[8]=r*l-s*o,t},t.determinant=function(t){var e=t.m,i=e[0],n=e[1],r=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],h=e[8];return i*(h*a-o*c)+n*(-h*s+o*l)+r*(c*s-a*l)},t.multiply=function(t,e,i){var n=e.m,r=i.m,s=t.m,a=n[0],o=n[1],l=n[2],c=n[3],h=n[4],u=n[5],_=n[6],f=n[7],d=n[8],p=r[0],m=r[1],y=r[2],v=r[3],g=r[4],b=r[5],A=r[6],x=r[7],C=r[8];return s[0]=p*a+m*c+y*_,s[1]=p*o+m*h+y*f,s[2]=p*l+m*u+y*d,s[3]=v*a+g*c+b*_,s[4]=v*o+g*h+b*f,s[5]=v*l+g*u+b*d,s[6]=A*a+x*c+C*_,s[7]=A*o+x*h+C*f,s[8]=A*l+x*u+C*d,t},t.multiplyMat4=function(t,e,i){var n=e.m,r=i.m,s=t.m,a=n[0],o=n[1],l=n[2],c=n[3],h=n[4],u=n[5],_=n[6],f=n[7],d=n[8],p=r[0],m=r[1],y=r[2],v=r[4],g=r[5],b=r[6],A=r[8],x=r[9],C=r[10];return s[0]=p*a+m*c+y*_,s[1]=p*o+m*h+y*f,s[2]=p*l+m*u+y*d,s[3]=v*a+g*c+b*_,s[4]=v*o+g*h+b*f,s[5]=v*l+g*u+b*d,s[6]=A*a+x*c+C*_,s[7]=A*o+x*h+C*f,s[8]=A*l+x*u+C*d,t},t.translate=function(t,e,i){var n=e.m,r=t.m,s=n[0],a=n[1],o=n[2],l=n[3],c=n[4],h=n[5],u=n[6],_=n[7],f=n[8],d=i.x,p=i.y;return r[0]=s,r[1]=a,r[2]=o,r[3]=l,r[4]=c,r[5]=h,r[6]=d*s+p*l+u,r[7]=d*a+p*c+_,r[8]=d*o+p*h+f,t},t.rotate=function(t,e,i){var n=e.m,r=t.m,s=n[0],a=n[1],o=n[2],l=n[3],c=n[4],h=n[5],u=n[6],_=n[7],f=n[8],d=Math.sin(i),p=Math.cos(i);return r[0]=p*s+d*l,r[1]=p*a+d*c,r[2]=p*o+d*h,r[3]=p*l-d*s,r[4]=p*c-d*a,r[5]=p*h-d*o,r[6]=u,r[7]=_,r[8]=f,t},t.scale=function(t,e,i){var n=i.x,r=i.y,s=e.m,a=t.m;return a[0]=n*s[0],a[1]=n*s[1],a[2]=n*s[2],a[3]=r*s[3],a[4]=r*s[4],a[5]=r*s[5],a[6]=s[6],a[7]=s[7],a[8]=s[8],t},t.fromMat4=function(t,e){var i=e.m,n=t.m;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[4],n[4]=i[5],n[5]=i[6],n[6]=i[8],n[7]=i[9],n[8]=i[10],t},t.fromTranslation=function(t,e){var i=t.m;return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=1,i[5]=0,i[6]=e.x,i[7]=e.y,i[8]=1,t},t.fromRotation=function(t,e){var i=Math.sin(e),n=Math.cos(e),r=t.m;return r[0]=n,r[1]=i,r[2]=0,r[3]=-i,r[4]=n,r[5]=0,r[6]=0,r[7]=0,r[8]=1,t},t.fromScaling=function(t,e){var i=t.m;return i[0]=e.x,i[1]=0,i[2]=0,i[3]=0,i[4]=e.y,i[5]=0,i[6]=0,i[7]=0,i[8]=1,t},t.fromQuat=function(t,e){var i=t.m,n=e.x,r=e.y,s=e.z,a=e.w,o=n+n,l=r+r,c=s+s,h=n*o,u=r*o,_=r*l,f=s*o,d=s*l,p=s*c,m=a*o,y=a*l,v=a*c;return i[0]=1-_-p,i[3]=u-v,i[6]=f+y,i[1]=u+v,i[4]=1-h-p,i[7]=d-m,i[2]=f-y,i[5]=d+m,i[8]=1-h-_,t},t.fromViewUp=function(e,i,n){var a,o,l;return(a=new s.default(0,1,0),o=new s.default,l=new s.default,function(e,i,n){return s.default.lengthSqr(i)0?(r=2*Math.sqrt(n+1),t.w=.25*r,t.x=(i[6]-i[9])/r,t.y=(i[8]-i[2])/r,t.z=(i[1]-i[4])/r):i[0]>i[5]&&i[0]>i[10]?(r=2*Math.sqrt(1+i[0]-i[5]-i[10]),t.w=(i[6]-i[9])/r,t.x=.25*r,t.y=(i[1]+i[4])/r,t.z=(i[8]+i[2])/r):i[5]>i[10]?(r=2*Math.sqrt(1+i[5]-i[0]-i[10]),t.w=(i[8]-i[2])/r,t.x=(i[1]+i[4])/r,t.y=.25*r,t.z=(i[6]+i[9])/r):(r=2*Math.sqrt(1+i[10]-i[0]-i[5]),t.w=(i[1]-i[4])/r,t.x=(i[8]+i[2])/r,t.y=(i[6]+i[9])/r,t.z=.25*r),t},r.toRTS=function(t,e,i,n){var r=t.m,o=M.m;n.x=s.default.set(E,r[0],r[1],r[2]).mag(),o[0]=r[0]/n.x,o[1]=r[1]/n.x,o[2]=r[2]/n.x,n.y=s.default.set(E,r[4],r[5],r[6]).mag(),o[3]=r[4]/n.y,o[4]=r[5]/n.y,o[5]=r[6]/n.y,n.z=s.default.set(E,r[8],r[9],r[10]).mag(),o[6]=r[8]/n.z,o[7]=r[9]/n.z,o[8]=r[10]/n.z,l.default.determinant(M)<0&&(n.x*=-1,o[0]*=-1,o[1]*=-1,o[2]*=-1),a.default.fromMat3(e,M),s.default.set(i,r[12],r[13],r[14])},r.fromRTS=function(t,e,i,n){var r=e.x,s=e.y,a=e.z,o=e.w,l=r+r,c=s+s,h=a+a,u=r*l,_=r*c,f=r*h,d=s*c,p=s*h,m=a*h,y=o*l,v=o*c,g=o*h,b=n.x,A=n.y,x=n.z,C=t.m;return C[0]=(1-(d+m))*b,C[1]=(_+g)*b,C[2]=(f-v)*b,C[3]=0,C[4]=(_-g)*A,C[5]=(1-(u+m))*A,C[6]=(p+y)*A,C[7]=0,C[8]=(f+v)*x,C[9]=(p-y)*x,C[10]=(1-(u+d))*x,C[11]=0,C[12]=i.x,C[13]=i.y,C[14]=i.z,C[15]=1,t},r.fromRTSOrigin=function(t,e,i,n,r){var s=e.x,a=e.y,o=e.z,l=e.w,c=s+s,h=a+a,u=o+o,_=s*c,f=s*h,d=s*u,p=a*h,m=a*u,y=o*u,v=l*c,g=l*h,b=l*u,A=n.x,x=n.y,C=n.z,T=r.x,S=r.y,w=r.z,E=t.m;return E[0]=(1-(p+y))*A,E[1]=(f+b)*A,E[2]=(d-g)*A,E[3]=0,E[4]=(f-b)*x,E[5]=(1-(_+y))*x,E[6]=(m+v)*x,E[7]=0,E[8]=(d+g)*C,E[9]=(m-v)*C,E[10]=(1-(_+p))*C,E[11]=0,E[12]=i.x+T-(E[0]*T+E[4]*S+E[8]*w),E[13]=i.y+S-(E[1]*T+E[5]*S+E[9]*w),E[14]=i.z+w-(E[2]*T+E[6]*S+E[10]*w),E[15]=1,t},r.fromQuat=function(t,e){var i=e.x,n=e.y,r=e.z,s=e.w,a=i+i,o=n+n,l=r+r,c=i*a,h=n*a,u=n*o,_=r*a,f=r*o,d=r*l,p=s*a,m=s*o,y=s*l,v=t.m;return v[0]=1-u-d,v[1]=h+y,v[2]=_-m,v[3]=0,v[4]=h-y,v[5]=1-c-d,v[6]=f+p,v[7]=0,v[8]=_+m,v[9]=f-p,v[10]=1-c-u,v[11]=0,v[12]=0,v[13]=0,v[14]=0,v[15]=1,t},r.frustum=function(t,e,i,n,r,s,a){var o=1/(i-e),l=1/(r-n),c=1/(s-a),h=t.m;return h[0]=2*s*o,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=2*s*l,h[6]=0,h[7]=0,h[8]=(i+e)*o,h[9]=(r+n)*l,h[10]=(a+s)*c,h[11]=-1,h[12]=0,h[13]=0,h[14]=a*s*2*c,h[15]=0,t},r.perspective=function(t,e,i,n,r){var s=1/Math.tan(e/2),a=1/(n-r),o=t.m;return o[0]=s/i,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(r+n)*a,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*r*n*a,o[15]=0,t},r.ortho=function(t,e,i,n,r,s,a){var o=1/(e-i),l=1/(n-r),c=1/(s-a),h=t.m;return h[0]=-2*o,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=-2*l,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=2*c,h[11]=0,h[12]=(e+i)*o,h[13]=(r+n)*l,h[14]=(a+s)*c,h[15]=1,t},r.lookAt=function(t,e,i,n){var r=e.x,s=e.y,a=e.z,o=n.x,l=n.y,c=n.z,h=r-i.x,u=s-i.y,_=a-i.z,f=1/Math.sqrt(h*h+u*u+_*_),d=l*(_*=f)-c*(u*=f),p=c*(h*=f)-o*_,m=o*u-l*h,y=u*(m*=f=1/Math.sqrt(d*d+p*p+m*m))-_*(p*=f),v=_*(d*=f)-h*m,g=h*p-u*d,b=t.m;return b[0]=d,b[1]=y,b[2]=h,b[3]=0,b[4]=p,b[5]=v,b[6]=u,b[7]=0,b[8]=m,b[9]=g,b[10]=_,b[11]=0,b[12]=-(d*r+p*s+m*a),b[13]=-(y*r+v*s+g*a),b[14]=-(h*r+u*s+_*a),b[15]=1,t},r.inverseTranspose=function(t,e){var i=e.m;h=i[0],u=i[1],_=i[2],f=i[3],d=i[4],p=i[5],m=i[6],y=i[7],v=i[8],g=i[9],b=i[10],A=i[11],x=i[12],C=i[13],T=i[14],S=i[15];var n=h*p-u*d,r=h*m-_*d,s=h*y-f*d,a=u*m-_*p,o=u*y-f*p,l=_*y-f*m,c=v*C-g*x,w=v*T-b*x,E=v*S-A*x,M=g*T-b*C,D=g*S-A*C,B=b*S-A*T,I=n*B-r*D+s*M+a*E-o*w+l*c;return I?(I=1/I,(i=t.m)[0]=(p*B-m*D+y*M)*I,i[1]=(m*E-d*B-y*w)*I,i[2]=(d*D-p*E+y*c)*I,i[3]=0,i[4]=(_*D-u*B-f*M)*I,i[5]=(h*B-_*E+f*w)*I,i[6]=(u*E-h*D-f*c)*I,i[7]=0,i[8]=(C*l-T*o+S*a)*I,i[9]=(T*s-x*l-S*r)*I,i[10]=(x*o-C*s+S*n)*I,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,t):null},r.add=function(t,e,i){var n=t.m,r=e.m,s=i.m;return n[0]=r[0]+s[0],n[1]=r[1]+s[1],n[2]=r[2]+s[2],n[3]=r[3]+s[3],n[4]=r[4]+s[4],n[5]=r[5]+s[5],n[6]=r[6]+s[6],n[7]=r[7]+s[7],n[8]=r[8]+s[8],n[9]=r[9]+s[9],n[10]=r[10]+s[10],n[11]=r[11]+s[11],n[12]=r[12]+s[12],n[13]=r[13]+s[13],n[14]=r[14]+s[14],n[15]=r[15]+s[15],t},r.subtract=function(t,e,i){var n=t.m,r=e.m,s=i.m;return n[0]=r[0]-s[0],n[1]=r[1]-s[1],n[2]=r[2]-s[2],n[3]=r[3]-s[3],n[4]=r[4]-s[4],n[5]=r[5]-s[5],n[6]=r[6]-s[6],n[7]=r[7]-s[7],n[8]=r[8]-s[8],n[9]=r[9]-s[9],n[10]=r[10]-s[10],n[11]=r[11]-s[11],n[12]=r[12]-s[12],n[13]=r[13]-s[13],n[14]=r[14]-s[14],n[15]=r[15]-s[15],t},r.multiplyScalar=function(t,e,i){var n=t.m,r=e.m;return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=r[3]*i,n[4]=r[4]*i,n[5]=r[5]*i,n[6]=r[6]*i,n[7]=r[7]*i,n[8]=r[8]*i,n[9]=r[9]*i,n[10]=r[10]*i,n[11]=r[11]*i,n[12]=r[12]*i,n[13]=r[13]*i,n[14]=r[14]*i,n[15]=r[15]*i,t},r.multiplyScalarAndAdd=function(t,e,i,n){var r=t.m,s=e.m,a=i.m;return r[0]=s[0]+a[0]*n,r[1]=s[1]+a[1]*n,r[2]=s[2]+a[2]*n,r[3]=s[3]+a[3]*n,r[4]=s[4]+a[4]*n,r[5]=s[5]+a[5]*n,r[6]=s[6]+a[6]*n,r[7]=s[7]+a[7]*n,r[8]=s[8]+a[8]*n,r[9]=s[9]+a[9]*n,r[10]=s[10]+a[10]*n,r[11]=s[11]+a[11]*n,r[12]=s[12]+a[12]*n,r[13]=s[13]+a[13]*n,r[14]=s[14]+a[14]*n,r[15]=s[15]+a[15]*n,t},r.strictEquals=function(t,e){var i=t.m,n=e.m;return i[0]===n[0]&&i[1]===n[1]&&i[2]===n[2]&&i[3]===n[3]&&i[4]===n[4]&&i[5]===n[5]&&i[6]===n[6]&&i[7]===n[7]&&i[8]===n[8]&&i[9]===n[9]&&i[10]===n[10]&&i[11]===n[11]&&i[12]===n[12]&&i[13]===n[13]&&i[14]===n[14]&&i[15]===n[15]},r.equals=function(t,e,i){void 0===i&&(i=o.EPSILON);var n=t.m,r=e.m;return Math.abs(n[0]-r[0])<=i*Math.max(1,Math.abs(n[0]),Math.abs(r[0]))&&Math.abs(n[1]-r[1])<=i*Math.max(1,Math.abs(n[1]),Math.abs(r[1]))&&Math.abs(n[2]-r[2])<=i*Math.max(1,Math.abs(n[2]),Math.abs(r[2]))&&Math.abs(n[3]-r[3])<=i*Math.max(1,Math.abs(n[3]),Math.abs(r[3]))&&Math.abs(n[4]-r[4])<=i*Math.max(1,Math.abs(n[4]),Math.abs(r[4]))&&Math.abs(n[5]-r[5])<=i*Math.max(1,Math.abs(n[5]),Math.abs(r[5]))&&Math.abs(n[6]-r[6])<=i*Math.max(1,Math.abs(n[6]),Math.abs(r[6]))&&Math.abs(n[7]-r[7])<=i*Math.max(1,Math.abs(n[7]),Math.abs(r[7]))&&Math.abs(n[8]-r[8])<=i*Math.max(1,Math.abs(n[8]),Math.abs(r[8]))&&Math.abs(n[9]-r[9])<=i*Math.max(1,Math.abs(n[9]),Math.abs(r[9]))&&Math.abs(n[10]-r[10])<=i*Math.max(1,Math.abs(n[10]),Math.abs(r[10]))&&Math.abs(n[11]-r[11])<=i*Math.max(1,Math.abs(n[11]),Math.abs(r[11]))&&Math.abs(n[12]-r[12])<=i*Math.max(1,Math.abs(n[12]),Math.abs(r[12]))&&Math.abs(n[13]-r[13])<=i*Math.max(1,Math.abs(n[13]),Math.abs(r[13]))&&Math.abs(n[14]-r[14])<=i*Math.max(1,Math.abs(n[14]),Math.abs(r[14]))&&Math.abs(n[15]-r[15])<=i*Math.max(1,Math.abs(n[15]),Math.abs(r[15]))},r.adjoint=function(t,e){var i=e.m,n=t.m,r=i[0],s=i[1],a=i[2],o=i[3],l=i[4],c=i[5],h=i[6],u=i[7],_=i[8],f=i[9],d=i[10],p=i[11],m=i[12],y=i[13],v=i[14],g=i[15];return n[0]=c*(d*g-p*v)-f*(h*g-u*v)+y*(h*p-u*d),n[1]=-(s*(d*g-p*v)-f*(a*g-o*v)+y*(a*p-o*d)),n[2]=s*(h*g-u*v)-c*(a*g-o*v)+y*(a*u-o*h),n[3]=-(s*(h*p-u*d)-c*(a*p-o*d)+f*(a*u-o*h)),n[4]=-(l*(d*g-p*v)-_*(h*g-u*v)+m*(h*p-u*d)),n[5]=r*(d*g-p*v)-_*(a*g-o*v)+m*(a*p-o*d),n[6]=-(r*(h*g-u*v)-l*(a*g-o*v)+m*(a*u-o*h)),n[7]=r*(h*p-u*d)-l*(a*p-o*d)+_*(a*u-o*h),n[8]=l*(f*g-p*y)-_*(c*g-u*y)+m*(c*p-u*f),n[9]=-(r*(f*g-p*y)-_*(s*g-o*y)+m*(s*p-o*f)),n[10]=r*(c*g-u*y)-l*(s*g-o*y)+m*(s*u-o*c),n[11]=-(r*(c*p-u*f)-l*(s*p-o*f)+_*(s*u-o*c)),n[12]=-(l*(f*v-d*y)-_*(c*v-h*y)+m*(c*d-h*f)),n[13]=r*(f*v-d*y)-_*(s*v-a*y)+m*(s*d-a*f),n[14]=-(r*(c*v-h*y)-l*(s*v-a*y)+m*(s*h-a*c)),n[15]=r*(c*d-h*f)-l*(s*d-a*f)+_*(s*h-a*c),t},r.toArray=function(t,e,i){void 0===i&&(i=0);for(var n=e.m,r=0;r<16;r++)t[i+r]=n[r];return t},r.fromArray=function(t,e,i){void 0===i&&(i=0);for(var n=t.m,r=0;r<16;r++)n[r]=e[i+r];return t},n.clone=function(){var t=this.m;return new r(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},n.set=function(t){var e=this.m,i=t.m;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},n.equals=function(t){return r.strictEquals(this,t)},n.fuzzyEquals=function(t){return r.equals(this,t)},n.toString=function(){var t=this.m;return t?"[\n"+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+",\n"+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+",\n"+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+",\n"+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+"\n]":"[\n1, 0, 0, 0\n0, 1, 0, 0\n0, 0, 1, 0\n0, 0, 0, 1\n]"},n.identity=function(){return r.identity(this)},n.transpose=function(t){return t=t||new r,r.transpose(t,this)},n.invert=function(t){return t=t||new r,r.invert(t,this)},n.adjoint=function(t){return t=t||new r,r.adjoint(t,this)},n.determinant=function(){return r.determinant(this)},n.add=function(t,e){return e=e||new r,r.add(e,this,t)},n.subtract=function(t){return r.subtract(this,this,t)},n.multiply=function(t){return r.multiply(this,this,t)},n.multiplyScalar=function(t){return r.multiplyScalar(this,this,t)},n.translate=function(t,e){return e=e||new r,r.translate(e,this,t)},n.scale=function(t,e){return e=e||new r,r.scale(e,this,t)},n.rotate=function(t,e,i){return i=i||new r,r.rotate(i,this,t,e)},n.getTranslation=function(t){return t=t||new s.default,r.getTranslation(t,this)},n.getScale=function(t){return t=t||new s.default,r.getScaling(t,this)},n.getRotation=function(t){return t=t||new a.default,r.getRotation(t,this)},n.fromRTS=function(t,e,i){return r.fromRTS(this,t,e,i)},n.fromQuat=function(t){return r.fromQuat(this,t)},r})(n.default);i.default=w,w.mul=w.multiply,w.sub=w.subtract,w.IDENTITY=Object.freeze(new w);var E=new s.default,M=new l.default;r.default.fastDefine("cc.Mat4",w,{m00:1,m01:0,m02:0,m03:0,m04:0,m05:1,m06:0,m07:0,m08:0,m09:0,m10:1,m11:0,m12:0,m13:0,m14:0,m15:1});for(var D=function(t){Object.defineProperty(w.prototype,"m"+t,{get:function(){return this.m[t]},set:function(e){this.m[t]=e}})},B=0;B<16;B++)D(B);cc.mat4=function(t,e,i,n,r,s,a,o,l,c,h,u,_,f,d,p){var m=new w(t,e,i,n,r,s,a,o,l,c,h,u,_,f,d,p);return void 0===t&&w.identity(m),m},cc.Mat4=w,e.exports=i.default}),{"../platform/CCClass":238,"./mat3":339,"./quat":341,"./utils":345,"./value-type":346,"./vec3":348}],341:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=l(t("./value-type")),r=l(t("../platform/CCClass")),s=l(t("./vec3")),a=l(t("./mat3")),o=t("./utils");function l(t){return t&&t.__esModule?t:{default:t}}var c=0,h=0,u=0,_=0,f=(function(t){var e,i;i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var n=r.prototype;function r(e,i,n,r){var s;return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=1),(s=t.call(this)||this).x=void 0,s.y=void 0,s.z=void 0,s.w=void 0,e&&"object"==typeof e?(s.x=e.x,s.y=e.y,s.z=e.z,s.w=e.w):(s.x=e,s.y=i,s.z=n,s.w=r),s}return n.mul=function(t,e){return r.multiply(e||new r,this,t)},r.clone=function(t){return new r(t.x,t.y,t.z,t.w)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t},r.set=function(t,e,i,n,r){return t.x=e,t.y=i,t.z=n,t.w=r,t},r.identity=function(t){return t.x=0,t.y=0,t.z=0,t.w=1,t},r.rotationTo=function(t,e,i){var n=s.default.dot(e,i);return n<-.999999?(s.default.cross(m,s.default.RIGHT,e),m.mag()<1e-6&&s.default.cross(m,s.default.UP,e),s.default.normalize(m,m),r.fromAxisAngle(t,m,Math.PI),t):n>.999999?(t.x=0,t.y=0,t.z=0,t.w=1,t):(s.default.cross(m,e,i),t.x=m.x,t.y=m.y,t.z=m.z,t.w=1+n,r.normalize(t,t))},r.getAxisAngle=function(t,e){var i=2*Math.acos(e.w),n=Math.sin(i/2);return 0!==n?(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n):(t.x=1,t.y=0,t.z=0),i},r.multiply=function(t,e,i){return c=e.x*i.w+e.w*i.x+e.y*i.z-e.z*i.y,h=e.y*i.w+e.w*i.y+e.z*i.x-e.x*i.z,u=e.z*i.w+e.w*i.z+e.x*i.y-e.y*i.x,_=e.w*i.w-e.x*i.x-e.y*i.y-e.z*i.z,t.x=c,t.y=h,t.z=u,t.w=_,t},r.multiplyScalar=function(t,e,i){return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=e.w*i,t},r.scaleAndAdd=function(t,e,i,n){return t.x=e.x+i.x*n,t.y=e.y+i.y*n,t.z=e.z+i.z*n,t.w=e.w+i.w*n,t},r.rotateX=function(t,e,i){i*=.5;var n=Math.sin(i),r=Math.cos(i);return c=e.x*r+e.w*n,h=e.y*r+e.z*n,u=e.z*r-e.y*n,_=e.w*r-e.x*n,t.x=c,t.y=h,t.z=u,t.w=_,t},r.rotateY=function(t,e,i){i*=.5;var n=Math.sin(i),r=Math.cos(i);return c=e.x*r-e.z*n,h=e.y*r+e.w*n,u=e.z*r+e.x*n,_=e.w*r-e.y*n,t.x=c,t.y=h,t.z=u,t.w=_,t},r.rotateZ=function(t,e,i){i*=.5;var n=Math.sin(i),r=Math.cos(i);return c=e.x*r+e.y*n,h=e.y*r-e.x*n,u=e.z*r+e.w*n,_=e.w*r-e.z*n,t.x=c,t.y=h,t.z=u,t.w=_,t},r.rotateAround=function(t,e,i,n){return r.invert(d,e),s.default.transformQuat(m,i,d),r.fromAxisAngle(d,m,n),r.multiply(t,e,d),t},r.rotateAroundLocal=function(t,e,i,n){return r.fromAxisAngle(d,i,n),r.multiply(t,e,d),t},r.calculateW=function(t,e){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=Math.sqrt(Math.abs(1-e.x*e.x-e.y*e.y-e.z*e.z)),t},r.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},r.lerp=function(t,e,i,n){return t.x=e.x+n*(i.x-e.x),t.y=e.y+n*(i.y-e.y),t.z=e.z+n*(i.z-e.z),t.w=e.w+n*(i.w-e.w),t},r.slerp=function(t,e,i,n){var r=0,s=0,a=e.x*i.x+e.y*i.y+e.z*i.z+e.w*i.w;if(a<0&&(a=-a,i.x=-i.x,i.y=-i.y,i.z=-i.z,i.w=-i.w),1-a>1e-6){var o=Math.acos(a),l=Math.sin(o);r=Math.sin((1-n)*o)/l,s=Math.sin(n*o)/l}else r=1-n,s=n;return t.x=r*e.x+s*i.x,t.y=r*e.y+s*i.y,t.z=r*e.z+s*i.z,t.w=r*e.w+s*i.w,t},r.sqlerp=function(t,e,i,n,s,a){return r.slerp(d,e,s,a),r.slerp(p,i,n,a),r.slerp(t,d,p,2*a*(1-a)),t},r.invert=function(t,e){var i=e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w,n=i?1/i:0;return t.x=-e.x*n,t.y=-e.y*n,t.z=-e.z*n,t.w=e.w*n,t},r.conjugate=function(t,e){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w)},r.lengthSqr=function(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},r.normalize=function(t,e){var i=e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w;return i>0&&(i=1/Math.sqrt(i),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=e.w*i),t},r.fromAxes=function(t,e,i,n){return a.default.set(y,e.x,e.y,e.z,i.x,i.y,i.z,n.x,n.y,n.z),r.normalize(t,r.fromMat3(t,y))},r.fromViewUp=function(t,e,i){return a.default.fromViewUp(y,e,i),r.normalize(t,r.fromMat3(t,y))},r.fromAxisAngle=function(t,e,i){i*=.5;var n=Math.sin(i);return t.x=n*e.x,t.y=n*e.y,t.z=n*e.z,t.w=Math.cos(i),t},r.fromAngleZ=function(t,e){return e*=v,t.x=t.y=0,t.z=Math.sin(e),t.w=Math.cos(e),t},r.fromMat3=function(t,e){var i=e.m,n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],l=i[5],c=i[6],h=i[7],u=i[8],_=n+o+u;if(_>0){var f=.5/Math.sqrt(_+1);t.w=.25/f,t.x=(l-h)*f,t.y=(c-s)*f,t.z=(r-a)*f}else if(n>o&&n>u){var d=2*Math.sqrt(1+n-o-u);t.w=(l-h)/d,t.x=.25*d,t.y=(a+r)/d,t.z=(c+s)/d}else if(o>u){var p=2*Math.sqrt(1+o-n-u);t.w=(c-s)/p,t.x=(a+r)/p,t.y=.25*p,t.z=(h+l)/p}else{var m=2*Math.sqrt(1+u-n-o);t.w=(r-a)/m,t.x=(c+s)/m,t.y=(h+l)/m,t.z=.25*m}return t},r.fromEuler=function(t,e,i,n){e*=v,i*=v,n*=v;var r=Math.sin(e),s=Math.cos(e),a=Math.sin(i),o=Math.cos(i),l=Math.sin(n),c=Math.cos(n);return t.x=r*o*c+s*a*l,t.y=s*a*c+r*o*l,t.z=s*o*l-r*a*c,t.w=s*o*c-r*a*l,t},r.toAxisX=function(t,e){var i=2*e.y,n=2*e.z;return t.x=1-i*e.y-n*e.z,t.y=i*e.x+n*e.w,t.z=n*e.x+i*e.w,t},r.toAxisY=function(t,e){var i=2*e.x,n=2*e.y,r=2*e.z;return t.x=n*e.x-r*e.w,t.y=1-i*e.x-r*e.z,t.z=r*e.y+i*e.w,t},r.toAxisZ=function(t,e){var i=2*e.x,n=2*e.y,r=2*e.z;return t.x=r*e.x-n*e.w,t.y=r*e.y-i*e.w,t.z=1-i*e.x-n*e.y,t},r.toEuler=function(t,e,i){var n=e.x,r=e.y,s=e.z,a=e.w,l=0,c=0,h=0,u=n*r+s*a;if(u>.499999)l=0,c=(0,o.toDegree)(2*Math.atan2(n,a)),h=90;else if(u<-.499999)l=0,c=-(0,o.toDegree)(2*Math.atan2(n,a)),h=-90;else{var _=n*n,f=r*r,d=s*s;l=(0,o.toDegree)(Math.atan2(2*n*a-2*r*s,1-2*_-2*d)),c=(0,o.toDegree)(Math.atan2(2*r*a-2*n*s,1-2*f-2*d)),h=(0,o.toDegree)(Math.asin(2*u)),i&&(l=-180*Math.sign(l+1e-6)+l,c=-180*Math.sign(c+1e-6)+c,h=180*Math.sign(h+1e-6)-h)}return t.x=l,t.y=c,t.z=h,t},r.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},r.equals=function(t,e,i){return void 0===i&&(i=o.EPSILON),Math.abs(t.x-e.x)<=i*Math.max(1,Math.abs(t.x),Math.abs(e.x))&&Math.abs(t.y-e.y)<=i*Math.max(1,Math.abs(t.y),Math.abs(e.y))&&Math.abs(t.z-e.z)<=i*Math.max(1,Math.abs(t.z),Math.abs(e.z))&&Math.abs(t.w-e.w)<=i*Math.max(1,Math.abs(t.w),Math.abs(e.w))},r.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t[i+2]=e.z,t[i+3]=e.w,t},r.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t.z=e[i+2],t.w=e[i+3],t},n.clone=function(){return new r(this.x,this.y,this.z,this.w)},n.set=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},n.equals=function(t){return t&&this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},n.toEuler=function(t){return r.toEuler(t,this)},n.fromEuler=function(t){return r.fromEuler(this,t.x,t.y,t.z)},n.lerp=function(t,e,i){return i=i||new r,r.slerp(i,this,t,e),i},n.multiply=function(t){return r.multiply(this,this,t)},n.rotateAround=function(t,e,i,n){return n=n||new r,r.rotateAround(n,t,e,i)},r})(n.default);i.default=f,f.mul=f.multiply,f.scale=f.multiplyScalar,f.mag=f.len,f.IDENTITY=Object.freeze(new f);var d=new f,p=new f,m=new s.default,y=new a.default,v=.5*Math.PI/180;r.default.fastDefine("cc.Quat",f,{x:0,y:0,z:0,w:1}),cc.quat=function(t,e,i,n){return new f(t,e,i,n)},cc.Quat=f,e.exports=i.default}),{"../platform/CCClass":238,"./mat3":339,"./utils":345,"./value-type":346,"./vec3":348}],342:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(t("./value-type")),r=o(t("../platform/CCClass")),s=o(t("./vec2")),a=o(t("./size"));function o(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var i=0;i=t.x&&this.y<=t.y&&this.y+this.height>=t.y},c.containsRect=function(t){return this.x<=t.x&&this.x+this.width>=t.x+t.width&&this.y<=t.y&&this.y+this.height>=t.y+t.height},c.union=function(t,e){var i=this.x,n=this.y,r=this.width,s=this.height,a=e.x,o=e.y,l=e.width,c=e.height;return t.x=Math.min(i,a),t.y=Math.min(n,o),t.width=Math.max(i+r,a+l)-t.x,t.height=Math.max(n+s,o+c)-t.y,t},c.transformMat4=function(t,e){var i=this.x,n=this.y,r=i+this.width,s=n+this.height,a=e.m,o=a[0]*i+a[4]*n+a[12],l=a[1]*i+a[5]*n+a[13],c=a[0]*r+a[4]*n+a[12],h=a[1]*r+a[5]*n+a[13],u=a[0]*i+a[4]*s+a[12],_=a[1]*i+a[5]*s+a[13],f=a[0]*r+a[4]*s+a[12],d=a[1]*r+a[5]*s+a[13],p=Math.min(o,c,u,f),m=Math.max(o,c,u,f),y=Math.min(l,h,_,d),v=Math.max(l,h,_,d);return t.x=p,t.y=y,t.width=m-p,t.height=v-y,t},c.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.width.toFixed(2)+", "+this.height.toFixed(2)+")"},r=n,(o=[{key:"xMin",get:function(){return this.x},set:function(t){this.width+=this.x-t,this.x=t}},{key:"yMin",get:function(){return this.y},set:function(t){this.height+=this.y-t,this.y=t}},{key:"xMax",get:function(){return this.x+this.width},set:function(t){this.width=t-this.x}},{key:"yMax",get:function(){return this.y+this.height},set:function(t){this.height=t-this.y}},{key:"center",get:function(){return new s.default(this.x+.5*this.width,this.y+.5*this.height)},set:function(t){this.x=t.x-.5*this.width,this.y=t.y-.5*this.height}},{key:"origin",get:function(){return new s.default(this.x,this.y)},set:function(t){this.x=t.x,this.y=t.y}},{key:"size",get:function(){return new a.default(this.width,this.height)},set:function(t){this.width=t.width,this.height=t.height}}])&&l(r.prototype,o),n})(n.default);i.default=c,r.default.fastDefine("cc.Rect",c,{x:0,y:0,width:0,height:0}),cc.Rect=c,cc.rect=function(t,e,i,n){return new c(t,e,i,n)},e.exports=i.default}),{"../platform/CCClass":238,"./size":343,"./value-type":346,"./vec2":347}],343:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=s(t("./value-type")),r=s(t("../platform/CCClass"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){for(var i=0;ii?i:t},i.clamp01=function(t){return t<0?0:t>1?1:t},i.lerp=function(t,e,i){return t+(e-t)*i},i.toRadian=function(t){return t*n},i.toDegree=function(t){return t*r},i.randomRange=l,i.randomRangeInt=function(t,e){return Math.floor(l(t,e))},i.pseudoRandom=c,i.pseudoRandomRange=h,i.pseudoRandomRangeInt=function(t,e,i){return Math.floor(h(t,e,i))},i.nextPow2=function(t){return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},i.repeat=u,i.pingPong=function(t,e){return t=u(t,2*e),e-Math.abs(t-e)},i.inverseLerp=function(t,e,i){return(i-t)/(e-t)},i.sign=function(t){return(t>0)-(t<0)},i.random=i.FLOAT_BYTES=i.FLOAT_ARRAY_TYPE=i.INT_MIN=i.INT_MAX=i.INT_BITS=i.EPSILON=void 0;var n=Math.PI/180,r=180/Math.PI,s=1e-6;i.EPSILON=s,i.INT_BITS=32,i.INT_MAX=2147483647,i.INT_MIN=-1<<31;var a=Float64Array;i.FLOAT_ARRAY_TYPE=a,i.FLOAT_BYTES=8;var o=Math.random;function l(t,e){return Math.random()*(e-t)+t}function c(t){return(t=(9301*t+49297)%233280)/233280}function h(t,e,i){return c(t)*(i-e)+e}function u(t,e){return t-Math.floor(t/e)*e}i.random=o}),{}],346:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("../platform/js"))&&n.__esModule?n:{default:n},s=(function(){function t(){}var e=t.prototype;return e.clone=function(){return cc.errorID("0100",r.default.getClassName(this)+".clone"),null},e.equals=function(){return cc.errorID("0100",r.default.getClassName(this)+".equals"),!1},e.lerp=function(){return cc.errorID("0100",r.default.getClassName(this)+".lerp"),this.clone()},e.set=function(){cc.errorID("0100",r.default.getClassName(this)+".set")},e.toString=function(){return""+{}},t})();i.default=s,r.default.setClassName("cc.ValueType",s),cc.ValueType=s,e.exports=i.default}),{"../platform/js":259}],347:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=o(t("./value-type")),r=o(t("../platform/CCClass")),s=o(t("../utils/misc")),a=t("./utils");function o(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),t.x=c*i,t.y=h*i),t},u.dot=function(t,e){return t.x*e.x+t.y*e.y},u.cross=function(t,e,i){return t.x=t.y=0,t.z=e.x*i.y-e.y*i.x,t},u.lerp=function(t,e,i,n){return c=e.x,h=e.y,t.x=c+n*(i.x-c),t.y=h+n*(i.y-h),t},u.random=function(t,e){e=e||1;var i=2*(0,a.random)()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t},u.transformMat3=function(t,e,i){c=e.x,h=e.y;var n=i.m;return t.x=n[0]*c+n[3]*h+n[6],t.y=n[1]*c+n[4]*h+n[7],t},u.transformMat4=function(t,e,i){c=e.x,h=e.y;var n=i.m;return t.x=n[0]*c+n[4]*h+n[12],t.y=n[1]*c+n[5]*h+n[13],t},u.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y},u.equals=function(t,e,i){return void 0===i&&(i=a.EPSILON),Math.abs(t.x-e.x)<=i*Math.max(1,Math.abs(t.x),Math.abs(e.x))&&Math.abs(t.y-e.y)<=i*Math.max(1,Math.abs(t.y),Math.abs(e.y))},u.angle=function(t,e){u.normalize(_,t),u.normalize(f,e);var i=u.dot(_,f);return i>1?0:i<-1?Math.PI:Math.acos(i)},u.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t},u.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t},n=u,r=[{key:"ONE",get:function(){return new u(1,1)}},{key:"ZERO",get:function(){return new u(0,0)}},{key:"UP",get:function(){return new u(0,1)}},{key:"RIGHT",get:function(){return new u(1,0)}}],null&&l(n.prototype,null),r&&l(n,r),o.clone=function(){return new u(this.x,this.y)},o.set=function(t){return this.x=t.x,this.y=t.y,this},o.equals=function(t){return t&&this.x===t.x&&this.y===t.y},o.fuzzyEquals=function(t,e){return this.x-e<=t.x&&t.x<=this.x+e&&this.y-e<=t.y&&t.y<=this.y+e},o.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+")"},o.lerp=function(t,e,i){i=i||new u;var n=this.x,r=this.y;return i.x=n+(t.x-n)*e,i.y=r+(t.y-r)*e,i},o.clampf=function(t,e){return this.x=s.default.clampf(this.x,t.x,e.x),this.y=s.default.clampf(this.y,t.y,e.y),this},o.add=function(t,e){return(e=e||new u).x=this.x+t.x,e.y=this.y+t.y,e},o.addSelf=function(t){return this.x+=t.x,this.y+=t.y,this},o.subtract=function(t){return this.x-=t.x,this.y-=t.y,this},o.multiplyScalar=function(t){return this.x*=t,this.y*=t,this},o.multiply=function(t){return this.x*=t.x,this.y*=t.y,this},o.divide=function(t){return this.x/=t,this.y/=t,this},o.negate=function(){return this.x=-this.x,this.y=-this.y,this},o.dot=function(t){return this.x*t.x+this.y*t.y},o.cross=function(t){return this.x*t.y-this.y*t.x},o.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},o.lengthSqr=function(){return this.x*this.x+this.y*this.y},o.normalizeSelf=function(){var t=this.x*this.x+this.y*this.y;if(1===t)return this;if(0===t)return this;var e=1/Math.sqrt(t);return this.x*=e,this.y*=e,this},o.normalize=function(t){return(t=t||new u).x=this.x,t.y=this.y,t.normalizeSelf(),t},o.angle=function(t){var e=this.magSqr(),i=t.magSqr();if(0===e||0===i)return console.warn("Can't get angle between zero vector"),0;var n=this.dot(t)/Math.sqrt(e*i);return n=s.default.clampf(n,-1,1),Math.acos(n)},o.signAngle=function(t){var e=this.angle(t);return this.cross(t)<0?-e:e},o.rotate=function(t,e){return(e=e||new u).x=this.x,e.y=this.y,e.rotateSelf(t)},o.rotateSelf=function(t){var e=Math.sin(t),i=Math.cos(t),n=this.x;return this.x=i*n-e*this.y,this.y=e*n+i*this.y,this},o.project=function(t){return t.multiplyScalar(this.dot(t)/t.dot(t))},o.transformMat4=function(t,e){return e=e||new u,u.transformMat4(e,this,t),e},o.maxAxis=function(){return Math.max(this.x,this.y)},u})(n.default);i.default=u,u.sub=u.subtract,u.mul=u.multiply,u.scale=u.multiplyScalar,u.mag=u.len,u.squaredMagnitude=u.lengthSqr,u.div=u.divide,u.ONE_R=u.ONE,u.ZERO_R=u.ZERO,u.UP_R=u.UP,u.RIGHT_R=u.RIGHT;var _=new u,f=new u;r.default.fastDefine("cc.Vec2",u,{x:0,y:0}),cc.v2=function(t,e){return new u(t,e)},cc.Vec2=u,e.exports=i.default}),{"../platform/CCClass":238,"../utils/misc":323,"./utils":345,"./value-type":346}],348:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=l(t("./value-type")),r=l(t("../platform/CCClass")),s=l(t("../utils/misc")),a=l(t("./vec2")),o=t("./utils");function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),t.x=h*i,t.y=u*i,t.z=_*i),t},f.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},f.cross=function(t,e,i){var n=e.x,r=e.y,s=e.z,a=i.x,o=i.y,l=i.z;return t.x=r*l-s*o,t.y=s*a-n*l,t.z=n*o-r*a,t},f.lerp=function(t,e,i,n){return t.x=e.x+n*(i.x-e.x),t.y=e.y+n*(i.y-e.y),t.z=e.z+n*(i.z-e.z),t},f.random=function(t,e){e=e||1;var i=2*(0,o.random)()*Math.PI,n=2*(0,o.random)()-1,r=Math.sqrt(1-n*n);return t.x=r*Math.cos(i)*e,t.y=r*Math.sin(i)*e,t.z=n*e,t},f.transformMat4=function(t,e,i){h=e.x,u=e.y,_=e.z;var n=i.m,r=n[3]*h+n[7]*u+n[11]*_+n[15];return r=r?1/r:1,t.x=(n[0]*h+n[4]*u+n[8]*_+n[12])*r,t.y=(n[1]*h+n[5]*u+n[9]*_+n[13])*r,t.z=(n[2]*h+n[6]*u+n[10]*_+n[14])*r,t},f.transformMat4Normal=function(t,e,i){h=e.x,u=e.y,_=e.z;var n=i.m,r=n[3]*h+n[7]*u+n[11]*_;return r=r?1/r:1,t.x=(n[0]*h+n[4]*u+n[8]*_)*r,t.y=(n[1]*h+n[5]*u+n[9]*_)*r,t.z=(n[2]*h+n[6]*u+n[10]*_)*r,t},f.transformMat3=function(t,e,i){h=e.x,u=e.y,_=e.z;var n=i.m;return t.x=h*n[0]+u*n[3]+_*n[6],t.y=h*n[1]+u*n[4]+_*n[7],t.z=h*n[2]+u*n[5]+_*n[8],t},f.transformAffine=function(t,e,i){h=e.x,u=e.y,_=e.z;var n=i.m;return t.x=n[0]*h+n[1]*u+n[2]*_+n[3],t.y=n[4]*h+n[5]*u+n[6]*_+n[7],t.x=n[8]*h+n[9]*u+n[10]*_+n[11],t},f.transformQuat=function(t,e,i){var n=i.w*e.x+i.y*e.z-i.z*e.y,r=i.w*e.y+i.z*e.x-i.x*e.z,s=i.w*e.z+i.x*e.y-i.y*e.x,a=-i.x*e.x-i.y*e.y-i.z*e.z;return t.x=n*i.w+a*-i.x+r*-i.z-s*-i.y,t.y=r*i.w+a*-i.y+s*-i.x-n*-i.z,t.z=s*i.w+a*-i.z+n*-i.y-r*-i.x,t},f.transformRTS=function(t,e,i,n,r){var s=e.x*r.x,a=e.y*r.y,o=e.z*r.z,l=i.w*s+i.y*o-i.z*a,c=i.w*a+i.z*s-i.x*o,h=i.w*o+i.x*a-i.y*s,u=-i.x*s-i.y*a-i.z*o;return t.x=l*i.w+u*-i.x+c*-i.z-h*-i.y+n.x,t.y=c*i.w+u*-i.y+h*-i.x-l*-i.z+n.y,t.z=h*i.w+u*-i.z+l*-i.y-c*-i.x+n.z,t},f.transformInverseRTS=function(t,e,i,n,r){var s=e.x-n.x,a=e.y-n.y,o=e.z-n.z,l=i.w*s-i.y*o+i.z*a,c=i.w*a-i.z*s+i.x*o,h=i.w*o-i.x*a+i.y*s,u=i.x*s+i.y*a+i.z*o;return t.x=(l*i.w+u*i.x+c*i.z-h*i.y)/r.x,t.y=(c*i.w+u*i.y+h*i.x-l*i.z)/r.y,t.z=(h*i.w+u*i.z+l*i.y-c*i.x)/r.z,t},f.rotateX=function(t,e,i,n){h=e.x-i.x,u=e.y-i.y,_=e.z-i.z;var r=Math.cos(n),s=Math.sin(n),a=h,o=u*r-_*s,l=u*s+_*r;return t.x=a+i.x,t.y=o+i.y,t.z=l+i.z,t},f.rotateY=function(t,e,i,n){h=e.x-i.x,u=e.y-i.y,_=e.z-i.z;var r=Math.cos(n),s=Math.sin(n),a=_*s+h*r,o=u,l=_*r-h*s;return t.x=a+i.x,t.y=o+i.y,t.z=l+i.z,t},f.rotateZ=function(t,e,i,n){h=e.x-i.x,u=e.y-i.y,_=e.z-i.z;var r=Math.cos(n),s=Math.sin(n),a=h*r-u*s,o=h*s+u*r,l=_;return t.x=a+i.x,t.y=o+i.y,t.z=l+i.z,t},f.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z},f.equals=function(t,e,i){void 0===i&&(i=o.EPSILON);var n=t.x,r=t.y,s=t.z,a=e.x,l=e.y,c=e.z;return Math.abs(n-a)<=i*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-l)<=i*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(s-c)<=i*Math.max(1,Math.abs(s),Math.abs(c))},f.angle=function(t,e){f.normalize(d,t),f.normalize(p,e);var i=f.dot(d,p);return i>1?0:i<-1?Math.PI:Math.acos(i)},f.projectOnPlane=function(t,e,i){return f.subtract(t,e,f.project(t,e,i))},f.project=function(t,e,i){var n=f.lengthSqr(i);return n<1e-6?f.set(t,0,0,0):f.multiplyScalar(t,i,f.dot(e,i)/n)},f.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t[i+2]=e.z,t},f.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t.z=e[i+2],t},n=f,r=[{key:"ONE",get:function(){return new f(1,1,1)}},{key:"ZERO",get:function(){return new f}},{key:"UP",get:function(){return new f(0,1,0)}},{key:"RIGHT",get:function(){return new f(1,0,0)}},{key:"FORWARD",get:function(){return new f(0,0,1)}}],null&&c(n.prototype,null),r&&c(n,r),l.clone=function(){return new f(this.x,this.y,this.z)},l.set=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},l.equals=function(t){return t&&this.x===t.x&&this.y===t.y&&this.z===t.z},l.fuzzyEquals=function(t,e){return this.x-e<=t.x&&t.x<=this.x+e&&this.y-e<=t.y&&t.y<=this.y+e&&this.z-e<=t.z&&t.z<=this.z+e},l.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.z.toFixed(2)+")"},l.lerp=function(t,e,i){return i=i||new f,f.lerp(i,this,t,e),i},l.clampf=function(t,e){return this.x=s.default.clampf(this.x,t.x,e.x),this.y=s.default.clampf(this.y,t.y,e.y),this.z=s.default.clampf(this.z,t.z,e.z),this},l.addSelf=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},l.add=function(t,e){return(e=e||new f).x=this.x+t.x,e.y=this.y+t.y,e.z=this.z+t.z,e},l.subtract=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},l.multiplyScalar=function(t){return this.x*=t,this.y*=t,this.z*=t,this},l.multiply=function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this},l.divide=function(t){return this.x/=t,this.y/=t,this.z/=t,this},l.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},l.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z},l.cross=function(t,e){return e=e||new f,f.cross(e,this,t),e},l.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},l.lengthSqr=function(){return this.x*this.x+this.y*this.y+this.z*this.z},l.normalizeSelf=function(){return f.normalize(this,this),this},l.normalize=function(t){return t=t||new f,f.normalize(t,this),t},l.transformMat4=function(t,e){return e=e||new f,f.transformMat4(e,this,t),e},l.maxAxis=function(){return Math.max(this.x,this.y,this.z)},l.signAngle=function(t){cc.warnID(1408,"vec3.signAngle","v2.1","cc.v2(selfVector).signAngle(vector)");var e=new a.default(this.x,this.y),i=new a.default(t.x,t.y);return e.signAngle(i)},l.rotate=function(t,e){return cc.warnID(1408,"vec3.rotate","v2.1","cc.v2(selfVector).rotate(radians, out)"),a.default.prototype.rotate.call(this,t,e)},l.rotateSelf=function(t){return cc.warnID(1408,"vec3.rotateSelf","v2.1","cc.v2(selfVector).rotateSelf(radians)"),a.default.prototype.rotateSelf.call(this,t)},f})(n.default);i.default=f,f.sub=f.subtract,f.mul=f.multiply,f.scale=f.multiplyScalar,f.mag=f.len,f.squaredMagnitude=f.lengthSqr,f.div=f.divide,f.ONE_R=f.ONE,f.ZERO_R=f.ZERO,f.UP_R=f.UP,f.RIGHT_R=f.RIGHT,f.FRONT_R=f.FORWARD;var d=new f,p=new f;r.default.fastDefine("cc.Vec3",f,{x:0,y:0,z:0}),cc.v3=function(t,e,i){return new f(t,e,i)},cc.Vec3=f,e.exports=i.default}),{"../platform/CCClass":238,"../utils/misc":323,"./utils":345,"./value-type":346,"./vec2":347}],349:[(function(t,e,i){"use strict";i.__esModule=!0,i.v4=f,i.default=void 0;var n=a(t("../platform/CCClass")),r=a(t("./value-type")),s=t("./utils");function a(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var i=0;i0&&(i=1/Math.sqrt(i),t.x=l*i,t.y=c*i,t.z=h*i,t.w=u*i),t},_.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},_.lerp=function(t,e,i,n){return t.x=e.x+n*(i.x-e.x),t.y=e.y+n*(i.y-e.y),t.z=e.z+n*(i.z-e.z),t.w=e.w+n*(i.w-e.w),t},_.random=function(t,e){e=e||1;var i=2*(0,s.random)()*Math.PI,n=2*(0,s.random)()-1,r=Math.sqrt(1-n*n);return t.x=r*Math.cos(i)*e,t.y=r*Math.sin(i)*e,t.z=n*e,t.w=0,t},_.transformMat4=function(t,e,i){l=e.x,c=e.y,h=e.z,u=e.w;var n=i.m;return t.x=n[0]*l+n[4]*c+n[8]*h+n[12]*u,t.y=n[1]*l+n[5]*c+n[9]*h+n[13]*u,t.z=n[2]*l+n[6]*c+n[10]*h+n[14]*u,t.w=n[3]*l+n[7]*c+n[11]*h+n[15]*u,t},_.transformAffine=function(t,e,i){l=e.x,c=e.y,h=e.z,u=e.w;var n=i.m;return t.x=n[0]*l+n[1]*c+n[2]*h+n[3]*u,t.y=n[4]*l+n[5]*c+n[6]*h+n[7]*u,t.x=n[8]*l+n[9]*c+n[10]*h+n[11]*u,t.w=e.w,t},_.transformQuat=function(t,e,i){var n=e.x,r=e.y,s=e.z;l=i.x,c=i.y,h=i.z;var a=(u=i.w)*n+c*s-h*r,o=u*r+h*n-l*s,_=u*s+l*r-c*n,f=-l*n-c*r-h*s;return t.x=a*u+f*-l+o*-h-_*-c,t.y=o*u+f*-c+_*-l-a*-h,t.z=_*u+f*-h+a*-c-o*-l,t.w=e.w,t},_.strictEquals=function(t,e){return t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},_.equals=function(t,e,i){return void 0===i&&(i=s.EPSILON),Math.abs(t.x-e.x)<=i*Math.max(1,Math.abs(t.x),Math.abs(e.x))&&Math.abs(t.y-e.y)<=i*Math.max(1,Math.abs(t.y),Math.abs(e.y))&&Math.abs(t.z-e.z)<=i*Math.max(1,Math.abs(t.z),Math.abs(e.z))&&Math.abs(t.w-e.w)<=i*Math.max(1,Math.abs(t.w),Math.abs(e.w))},_.toArray=function(t,e,i){return void 0===i&&(i=0),t[i+0]=e.x,t[i+1]=e.y,t[i+2]=e.z,t[i+3]=e.w,t},_.fromArray=function(t,e,i){return void 0===i&&(i=0),t.x=e[i+0],t.y=e[i+1],t.z=e[i+2],t.w=e[i+3],t},n=_,r=[{key:"ZERO",get:function(){return new _(0,0,0,0)}},{key:"ONE",get:function(){return new _(1,1,1,1)}},{key:"NEG_ONE",get:function(){return new _(-1,-1,-1,-1)}}],null&&o(n.prototype,null),r&&o(n,r),a.clone=function(){return new _(this.x,this.y,this.z,this.w)},a.set=function(t,e,i,n){return t&&"object"==typeof t?(this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},a.equals=function(t,e){return void 0===e&&(e=s.EPSILON),Math.abs(this.x-t.x)<=e*Math.max(1,Math.abs(this.x),Math.abs(t.x))&&Math.abs(this.y-t.y)<=e*Math.max(1,Math.abs(this.y),Math.abs(t.y))&&Math.abs(this.z-t.z)<=e*Math.max(1,Math.abs(this.z),Math.abs(t.z))&&Math.abs(this.w-t.w)<=e*Math.max(1,Math.abs(this.w),Math.abs(t.w))},a.equals4f=function(t,e,i,n,r){return void 0===r&&(r=s.EPSILON),Math.abs(this.x-t)<=r*Math.max(1,Math.abs(this.x),Math.abs(t))&&Math.abs(this.y-e)<=r*Math.max(1,Math.abs(this.y),Math.abs(e))&&Math.abs(this.z-i)<=r*Math.max(1,Math.abs(this.z),Math.abs(i))&&Math.abs(this.w-n)<=r*Math.max(1,Math.abs(this.w),Math.abs(n))},a.strictEquals=function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},a.strictEquals4f=function(t,e,i,n){return this.x===t&&this.y===e&&this.z===i&&this.w===n},a.lerp=function(t,e){return l=this.x,c=this.y,h=this.z,u=this.w,this.x=l+e*(t.x-l),this.y=c+e*(t.y-c),this.z=h+e*(t.z-h),this.w=u+e*(t.w-u),this},a.toString=function(){return"("+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.z.toFixed(2)+", "+this.w.toFixed(2)+")"},a.clampf=function(t,e){return this.x=(0,s.clamp)(this.x,t.x,e.x),this.y=(0,s.clamp)(this.y,t.y,e.y),this.z=(0,s.clamp)(this.z,t.z,e.z),this.w=(0,s.clamp)(this.w,t.w,e.w),this},a.addSelf=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},a.add=function(t,e){return(e=e||new _).x=this.x+t.x,e.y=this.y+t.y,e.z=this.z+t.z,e.w=this.w+t.w,e},a.subtract=function(t,e){return(e=e||new _).x=this.x-t.x,e.y=this.y-t.y,e.z=this.z-t.z,e.w=this.w-t.w,e},a.multiplyScalar=function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},a.multiply=function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this},a.divide=function(t){return this.x/=t,this.y/=t,this.z/=t,this.w/=t,this},a.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},a.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},a.cross=function(t,e){e=e||new _;var i=this.x,n=this.y,r=this.z,s=t.x,a=t.y,o=t.z;return e.x=n*o-r*a,e.y=r*s-i*o,e.z=i*a-n*s,e},a.len=function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},a.lengthSqr=function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},a.normalizeSelf=function(){return this.normalize(this),this},a.normalize=function(t){t=t||new _,l=this.x,c=this.y,h=this.z,u=this.w;var e=l*l+c*c+h*h+u*u;return e>0&&(e=1/Math.sqrt(e),t.x=l*e,t.y=c*e,t.z=h*e,t.w=u*e),t},a.transformMat4=function(t,e){e=e||new _,l=this.x,c=this.y,h=this.z,u=this.w;var i=t.m;return e.x=i[0]*l+i[4]*c+i[8]*h+i[12]*u,e.y=i[1]*l+i[5]*c+i[9]*h+i[13]*u,e.z=i[2]*l+i[6]*c+i[10]*h+i[14]*u,e.w=i[3]*l+i[7]*c+i[11]*h+i[15]*u,e},a.maxAxis=function(){return Math.max(this.x,this.y,this.z,this.w)},_})(r.default);function f(t,e,i,n){return new _(t,e,i,n)}i.default=_,_.sub=_.subtract,_.mul=_.multiply,_.div=_.divide,_.scale=_.multiplyScalar,_.mag=_.len,_.squaredMagnitude=_.lengthSqr,_.ZERO_R=_.ZERO,_.ONE_R=_.ONE,_.NEG_ONE_R=_.NEG_ONE,n.default.fastDefine("cc.Vec4",_,{x:0,y:0,z:0,w:0}),cc.v4=f,cc.Vec4=_}),{"../platform/CCClass":238,"./utils":345,"./value-type":346}],350:[(function(){"use strict";cc.js}),{}],351:[(function(t){"use strict";t("./core/CCGame"),t("./actions")}),{"./actions":7,"./core/CCGame":71}],352:[(function(t,e){"use strict";var i=t("../compression/zlib.min"),n=t("../core/CCDebug"),r=function(t){var e,i,r,s,a,o,l,c,h,u,_,f,d;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},a=null;;){switch(e=this.readUInt32(),c=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":a&&this.animation.frames.push(a),this.pos+=4,a={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},s=this.readUInt16(),r=this.readUInt16()||100,a.delay=1e3*s/r,a.disposeOp=this.data[this.pos++],a.blendOp=this.data[this.pos++],a.data=[];break;case"IDAT":case"fdAT":for("fdAT"===c&&(this.pos+=4,e-=4),t=(null!=a?a.data:void 0)||this.imgData,_=0;0<=e?_e;0<=e?++_:--_)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(h=255-this.transparency.indexed.length)>0)for(f=0;0<=h?fh;0<=h?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":o=(u=this.read(e)).indexOf(0),l=String.fromCharCode.apply(String,u.slice(0,o)),this.text[l]=String.fromCharCode.apply(String,u.slice(o+1));break;case"IEND":return a&&this.animation.frames.push(a),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,i=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*i,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(Uint8Array!=Array&&(this.imgData=new Uint8Array(this.imgData)));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error(n.getError(6017))}};r.prototype={constructor:r,read:function(t){var e,i;for(i=[],e=0;0<=t?et;0<=t?++e:--e)i.push(this.data[this.pos++]);return i},readUInt32:function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},readUInt16:function(){return this.data[this.pos++]<<8|this.data[this.pos++]},decodePixels:function(t){var e,r,s,a,o,l,c,h,u,_,f,d,p,m,y,v,g,b,A,x,C,T,S;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=new i.Inflate(t,{index:0,verify:!1}).decompress(),v=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(v*this.height),l=t.length,y=0,m=0,r=0;m=this.totalParticles},setTextureWithRect:function(t,e){t instanceof cc.Texture2D&&(this.spriteFrame=new cc.SpriteFrame(t,e))},_applyFile:function(){var t=this._file;if(t){var e=this;cc.assetManager.postLoadNative(t,(function(i){!i&&t._nativeAsset?e.isValid&&(e._plistFile=t.nativeUrl,e._custom||(e._spriteFrame!==t.spriteFrame&&(e.spriteFrame=t.spriteFrame),e._initWithDictionary(t._nativeAsset)),e._spriteFrame?!e._renderSpriteFrame&&e._spriteFrame&&e._applySpriteFrame(e.spriteFrame):t.spriteFrame?e.spriteFrame=t.spriteFrame:e._custom&&e._initTextureWithDictionary(t._nativeAsset)):cc.errorID(6029)}))}},_initTextureWithDictionary:function(t){var e,n=cc.path.changeBasename(this._plistFile,t.textureFileName||"");if(t.textureFileName)l.loadImage(n,(function(e,i){e?(t.textureFileName=void 0,this._initTextureWithDictionary(t)):(cc.assetManager.assets.add(n,i),this.spriteFrame=new cc.SpriteFrame(i))}),this);else if(t.textureImageData){var r=t.textureImageData;if(!(r&&r.length>0))return!1;var c=cc.assetManager.assets.get(n);if(!c){var h=s.unzipBase64AsArray(r,1);if(!h)return cc.warnID(6030,this._file.name),!1;var u=(e=h).length>8&&137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]&&13===e[4]&&10===e[5]&&26===e[6]&&10===e[7]?i.ImageFormat.PNG:e.length>2&&(73===e[0]&&73===e[1]||77===e[0]&&77===e[1]||255===e[0]&&216===e[1])?i.ImageFormat.TIFF:i.ImageFormat.UNKNOWN;if(u!==i.ImageFormat.TIFF&&u!==i.ImageFormat.PNG)return cc.warnID(6031,this._file.name),!1;var _=document.createElement("canvas");u===i.ImageFormat.PNG?new a(h).render(_):o.parseTIFF(h,_),c=l.cacheImage(n,_)}c||cc.warnID(6032,this._file.name),this.spriteFrame=new cc.SpriteFrame(c)}return!0},_initWithDictionary:function(t){this.totalParticles=parseInt(t.maxParticles||0),this.life=parseFloat(t.particleLifespan||0),this.lifeVar=parseFloat(t.particleLifespanVariance||0);var e=t.emissionRate;this.emissionRate=e||Math.min(this.totalParticles/this.life,Number.MAX_VALUE),this.duration=parseFloat(t.duration||0),this.srcBlendFactor=parseInt(t.blendFuncSource||i.SRC_ALPHA),this.dstBlendFactor=parseInt(t.blendFuncDestination||i.ONE_MINUS_SRC_ALPHA);var n=this._startColor;n.r=255*parseFloat(t.startColorRed||0),n.g=255*parseFloat(t.startColorGreen||0),n.b=255*parseFloat(t.startColorBlue||0),n.a=255*parseFloat(t.startColorAlpha||0);var r=this._startColorVar;r.r=255*parseFloat(t.startColorVarianceRed||0),r.g=255*parseFloat(t.startColorVarianceGreen||0),r.b=255*parseFloat(t.startColorVarianceBlue||0),r.a=255*parseFloat(t.startColorVarianceAlpha||0);var s=this._endColor;s.r=255*parseFloat(t.finishColorRed||0),s.g=255*parseFloat(t.finishColorGreen||0),s.b=255*parseFloat(t.finishColorBlue||0),s.a=255*parseFloat(t.finishColorAlpha||0);var a=this._endColorVar;if(a.r=255*parseFloat(t.finishColorVarianceRed||0),a.g=255*parseFloat(t.finishColorVarianceGreen||0),a.b=255*parseFloat(t.finishColorVarianceBlue||0),a.a=255*parseFloat(t.finishColorVarianceAlpha||0),this.startSize=parseFloat(t.startParticleSize||0),this.startSizeVar=parseFloat(t.startParticleSizeVariance||0),this.endSize=parseFloat(t.finishParticleSize||0),this.endSizeVar=parseFloat(t.finishParticleSizeVariance||0),this.positionType=parseFloat(void 0!==t.positionType?t.positionType:_.RELATIVE),this.sourcePos.x=0,this.sourcePos.y=0,this.posVar.x=parseFloat(t.sourcePositionVariancex||0),this.posVar.y=parseFloat(t.sourcePositionVariancey||0),this.angle=parseFloat(t.angle||0),this.angleVar=parseFloat(t.angleVariance||0),this.startSpin=parseFloat(t.rotationStart||0),this.startSpinVar=parseFloat(t.rotationStartVariance||0),this.endSpin=parseFloat(t.rotationEnd||0),this.endSpinVar=parseFloat(t.rotationEndVariance||0),this.emitterMode=parseInt(t.emitterType||u.GRAVITY),this.emitterMode===u.GRAVITY){this.gravity.x=parseFloat(t.gravityx||0),this.gravity.y=parseFloat(t.gravityy||0),this.speed=parseFloat(t.speed||0),this.speedVar=parseFloat(t.speedVariance||0),this.radialAccel=parseFloat(t.radialAcceleration||0),this.radialAccelVar=parseFloat(t.radialAccelVariance||0),this.tangentialAccel=parseFloat(t.tangentialAcceleration||0),this.tangentialAccelVar=parseFloat(t.tangentialAccelVariance||0);var o=t.rotationIsDir||"";null!==o?(o=o.toString().toLowerCase(),this.rotationIsDir="true"===o||"1"===o):this.rotationIsDir=!1}else{if(this.emitterMode!==u.RADIUS)return cc.warnID(6009),!1;this.startRadius=parseFloat(t.maxRadius||0),this.startRadiusVar=parseFloat(t.maxRadiusVariance||0),this.endRadius=parseFloat(t.minRadius||0),this.endRadiusVar=parseFloat(t.minRadiusVariance||0),this.rotatePerS=parseFloat(t.rotatePerSecond||0),this.rotatePerSVar=parseFloat(t.rotatePerSecondVariance||0)}return this._initTextureWithDictionary(t),!0},_validateRender:function(){var t=this._getTexture();t&&t.loaded?this._super():this.disableRender()},_onTextureLoaded:function(){this._simulator.updateUVs(!0),this._syncAspect(),this._updateMaterial(),this.markForRender(!0)},_syncAspect:function(){var t=this._renderSpriteFrame._rect;this._aspectRatio=t.width/t.height},_applySpriteFrame:function(){this._renderSpriteFrame=this._renderSpriteFrame||this._spriteFrame,this._renderSpriteFrame&&(this._renderSpriteFrame.textureLoaded()?this._onTextureLoaded():this._renderSpriteFrame.onTextureLoaded(this._onTextureLoaded,this))},_getTexture:function(){return this._renderSpriteFrame&&this._renderSpriteFrame.getTexture()||this._texture},_updateMaterial:function(){var t=this.getMaterial(0);t&&(t.define("CC_USE_MODEL",this._positionType!==_.FREE),t.setProperty("texture",this._getTexture()),h.prototype._updateMaterial.call(this))},_finishedSimulation:function(){this.resetSystem(),this.stopSystem(),this.disableRender(),this.autoRemoveOnFinish&&this._stopped&&this.node.destroy()}});cc.ParticleSystem=e.exports=d}),{"../compression/ZipUtils":22,"../core/assets/material/CCMaterial":123,"../core/components/CCRenderComponent":159,"../core/platform/CCMacro":243,"../core/renderer/render-flow":271,"../core/utils/blend-func":317,"../core/utils/texture-util":331,"./CCPNGReader":352,"./CCParticleAsset":353,"./CCTIFFReader":355,"./particle-simulator":357,"fire-url":void 0}],355:[(function(t,e){"use strict";var i=t("../core/CCDebug"),n={_littleEndian:!1,_tiffData:null,_fileDirectories:[],getUint8:function(t){return this._tiffData[t]},getUint16:function(t){return this._littleEndian?this._tiffData[t+1]<<8|this._tiffData[t]:this._tiffData[t]<<8|this._tiffData[t+1]},getUint32:function(t){var e=this._tiffData;return this._littleEndian?e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]:e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},checkLittleEndian:function(){var t=this.getUint16(0);if(18761===t)this.littleEndian=!0;else{if(19789!==t)throw console.log(t),TypeError(i.getError(6019));this.littleEndian=!1}return this.littleEndian},hasTowel:function(){if(42!==this.getUint16(2))throw RangeError(i.getError(6020));return!0},getFieldTypeName:function(t){var e=this.fieldTypeNames;return t in e?e[t]:null},getFieldTagName:function(t){var e=this.fieldTagNames;return t in e?e[t]:(cc.logID(6021,t),"Tag"+t)},getFieldTypeLength:function(t){return-1!==["BYTE","ASCII","SBYTE","UNDEFINED"].indexOf(t)?1:-1!==["SHORT","SSHORT"].indexOf(t)?2:-1!==["LONG","SLONG","FLOAT"].indexOf(t)?4:-1!==["RATIONAL","SRATIONAL","DOUBLE"].indexOf(t)?8:null},getFieldValues:function(t,e,i,n){var r=[],s=this.getFieldTypeLength(e);if(s*i<=4)!1===this.littleEndian?r.push(n>>>8*(4-s)):r.push(n);else for(var a=0;a=8?-1!==["RATIONAL","SRATIONAL"].indexOf(e)?(r.push(this.getUint32(n+o)),r.push(this.getUint32(n+o+4))):cc.logID(8e3):r.push(this.getBytes(s,n+o))}return"ASCII"===e&&r.forEach((function(t,e,i){i[e]=String.fromCharCode(t)})),r},getBytes:function(t,e){if(t<=0)cc.logID(8001);else{if(t<=1)return this.getUint8(e);if(t<=2)return this.getUint16(e);if(t<=3)return this.getUint32(e)>>>8;if(t<=4)return this.getUint32(e);cc.logID(8002)}},getBits:function(t,e,i){i=i||0;var n,r,s=e+Math.floor(i/8),a=i+t,o=32-t;return a<=0?cc.logID(6023):a<=8?(n=24+i,r=this.getUint8(s)):a<=16?(n=16+i,r=this.getUint16(s)):a<=32?(n=i,r=this.getUint32(s)):cc.logID(6022),{bits:r<>>o,byteOffset:s+Math.floor(a/8),bitOffset:a%8}},parseFileDirectory:function(t){for(var e=this.getUint16(t),i=[],n=t+2,r=0;r=0&&R<=127?I=R+1:R>=-127&&R<=-1?P=1-R:C=!0}else{var O=this.getUint8(v+b);for(M=0;M0)for(var nt=0;nt1?h=c/u:c=h*u;var _=c/2,f=h/2;if(t.rotation){var d=-_,p=-f,m=_,y=f,v=-n.degreesToRadians(t.rotation),g=Math.cos(v),b=Math.sin(v);s[r]=d*g-p*b+o,s[r+1]=d*b+p*g+l,s[r+5]=m*g-p*b+o,s[r+6]=m*b+p*g+l,s[r+10]=d*g-y*b+o,s[r+11]=d*b+y*g+l,s[r+15]=m*g-y*b+o,s[r+16]=m*b+y*g+l}else s[r]=o-_,s[r+1]=l-f,s[r+5]=o+_,s[r+6]=l-f,s[r+10]=o-_,s[r+11]=l+f,s[r+15]=o+_,s[r+16]=l+f;a[r+4]=t.color._val,a[r+9]=t.color._val,a[r+14]=t.color._val,a[r+19]=t.color._val},u.prototype.step=function(t){t=t>cc.director._maxParticleDeltaTime?cc.director._maxParticleDeltaTime:t;var e=this.sys,i=e.node,n=this.particles,r=4*this.sys._assembler._vfmt._bytes/4,c=cc.ParticleSystem.PositionType;if(i._updateWorldMatrix(),e.positionType===c.FREE){this._worldRotation=_(i);var u=i._worldMatrix.m;s.x=u[12],s.y=u[13]}else e.positionType===c.RELATIVE?(this._worldRotation=i.angle,s.x=i.x,s.y=i.y):this._worldRotation=0;if(this.active&&e.emissionRate){var f=1/e.emissionRate;for(n.lengthf;)this.emitParticle(s),this.emitCounter-=f;this.elapsed+=t,-1!==e.duration&&e.durationthis._uvFilled&&this.updateUVs();for(var m=0;m0){if(e.emitterMode===cc.ParticleSystem.EmitterMode.GRAVITY){var v=l,g=a,b=o;(y.pos.x||y.pos.y)&&(g.set(y.pos),g.normalizeSelf()),b.set(g),g.mulSelf(y.radialAccel);var A=b.x;b.x=-b.y,b.y=A,b.mulSelf(y.tangentialAccel),v.set(g),v.addSelf(b),v.addSelf(e.gravity),v.mulSelf(t),y.dir.addSelf(v),v.set(y.dir),v.mulSelf(t),y.pos.addSelf(v)}else y.angle+=y.degreesPerSecond*t,y.radius+=y.deltaRadius*t,y.pos.x=-Math.cos(y.angle)*y.radius,y.pos.y=-Math.sin(y.angle)*y.radius;var x=y.preciseColor,C=y.deltaColor;x.r+=C.r*t,x.g+=C.g*t,x.b+=C.b*t,x.a+=C.a*t;var T=y.color;T.r=x.r,T.g=x.g,T.b=x.b,T.a=x.a,y.size+=y.deltaSize*t,y.size<0&&(y.size=0),y.rotation+=y.deltaRotation*t;var S=a;S.set(y.pos),e.positionType!==c.GROUPED&&S.addSelf(y.startPos);var w=r*m;this.updateParticleBuffer(y,S,d,w),++m}else{var E=n[m];m!==n.length-1&&(n[m]=n[n.length-1]),h.put(E),n.length--}}e._assembler._ia._count=6*n.length,n.length>0?d.uploadData():this.active||this.readyToPlay||(this.finished=!0,e._finishedSimulation())},e.exports=u}),{"../core/platform/js":259,"../core/utils/misc":323}],358:[(function(t,e){"use strict";var i=r(t("../core/renderer/assembler")),n=r(t("../renderer/core/input-assembler"));function r(t){return t&&t.__esModule?t:{default:t}}var s=t("./CCParticleSystem"),a=t("../core/renderer/"),o=t("../core/renderer/webgl/quad-buffer"),l=t("../core/renderer/webgl/vertex-format").vfmtPosUvColor,c=(function(t){var e,i;function r(e){var i;return(i=t.call(this,e)||this)._buffer=null,i._ia=null,i._vfmt=l,i}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=r.prototype;return s.getBuffer=function(){return this._buffer||(this._buffer=new o(a._handle,l),this._ia=new n.default,this._ia._vertexBuffer=this._buffer._vb,this._ia._indexBuffer=this._buffer._ib,this._ia._start=0,this._ia._count=0),this._buffer},s.fillBuffers=function(t,e){if(this._ia){var i=cc.ParticleSystem.PositionType;t.positionType===i.RELATIVE?e.node=t.node.parent:e.node=t.node,e.material=t._materials[0],e._flushIA(this._ia)}},r})(i.default);i.default.register(s,c),e.exports=c}),{"../core/renderer/":270,"../core/renderer/assembler":267,"../core/renderer/webgl/quad-buffer":309,"../core/renderer/webgl/vertex-format":312,"../renderer/core/input-assembler":361,"./CCParticleSystem":354}],359:[(function(t,e){"use strict";var i,n,r,s,a,o,l,c,h,u,_,f,d,p,m,y,v,g,b,A,x,C,T,S,w,E,M,D,B,I,P,R,O,L,F,V,N,k,z,G,U,j;(function(t){t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL"})(i||(i={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.BUFFER=1]="BUFFER",t[t.TEXTURE=2]="TEXTURE",t[t.TEXTURE_VIEW=3]="TEXTURE_VIEW",t[t.RENDER_PASS=4]="RENDER_PASS",t[t.FRAMEBUFFER=5]="FRAMEBUFFER",t[t.SAMPLER=6]="SAMPLER",t[t.SHADER=7]="SHADER",t[t.PIPELINE_LAYOUT=8]="PIPELINE_LAYOUT",t[t.PIPELINE_STATE=9]="PIPELINE_STATE",t[t.BINDING_LAYOUT=10]="BINDING_LAYOUT",t[t.INPUT_ASSEMBLER=11]="INPUT_ASSEMBLER",t[t.COMMAND_ALLOCATOR=12]="COMMAND_ALLOCATOR",t[t.COMMAND_BUFFER=13]="COMMAND_BUFFER",t[t.QUEUE=14]="QUEUE",t[t.WINDOW=15]="WINDOW"})(n||(n={})),(function(t){t[t.UNREADY=0]="UNREADY",t[t.FAILED=1]="FAILED",t[t.SUCCESS=2]="SUCCESS"})(r||(r={})),(function(){function t(t){this._gfxType=n.UNKNOWN,this._status=r.UNREADY,this._gfxType=t}Object.defineProperty(t.prototype,"gfxType",{get:function(){return this._gfxType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0})})(),(function(t){t.ATTR_POSITION="a_position",t.ATTR_NORMAL="a_normal",t.ATTR_TANGENT="a_tangent",t.ATTR_BITANGENT="a_bitangent",t.ATTR_WEIGHTS="a_weights",t.ATTR_JOINTS="a_joints",t.ATTR_COLOR="a_color",t.ATTR_COLOR1="a_color1",t.ATTR_COLOR2="a_color2",t.ATTR_TEX_COORD="a_texCoord",t.ATTR_TEX_COORD1="a_texCoord1",t.ATTR_TEX_COORD2="a_texCoord2",t.ATTR_TEX_COORD3="a_texCoord3",t.ATTR_TEX_COORD4="a_texCoord4",t.ATTR_TEX_COORD5="a_texCoord5",t.ATTR_TEX_COORD6="a_texCoord6",t.ATTR_TEX_COORD7="a_texCoord7",t.ATTR_TEX_COORD8="a_texCoord8"})(s||(s={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.BOOL=1]="BOOL",t[t.BOOL2=2]="BOOL2",t[t.BOOL3=3]="BOOL3",t[t.BOOL4=4]="BOOL4",t[t.INT=5]="INT",t[t.INT2=6]="INT2",t[t.INT3=7]="INT3",t[t.INT4=8]="INT4",t[t.UINT=9]="UINT",t[t.UINT2=10]="UINT2",t[t.UINT3=11]="UINT3",t[t.UINT4=12]="UINT4",t[t.FLOAT=13]="FLOAT",t[t.FLOAT2=14]="FLOAT2",t[t.FLOAT3=15]="FLOAT3",t[t.FLOAT4=16]="FLOAT4",t[t.COLOR4=17]="COLOR4",t[t.MAT2=18]="MAT2",t[t.MAT2X3=19]="MAT2X3",t[t.MAT2X4=20]="MAT2X4",t[t.MAT3X2=21]="MAT3X2",t[t.MAT3=22]="MAT3",t[t.MAT3X4=23]="MAT3X4",t[t.MAT4X2=24]="MAT4X2",t[t.MAT4X3=25]="MAT4X3",t[t.MAT4=26]="MAT4",t[t.SAMPLER1D=27]="SAMPLER1D",t[t.SAMPLER1D_ARRAY=28]="SAMPLER1D_ARRAY",t[t.SAMPLER2D=29]="SAMPLER2D",t[t.SAMPLER2D_ARRAY=30]="SAMPLER2D_ARRAY",t[t.SAMPLER3D=31]="SAMPLER3D",t[t.SAMPLER_CUBE=32]="SAMPLER_CUBE",t[t.COUNT=33]="COUNT"})(a||(a={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A8=1]="A8",t[t.L8=2]="L8",t[t.LA8=3]="LA8",t[t.R8=4]="R8",t[t.R8SN=5]="R8SN",t[t.R8UI=6]="R8UI",t[t.R8I=7]="R8I",t[t.R16F=8]="R16F",t[t.R16UI=9]="R16UI",t[t.R16I=10]="R16I",t[t.R32F=11]="R32F",t[t.R32UI=12]="R32UI",t[t.R32I=13]="R32I",t[t.RG8=14]="RG8",t[t.RG8SN=15]="RG8SN",t[t.RG8UI=16]="RG8UI",t[t.RG8I=17]="RG8I",t[t.RG16F=18]="RG16F",t[t.RG16UI=19]="RG16UI",t[t.RG16I=20]="RG16I",t[t.RG32F=21]="RG32F",t[t.RG32UI=22]="RG32UI",t[t.RG32I=23]="RG32I",t[t.RGB8=24]="RGB8",t[t.SRGB8=25]="SRGB8",t[t.RGB8SN=26]="RGB8SN",t[t.RGB8UI=27]="RGB8UI",t[t.RGB8I=28]="RGB8I",t[t.RGB16F=29]="RGB16F",t[t.RGB16UI=30]="RGB16UI",t[t.RGB16I=31]="RGB16I",t[t.RGB32F=32]="RGB32F",t[t.RGB32UI=33]="RGB32UI",t[t.RGB32I=34]="RGB32I",t[t.RGBA8=35]="RGBA8",t[t.SRGB8_A8=36]="SRGB8_A8",t[t.RGBA8SN=37]="RGBA8SN",t[t.RGBA8UI=38]="RGBA8UI",t[t.RGBA8I=39]="RGBA8I",t[t.RGBA16F=40]="RGBA16F",t[t.RGBA16UI=41]="RGBA16UI",t[t.RGBA16I=42]="RGBA16I",t[t.RGBA32F=43]="RGBA32F",t[t.RGBA32UI=44]="RGBA32UI",t[t.RGBA32I=45]="RGBA32I",t[t.R5G6B5=46]="R5G6B5",t[t.R11G11B10F=47]="R11G11B10F",t[t.RGB5A1=48]="RGB5A1",t[t.RGBA4=49]="RGBA4",t[t.RGB10A2=50]="RGB10A2",t[t.RGB10A2UI=51]="RGB10A2UI",t[t.RGB9E5=52]="RGB9E5",t[t.D16=53]="D16",t[t.D16S8=54]="D16S8",t[t.D24=55]="D24",t[t.D24S8=56]="D24S8",t[t.D32F=57]="D32F",t[t.D32F_S8=58]="D32F_S8",t[t.BC1=59]="BC1",t[t.BC1_ALPHA=60]="BC1_ALPHA",t[t.BC1_SRGB=61]="BC1_SRGB",t[t.BC1_SRGB_ALPHA=62]="BC1_SRGB_ALPHA",t[t.BC2=63]="BC2",t[t.BC2_SRGB=64]="BC2_SRGB",t[t.BC3=65]="BC3",t[t.BC3_SRGB=66]="BC3_SRGB",t[t.BC4=67]="BC4",t[t.BC4_SNORM=68]="BC4_SNORM",t[t.BC5=69]="BC5",t[t.BC5_SNORM=70]="BC5_SNORM",t[t.BC6H_UF16=71]="BC6H_UF16",t[t.BC6H_SF16=72]="BC6H_SF16",t[t.BC7=73]="BC7",t[t.BC7_SRGB=74]="BC7_SRGB",t[t.ETC_RGB8=75]="ETC_RGB8",t[t.ETC2_RGB8=76]="ETC2_RGB8",t[t.ETC2_SRGB8=77]="ETC2_SRGB8",t[t.ETC2_RGB8_A1=78]="ETC2_RGB8_A1",t[t.ETC2_SRGB8_A1=79]="ETC2_SRGB8_A1",t[t.ETC2_RGBA8=80]="ETC2_RGBA8",t[t.ETC2_SRGB8_A8=81]="ETC2_SRGB8_A8",t[t.EAC_R11=82]="EAC_R11",t[t.EAC_R11SN=83]="EAC_R11SN",t[t.EAC_RG11=84]="EAC_RG11",t[t.EAC_RG11SN=85]="EAC_RG11SN",t[t.PVRTC_RGB2=86]="PVRTC_RGB2",t[t.PVRTC_RGBA2=87]="PVRTC_RGBA2",t[t.PVRTC_RGB4=88]="PVRTC_RGB4",t[t.PVRTC_RGBA4=89]="PVRTC_RGBA4",t[t.PVRTC2_2BPP=90]="PVRTC2_2BPP",t[t.PVRTC2_4BPP=91]="PVRTC2_4BPP"})(o||(o={})),(function(t){t[t.NONE=0]="NONE",t[t.TRANSFER_SRC=1]="TRANSFER_SRC",t[t.TRANSFER_DST=2]="TRANSFER_DST",t[t.INDEX=4]="INDEX",t[t.VERTEX=8]="VERTEX",t[t.UNIFORM=16]="UNIFORM",t[t.STORAGE=32]="STORAGE",t[t.INDIRECT=64]="INDIRECT"})(l||(l={})),(function(t){t[t.NONE=0]="NONE",t[t.DEVICE=1]="DEVICE",t[t.HOST=2]="HOST"})(c||(c={})),(function(t){t[t.NONE=0]="NONE",t[t.READ=1]="READ",t[t.WRITE=2]="WRITE"})(h||(h={})),(function(t){t[t.POINT_LIST=0]="POINT_LIST",t[t.LINE_LIST=1]="LINE_LIST",t[t.LINE_STRIP=2]="LINE_STRIP",t[t.LINE_LOOP=3]="LINE_LOOP",t[t.LINE_LIST_ADJACENCY=4]="LINE_LIST_ADJACENCY",t[t.LINE_STRIP_ADJACENCY=5]="LINE_STRIP_ADJACENCY",t[t.ISO_LINE_LIST=6]="ISO_LINE_LIST",t[t.TRIANGLE_LIST=7]="TRIANGLE_LIST",t[t.TRIANGLE_STRIP=8]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=9]="TRIANGLE_FAN",t[t.TRIANGLE_LIST_ADJACENCY=10]="TRIANGLE_LIST_ADJACENCY",t[t.TRIANGLE_STRIP_ADJACENCY=11]="TRIANGLE_STRIP_ADJACENCY",t[t.TRIANGLE_PATCH_ADJACENCY=12]="TRIANGLE_PATCH_ADJACENCY",t[t.QUAD_PATCH_LIST=13]="QUAD_PATCH_LIST"})(u||(u={})),(function(t){t[t.FILL=0]="FILL",t[t.POINT=1]="POINT",t[t.LINE=2]="LINE"})(_||(_={})),(function(t){t[t.GOURAND=0]="GOURAND",t[t.FLAT=1]="FLAT"})(f||(f={})),(function(t){t[t.NONE=0]="NONE",t[t.FRONT=1]="FRONT",t[t.BACK=2]="BACK"})(d||(d={})),(function(t){t[t.NEVER=0]="NEVER",t[t.LESS=1]="LESS",t[t.EQUAL=2]="EQUAL",t[t.LESS_EQUAL=3]="LESS_EQUAL",t[t.GREATER=4]="GREATER",t[t.NOT_EQUAL=5]="NOT_EQUAL",t[t.GREATER_EQUAL=6]="GREATER_EQUAL",t[t.ALWAYS=7]="ALWAYS"})(p||(p={})),(function(t){t[t.ZERO=0]="ZERO",t[t.KEEP=1]="KEEP",t[t.REPLACE=2]="REPLACE",t[t.INCR=3]="INCR",t[t.DECR=4]="DECR",t[t.INVERT=5]="INVERT",t[t.INCR_WRAP=6]="INCR_WRAP",t[t.DECR_WRAP=7]="DECR_WRAP"})(m||(m={})),(function(t){t[t.ADD=0]="ADD",t[t.SUB=1]="SUB",t[t.REV_SUB=2]="REV_SUB",t[t.MIN=3]="MIN",t[t.MAX=4]="MAX"})(y||(y={})),(function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SRC_ALPHA=2]="SRC_ALPHA",t[t.DST_ALPHA=3]="DST_ALPHA",t[t.ONE_MINUS_SRC_ALPHA=4]="ONE_MINUS_SRC_ALPHA",t[t.ONE_MINUS_DST_ALPHA=5]="ONE_MINUS_DST_ALPHA",t[t.SRC_COLOR=6]="SRC_COLOR",t[t.DST_COLOR=7]="DST_COLOR",t[t.ONE_MINUS_SRC_COLOR=8]="ONE_MINUS_SRC_COLOR",t[t.ONE_MINUS_DST_COLOR=9]="ONE_MINUS_DST_COLOR",t[t.SRC_ALPHA_SATURATE=10]="SRC_ALPHA_SATURATE",t[t.CONSTANT_COLOR=11]="CONSTANT_COLOR",t[t.ONE_MINUS_CONSTANT_COLOR=12]="ONE_MINUS_CONSTANT_COLOR",t[t.CONSTANT_ALPHA=13]="CONSTANT_ALPHA",t[t.ONE_MINUS_CONSTANT_ALPHA=14]="ONE_MINUS_CONSTANT_ALPHA"})(v||(v={})),(function(t){t[t.NONE=0]="NONE",t[t.R=1]="R",t[t.G=2]="G",t[t.B=4]="B",t[t.A=8]="A",t[t.ALL=15]="ALL"})(g||(g={})),(function(t){t[t.NONE=0]="NONE",t[t.POINT=1]="POINT",t[t.LINEAR=2]="LINEAR",t[t.ANISOTROPIC=3]="ANISOTROPIC"})(b||(b={})),(function(t){t[t.WRAP=0]="WRAP",t[t.MIRROR=1]="MIRROR",t[t.CLAMP=2]="CLAMP",t[t.BORDER=3]="BORDER"})(A||(A={})),(function(t){t[t.TEX1D=0]="TEX1D",t[t.TEX2D=1]="TEX2D",t[t.TEX3D=2]="TEX3D"})(x||(x={})),(function(t){t[t.NONE=0]="NONE",t[t.TRANSFER_SRC=1]="TRANSFER_SRC",t[t.TRANSFER_DST=2]="TRANSFER_DST",t[t.SAMPLED=4]="SAMPLED",t[t.STORAGE=8]="STORAGE",t[t.COLOR_ATTACHMENT=16]="COLOR_ATTACHMENT",t[t.DEPTH_STENCIL_ATTACHMENT=32]="DEPTH_STENCIL_ATTACHMENT",t[t.TRANSIENT_ATTACHMENT=64]="TRANSIENT_ATTACHMENT",t[t.INPUT_ATTACHMENT=128]="INPUT_ATTACHMENT"})(C||(C={})),(function(t){t[t.X1=0]="X1",t[t.X2=1]="X2",t[t.X4=2]="X4",t[t.X8=3]="X8",t[t.X16=4]="X16",t[t.X32=5]="X32",t[t.X64=6]="X64"})(T||(T={})),(function(t){t[t.NONE=0]="NONE",t[t.GEN_MIPMAP=1]="GEN_MIPMAP",t[t.CUBEMAP=2]="CUBEMAP",t[t.BAKUP_BUFFER=4]="BAKUP_BUFFER"})(S||(S={})),(function(t){t[t.TV1D=0]="TV1D",t[t.TV2D=1]="TV2D",t[t.TV3D=2]="TV3D",t[t.CUBE=3]="CUBE",t[t.TV1D_ARRAY=4]="TV1D_ARRAY",t[t.TV2D_ARRAY=5]="TV2D_ARRAY"})(w||(w={})),(function(t){t[t.VERTEX=0]="VERTEX",t[t.HULL=1]="HULL",t[t.DOMAIN=2]="DOMAIN",t[t.GEOMETRY=3]="GEOMETRY",t[t.FRAGMENT=4]="FRAGMENT",t[t.COMPUTE=5]="COMPUTE",t[t.COUNT=6]="COUNT"})(E||(E={})),(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.UNIFORM_BUFFER=1]="UNIFORM_BUFFER",t[t.SAMPLER=2]="SAMPLER",t[t.STORAGE_BUFFER=3]="STORAGE_BUFFER"})(M||(M={})),(function(t){t[t.PRIMARY=0]="PRIMARY",t[t.SECONDARY=1]="SECONDARY"})(D||(D={})),(function(t){t[t.LOAD=0]="LOAD",t[t.CLEAR=1]="CLEAR",t[t.DISCARD=2]="DISCARD"})(B||(B={})),(function(t){t[t.STORE=0]="STORE",t[t.DISCARD=1]="DISCARD"})(I||(I={})),(function(t){t[t.UNDEFINED=0]="UNDEFINED",t[t.GENERAL=1]="GENERAL",t[t.COLOR_ATTACHMENT_OPTIMAL=2]="COLOR_ATTACHMENT_OPTIMAL",t[t.DEPTH_STENCIL_ATTACHMENT_OPTIMAL=3]="DEPTH_STENCIL_ATTACHMENT_OPTIMAL",t[t.DEPTH_STENCIL_READONLY_OPTIMAL=4]="DEPTH_STENCIL_READONLY_OPTIMAL",t[t.SHADER_READONLY_OPTIMAL=5]="SHADER_READONLY_OPTIMAL",t[t.TRANSFER_SRC_OPTIMAL=6]="TRANSFER_SRC_OPTIMAL",t[t.TRANSFER_DST_OPTIMAL=7]="TRANSFER_DST_OPTIMAL",t[t.PREINITIALIZED=8]="PREINITIALIZED",t[t.PRESENT_SRC=9]="PRESENT_SRC"})(P||(P={})),(function(t){t[t.GRAPHICS=0]="GRAPHICS",t[t.COMPUTE=1]="COMPUTE",t[t.RAY_TRACING=2]="RAY_TRACING"})(R||(R={})),(function(t){t[t.VIEWPORT=0]="VIEWPORT",t[t.SCISSOR=1]="SCISSOR",t[t.LINE_WIDTH=2]="LINE_WIDTH",t[t.DEPTH_BIAS=3]="DEPTH_BIAS",t[t.BLEND_CONSTANTS=4]="BLEND_CONSTANTS",t[t.DEPTH_BOUNDS=5]="DEPTH_BOUNDS",t[t.STENCIL_WRITE_MASK=6]="STENCIL_WRITE_MASK",t[t.STENCIL_COMPARE_MASK=7]="STENCIL_COMPARE_MASK"})(O||(O={})),(function(t){t[t.FRONT=0]="FRONT",t[t.BACK=1]="BACK",t[t.ALL=2]="ALL"})(L||(L={})),(function(t){t[t.GRAPHICS=0]="GRAPHICS",t[t.COMPUTE=1]="COMPUTE",t[t.TRANSFER=2]="TRANSFER"})(F||(F={})),(function(t){t[t.NONE=0]="NONE",t[t.COLOR=1]="COLOR",t[t.DEPTH=2]="DEPTH",t[t.STENCIL=4]="STENCIL",t[t.DEPTH_STENCIL=6]="DEPTH_STENCIL",t[t.ALL=7]="ALL"})(V||(V={})),(function(t){t[t.DEFAULT=100]="DEFAULT"})(N||(N={})),(function(t){t[t.MIN=0]="MIN",t[t.MAX=255]="MAX",t[t.DEFAULT=128]="DEFAULT"})(k||(k={})),(function(t){t[t.UBO_GLOBAL=23]="UBO_GLOBAL",t[t.UBO_SHADOW=22]="UBO_SHADOW",t[t.UBO_LOCAL=21]="UBO_LOCAL",t[t.UBO_FORWARD_LIGHTS=20]="UBO_FORWARD_LIGHTS",t[t.UBO_SKINNING=19]="UBO_SKINNING",t[t.UBO_SKINNING_TEXTURE=18]="UBO_SKINNING_TEXTURE",t[t.UBO_UI=17]="UBO_UI",t[t.SAMPLER_JOINTS=25]="SAMPLER_JOINTS",t[t.SAMPLER_ENVIRONMENT=26]="SAMPLER_ENVIRONMENT",t[t.CUSTUM_UBO_BINDING_END_POINT=17]="CUSTUM_UBO_BINDING_END_POINT",t[t.CUSTOM_SAMPLER_BINDING_START_POINT=30]="CUSTOM_SAMPLER_BINDING_START_POINT"})(z||(z={})),(function(t){t[t.minFilter=0]="minFilter",t[t.magFilter=1]="magFilter",t[t.mipFilter=2]="mipFilter",t[t.addressU=3]="addressU",t[t.addressV=4]="addressV",t[t.addressW=5]="addressW",t[t.maxAnisotropy=6]="maxAnisotropy",t[t.cmpFunc=7]="cmpFunc",t[t.minLOD=8]="minLOD",t[t.maxLOD=9]="maxLOD",t[t.mipLODBias=10]="mipLODBias",t[t.borderColor=11]="borderColor",t[t.total=15]="total"})(j||(j={}));var H={};H[H.bool=a.BOOL]="bool",H[H.int=a.INT]="int",H[H.ivec2=a.INT2]="ivec2invTypeParams",H[H.ivec3=a.INT3]="ivec3",H[H.ivec4=a.INT4]="ivec4",H[H.float=a.FLOAT]="float",H[H.vec2=a.FLOAT2]="vec2",H[H.vec3=a.FLOAT3]="vec3",H[H.vec4=a.FLOAT4]="vec4",H[H.mat2=a.MAT2]="mat2",H[H.mat3=a.MAT3]="mat3",H[H.mat4=a.MAT4]="mat4",H[H.sampler2D=a.SAMPLER2D]="sampler2D",H[H.samplerCube=a.SAMPLER_CUBE]="samplerCube";var W=((G={})[a.BOOL]=4,G[a.INT]=4,G[a.INT2]=8,G[a.INT3]=12,G[a.INT4]=16,G[a.FLOAT]=4,G[a.FLOAT2]=8,G[a.FLOAT3]=12,G[a.FLOAT4]=16,G[a.MAT2]=16,G[a.MAT3]=36,G[a.MAT4]=64,G[a.SAMPLER2D]=4,G[a.SAMPLER_CUBE]=4,G),X=((U={})[a.BOOL]=o.R32I,U[a.INT]=o.R32I,U[a.INT2]=o.RG32I,U[a.INT3]=o.RGB32I,U[a.INT4]=o.RGBA32I,U[a.FLOAT]=o.R32F,U[a.FLOAT2]=o.RG32F,U[a.FLOAT3]=o.RGB32F,U[a.FLOAT4]=o.RGBA32F,U),Y={BACK:1029,FRONT:1028,NONE:0,ADD:32774,SUB:32778,REV_SUB:32779,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,SRC_ALPHA_SATURATE:776,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,INCR_WRAP:34055,DECR:7683,DECR_WRAP:34056,INVERT:5386};Object.assign(Y,N);var q={murmurhash2_32_gc:function(t,e){for(var i,n=t.length,r=e^n,s=0;n>=4;)i=1540483477*(65535&(i=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24))+((1540483477*(i>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),n-=4,++s;switch(n){case 3:r^=(255&t.charCodeAt(s+2))<<16;case 2:r^=(255&t.charCodeAt(s+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(s)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0},SamplerInfoIndex:j,effectStructure:{$techniques:[{$passes:[{depthStencilState:{},rasterizerState:{},blendState:{targets:[{}]},properties:{any:{sampler:{},inspector:{}}}}]}]},typeMap:H,sizeMap:W,formatMap:X,passParams:Y,RenderQueue:{OPAQUE:0,TRANSPARENT:1,OVERLAY:2},RenderPriority:k,GFXGetTypeSize:function(t){switch(t){case a.BOOL:case a.INT:case a.UINT:case a.FLOAT:return 4;case a.BOOL2:case a.INT2:case a.UINT2:case a.FLOAT2:return 8;case a.BOOL3:case a.INT3:case a.UINT3:case a.FLOAT3:return 12;case a.BOOL4:case a.INT4:case a.UINT4:case a.FLOAT4:case a.MAT2:return 16;case a.MAT2X3:return 24;case a.MAT2X4:return 32;case a.MAT3X2:return 24;case a.MAT3:return 36;case a.MAT3X4:return 48;case a.MAT4X2:case a.MAT4X2:return 32;case a.MAT4:return 64;case a.SAMPLER1D:case a.SAMPLER1D_ARRAY:case a.SAMPLER2D:case a.SAMPLER2D_ARRAY:case a.SAMPLER3D:case a.SAMPLER_CUBE:return 4;default:return 0}},UniformBinding:z};e.exports=q}),{}],360:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("../memop"),r=c(t("../enums")),s=t("../../core/value-types"),a=c(t("./program-lib")),o=c(t("./view")),l=c(t("../gfx"));function c(t){return t&&t.__esModule?t:{default:t}}var h=new s.Mat4,u=new n.RecyclePool(function(){return{stage:null,items:null}},8),_=new n.RecyclePool(function(){return new Float32Array(2)},8),f=new n.RecyclePool(function(){return new Float32Array(3)},8),d=new n.RecyclePool(function(){return new Float32Array(4)},8),p=new n.RecyclePool(function(){return new Float32Array(9)},8),m=new n.RecyclePool(function(){return new Float32Array(16)},8),y=new n.RecyclePool(function(){return new Float32Array(64)},8),v=new n.RecyclePool(function(){return new Int32Array(2)},8),g=new n.RecyclePool(function(){return new Int32Array(3)},8),b=new n.RecyclePool(function(){return new Int32Array(4)},8),A=new n.RecyclePool(function(){return new Int32Array(64)},8),x=(function(){function t(t,e){var i;this._device=t,this._programLib=new a.default(t),this._opts=e,this._type2defaultValue=((i={})[r.default.PARAM_INT]=0,i[r.default.PARAM_INT2]=new s.Vec2(0,0),i[r.default.PARAM_INT3]=new s.Vec3(0,0,0),i[r.default.PARAM_INT4]=new s.Vec4(0,0,0,0),i[r.default.PARAM_FLOAT]=0,i[r.default.PARAM_FLOAT2]=new s.Vec2(0,0),i[r.default.PARAM_FLOAT3]=new s.Vec3(0,0,0),i[r.default.PARAM_FLOAT4]=new s.Vec4(0,0,0,0),i[r.default.PARAM_COLOR4]=new s.Color(0,0,0,1),i[r.default.PARAM_MAT3]=new s.Mat3,i[r.default.PARAM_MAT4]=new s.Mat4,i[r.default.PARAM_TEXTURE_2D]=e.defaultTexture,i[r.default.PARAM_TEXTURE_CUBE]=e.defaultTextureCube,i),this._stage2fn={},this._usedTextureUnits=0,this._viewPools=new n.RecyclePool(function(){return new o.default},8),this._drawItemsPools=new n.RecyclePool(function(){return{model:null,node:null,ia:null,effect:null,defines:null,uniforms:null}},100),this._stageItemsPools=new n.RecyclePool(function(){return new n.RecyclePool(function(){return{model:null,node:null,ia:null,effect:null,defines:null,passes:[],sortKey:-1,uniforms:null}},100)},16),this._definesChanged=!1}var e=t.prototype;return e._resetTextuerUnit=function(){this._usedTextureUnits=0},e._allocTextureUnit=function(){var t=this._device,e=this._usedTextureUnits;return e>=t._caps.maxTextureUnits&&console.warn("Trying to use "+e+" texture units while this GPU supports only "+t._caps.maxTextureUnits),this._usedTextureUnits+=1,e},e._registerStage=function(t,e){this._stage2fn[t]=e},e.clear=function(){this._programLib.clear(),this.reset()},e.reset=function(){this._viewPools.reset(),this._stageItemsPools.reset(),this._definesChanged=!1},e._requestView=function(){return this._viewPools.add()},e._render=function(t,e){var i=this._device;i.setFrameBuffer(t._framebuffer),i.setViewport(t._rect.x,t._rect.y,t._rect.w,t._rect.h);var n={};t._clearFlags&r.default.CLEAR_COLOR&&(n.color=s.Vec4.toArray([],t._color)),t._clearFlags&r.default.CLEAR_DEPTH&&(n.depth=t._depth),t._clearFlags&r.default.CLEAR_STENCIL&&(n.stencil=t._stencil),i.clear(n),this._drawItemsPools.reset();for(var a=0;at.count)return void console.error("Failed to set property ["+t.name+"] : The length of texture array ["+i.length+"] is bigger than ["+t.count+"].");for(var n=A.add(),s=0;s0&&n&&n.precision>0}e||cc.warnID(9102),this._highpSupported=e},t})();i.default=h,e.exports=i.default}),{"../gfx":371}],364:[(function(t,e,i){"use strict";function n(t,e){for(var i=0;i>24)/255,(i.blendColor>>16&255)/255,(i.blendColor>>8&255)/255,(255&i.blendColor)/255),void(i.blendSep?(t.blendFuncSeparate(i.blendSrc,i.blendDst,i.blendSrcAlpha,i.blendDstAlpha),t.blendEquationSeparate(i.blendEq,i.blendAlphaEq)):(t.blendFunc(i.blendSrc,i.blendDst),t.blendEquation(i.blendEq)))):void t.disable(t.BLEND);!1!==i.blend&&(e.blendColor!==i.blendColor&&t.blendColor((i.blendColor>>24)/255,(i.blendColor>>16&255)/255,(i.blendColor>>8&255)/255,(255&i.blendColor)/255),e.blendSep===i.blendSep?i.blendSep?(e.blendSrc===i.blendSrc&&e.blendDst===i.blendDst&&e.blendSrcAlpha===i.blendSrcAlpha&&e.blendDstAlpha===i.blendDstAlpha||t.blendFuncSeparate(i.blendSrc,i.blendDst,i.blendSrcAlpha,i.blendDstAlpha),e.blendEq===i.blendEq&&e.blendAlphaEq===i.blendAlphaEq||t.blendEquationSeparate(i.blendEq,i.blendAlphaEq)):(e.blendSrc===i.blendSrc&&e.blendDst===i.blendDst||t.blendFunc(i.blendSrc,i.blendDst),e.blendEq!==i.blendEq&&t.blendEquation(i.blendEq)):i.blendSep?(t.blendFuncSeparate(i.blendSrc,i.blendDst,i.blendSrcAlpha,i.blendDstAlpha),t.blendEquationSeparate(i.blendEq,i.blendAlphaEq)):(t.blendFunc(i.blendSrc,i.blendDst),t.blendEquation(i.blendEq)))}function d(t,e,i){if(e.depthTest!==i.depthTest)return i.depthTest?(t.enable(t.DEPTH_TEST),t.depthFunc(i.depthFunc),void t.depthMask(i.depthWrite)):void t.disable(t.DEPTH_TEST);e.depthWrite!==i.depthWrite&&t.depthMask(i.depthWrite),!1!==i.depthTest?e.depthFunc!==i.depthFunc&&t.depthFunc(i.depthFunc):i.depthWrite&&(i.depthTest=!0,i.depthFunc=a.enums.DS_FUNC_ALWAYS,t.enable(t.DEPTH_TEST),t.depthFunc(i.depthFunc))}function p(t,e,i){if(i.stencilTest!==a.enums.STENCIL_INHERIT)return i.stencilTest!==e.stencilTest?i.stencilTest===a.enums.STENCIL_DISABLE?void t.disable(t.STENCIL_TEST):(t.enable(t.STENCIL_TEST),void(i.stencilSep?(t.stencilFuncSeparate(t.FRONT,i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMaskSeparate(t.FRONT,i.stencilWriteMaskFront),t.stencilOpSeparate(t.FRONT,i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront),t.stencilFuncSeparate(t.BACK,i.stencilFuncBack,i.stencilRefBack,i.stencilMaskBack),t.stencilMaskSeparate(t.BACK,i.stencilWriteMaskBack),t.stencilOpSeparate(t.BACK,i.stencilFailOpBack,i.stencilZFailOpBack,i.stencilZPassOpBack)):(t.stencilFunc(i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMask(i.stencilWriteMaskFront),t.stencilOp(i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront)))):void(i.stencilTest!==a.enums.STENCIL_DISABLE&&(e.stencilSep===i.stencilSep?i.stencilSep?(e.stencilFuncFront===i.stencilFuncFront&&e.stencilRefFront===i.stencilRefFront&&e.stencilMaskFront===i.stencilMaskFront||t.stencilFuncSeparate(t.FRONT,i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),e.stencilWriteMaskFront!==i.stencilWriteMaskFront&&t.stencilMaskSeparate(t.FRONT,i.stencilWriteMaskFront),e.stencilFailOpFront===i.stencilFailOpFront&&e.stencilZFailOpFront===i.stencilZFailOpFront&&e.stencilZPassOpFront===i.stencilZPassOpFront||t.stencilOpSeparate(t.FRONT,i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront),e.stencilFuncBack===i.stencilFuncBack&&e.stencilRefBack===i.stencilRefBack&&e.stencilMaskBack===i.stencilMaskBack||t.stencilFuncSeparate(t.BACK,i.stencilFuncBack,i.stencilRefBack,i.stencilMaskBack),e.stencilWriteMaskBack!==i.stencilWriteMaskBack&&t.stencilMaskSeparate(t.BACK,i.stencilWriteMaskBack),e.stencilFailOpBack===i.stencilFailOpBack&&e.stencilZFailOpBack===i.stencilZFailOpBack&&e.stencilZPassOpBack===i.stencilZPassOpBack||t.stencilOpSeparate(t.BACK,i.stencilFailOpBack,i.stencilZFailOpBack,i.stencilZPassOpBack)):(e.stencilFuncFront===i.stencilFuncFront&&e.stencilRefFront===i.stencilRefFront&&e.stencilMaskFront===i.stencilMaskFront||t.stencilFunc(i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),e.stencilWriteMaskFront!==i.stencilWriteMaskFront&&t.stencilMask(i.stencilWriteMaskFront),e.stencilFailOpFront===i.stencilFailOpFront&&e.stencilZFailOpFront===i.stencilZFailOpFront&&e.stencilZPassOpFront===i.stencilZPassOpFront||t.stencilOp(i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront)):i.stencilSep?(t.stencilFuncSeparate(t.FRONT,i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMaskSeparate(t.FRONT,i.stencilWriteMaskFront),t.stencilOpSeparate(t.FRONT,i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront),t.stencilFuncSeparate(t.BACK,i.stencilFuncBack,i.stencilRefBack,i.stencilMaskBack),t.stencilMaskSeparate(t.BACK,i.stencilWriteMaskBack),t.stencilOpSeparate(t.BACK,i.stencilFailOpBack,i.stencilZFailOpBack,i.stencilZPassOpBack)):(t.stencilFunc(i.stencilFuncFront,i.stencilRefFront,i.stencilMaskFront),t.stencilMask(i.stencilWriteMaskFront),t.stencilOp(i.stencilFailOpFront,i.stencilZFailOpFront,i.stencilZPassOpFront))))}function m(t,e,i){e.cullMode!==i.cullMode&&(i.cullMode!==a.enums.CULL_NONE?(t.enable(t.CULL_FACE),t.cullFace(i.cullMode)):t.disable(t.CULL_FACE))}function y(t,e,i,n){var r=!1;if(-1!==n.maxStream){if(i.maxStream!==n.maxStream)r=!0;else if(i.program!==n.program)r=!0;else for(var s=0;s>>0},n.setBlendFunc=function(t,e){this._next.blendSep=!1,this._next.blendSrc=t,this._next.blendDst=e},n.setBlendFuncSep=function(t,e,i,n){this._next.blendSep=!0,this._next.blendSrc=t,this._next.blendDst=e,this._next.blendSrcAlpha=i,this._next.blendDstAlpha=n},n.setBlendEq=function(t){this._next.blendSep=!1,this._next.blendEq=t},n.setBlendEqSep=function(t,e){this._next.blendSep=!0,this._next.blendEq=t,this._next.blendAlphaEq=e},n.setCullMode=function(t){this._next.cullMode=t},n.setVertexBuffer=function(t,e,i){void 0===i&&(i=0),this._next.vertexBuffers[t]=e,this._next.vertexBufferOffsets[t]=i,this._next.maxStream=this._caps.maxTextureUnits?console.warn("Can not set texture "+t+" at stage "+i+", max texture exceed: "+this._caps.maxTextureUnits):(this._next.textureUnits[i]=e,this.setUniform(t,i),this._next.maxTextureSlot=this._caps.maxTextureUnits)console.warn("Can not set "+n+" textures for "+t+", max texture exceed: "+this._caps.maxTextureUnits);else{for(var r=0;rthis._bytes){if(t)return void console.error("Failed to update data, bytes exceed.");this._needExpandDataStore=!0,this._bytes=t+e.byteLength,this._numIndices=this._bytes/this._bytesPerIndex}var i=this._device._gl,n=this._usage;i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,this._glID),this._needExpandDataStore?(i.bufferData(i.ELEMENT_ARRAY_BUFFER,e,n),this._needExpandDataStore=!1):i.bufferSubData(i.ELEMENT_ARRAY_BUFFER,t,e),this._device._restoreIndexBuffer()}}else console.error("The buffer is destroyed")},n.setUsage=function(t){this._usage=t},e=t,(i=[{key:"count",get:function(){return this._numIndices}}])&&s(e.prototype,i),t})();o.BYTES_PER_INDEX=a;var l=o;i.default=l,e.exports=i.default}),{"./enums":368}],371:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("./enums");n={VertexFormat:t("./vertex-format"),IndexBuffer:t("./index-buffer"),VertexBuffer:t("./vertex-buffer"),Program:t("./program"),Texture:t("./texture"),Texture2D:t("./texture-2d"),TextureCube:t("./texture-cube"),RenderBuffer:t("./render-buffer"),FrameBuffer:t("./frame-buffer"),Device:t("./device"),attrTypeBytes:r.attrTypeBytes,glFilter:r.glFilter,glTextureFmt:r.glTextureFmt},Object.assign(n,r.enums);var s=n;i.default=s,cc.gfx=n,e.exports=i.default}),{"./device":367,"./enums":368,"./frame-buffer":369,"./index-buffer":370,"./program":373,"./render-buffer":374,"./texture":378,"./texture-2d":376,"./texture-cube":377,"./vertex-buffer":379,"./vertex-format":380}],372:[(function(t,e,i){"use strict";i.__esModule=!0,i.isPow2=function(t){return!(t&t-1||!t)}}),{}],373:[(function(t,e,i){"use strict";function n(t,e){for(var i=0;i0&&t.push({type:e,fileID:-1,line:0,message:i})}}))}var a=(function(){function t(t,e){this._device=t,this._attributes=[],this._uniforms=[],this._samplers=[],this._errors=[],this._linked=!1,this._vertSource=e.vert,this._fragSource=e.frag,this._glID=null,this._id=r++}var e,i,a=t.prototype;return a.link=function(){if(!this._linked){var t=this._device._gl,e=o(t,t.VERTEX_SHADER,this._vertSource),i=o(t,t.FRAGMENT_SHADER,this._fragSource),n=t.createProgram();t.attachShader(n,e),t.attachShader(n,i),t.linkProgram(n);var r=!1,a=this._errors;if(t.getShaderParameter(e,t.COMPILE_STATUS)||(s(a,"vs",t.getShaderInfoLog(e)),r=!0),t.getShaderParameter(i,t.COMPILE_STATUS)||(s(a,"fs",t.getShaderInfoLog(i)),r=!0),t.deleteShader(e),t.deleteShader(i),r)return a;if(!t.getProgramParameter(n,t.LINK_STATUS))return a.push({info:"Failed to link shader program: "+t.getProgramInfoLog(n)}),a;this._glID=n;for(var l=t.getProgramParameter(n,t.ACTIVE_ATTRIBUTES),c=0;c=s.enums.TEXTURE_FMT_RGB_DXT1&&this._format<=s.enums.TEXTURE_FMT_RGBA_PVRTC_4BPPV1||this._format>=s.enums.TEXTURE_FMT_RGB_ETC2&&this._format<=s.enums.TEXTURE_FMT_RGBA_ETC2),void 0!==t.genMipmaps&&(this._genMipmap=t.genMipmaps,i=t.genMipmaps);var n=this._device.caps.maxTextureSize||Number.MAX_VALUE,r=Math.max(t.width||0,t.height||0);n1&&(i=!1,(t.width>t.height?t.width:t.height)>>t.images.length-1!=1&&console.error("texture-2d mipmap is invalid, should have a 1x1 mipmap."))}(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height)||(i=!1),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this._glID),void 0!==t.images&&t.images.length>0&&(this._setMipmap(t.images,t.flipY,t.premultiplyAlpha),t.images.length>1&&(this._genMipmap=!0)),i&&(e.hint(e.GENERATE_MIPMAP_HINT,e.NICEST),e.generateMipmap(e.TEXTURE_2D),this._genMipmap=!0),this._setTexInfo(),this._device._restoreTexture(0)},r.updateSubImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this._glID),this._setSubImage(i,t),this._device._restoreTexture(0)},r.updateImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this._glID),this._setImage(i,t),this._device._restoreTexture(0)},r._setSubImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.image;!s||ArrayBuffer.isView(s)||s instanceof ArrayBuffer?(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),this._compressed?i.compressedTexSubImage2D(i.TEXTURE_2D,e.level,e.x,e.y,e.width,e.height,t.format,s):i.texSubImage2D(i.TEXTURE_2D,e.level,e.x,e.y,e.width,e.height,t.format,t.pixelType,s)):(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),i.texSubImage2D(i.TEXTURE_2D,e.level,e.x,e.y,t.format,t.pixelType,s))},r._setImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.image;!s||ArrayBuffer.isView(s)||s instanceof ArrayBuffer?(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),this._compressed?i.compressedTexImage2D(i.TEXTURE_2D,e.level,t.internalFormat,e.width,e.height,0,s):i.texImage2D(i.TEXTURE_2D,e.level,t.internalFormat,e.width,e.height,0,t.format,t.pixelType,s)):(void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),i.texImage2D(i.TEXTURE_2D,e.level,t.internalFormat,t.format,t.pixelType,s))},r._setMipmap=function(t,e,i){for(var n=(0,s.glTextureFmt)(this._format),r={width:this._width,height:this._height,flipY:e,premultiplyAlpha:i,level:0,image:null},a=0;a>a,r.height=this._height>>a,r.image=t[a],this._setImage(n,r)},r._setTexInfo=function(){var t=this._device._gl,e=(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height);e||this._wrapS===s.enums.WRAP_CLAMP&&this._wrapT===s.enums.WRAP_CLAMP||(console.warn("WebGL1 doesn't support all wrap modes with NPOT textures"),this._wrapS=s.enums.WRAP_CLAMP,this._wrapT=s.enums.WRAP_CLAMP);var i=this._genMipmap?this._mipFilter:-1;e||-1===i||(console.warn("NPOT textures do not support mipmap filter"),i=-1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,(0,s.glFilter)(t,this._minFilter,i)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,(0,s.glFilter)(t,this._magFilter,-1)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this._wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this._wrapT);var n=this._device.ext("EXT_texture_filter_anisotropic");n&&t.texParameteri(t.TEXTURE_2D,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisotropy)},n})(r.default);i.default=o,e.exports=i.default}),{"./enums":368,"./misc":372,"./texture":378}],377:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("./texture"))&&n.__esModule?n:{default:n},s=t("./enums"),a=t("./misc"),o=(function(t){var e,i;function n(e,i){var n,r=(n=t.call(this,e)||this)._device._gl;return n._target=r.TEXTURE_CUBE_MAP,n._glID=r.createTexture(),n.update(i),n}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.update=function(t){var e=this._device._gl,i=this._genMipmaps;t&&(void 0!==t.width&&(this._width=t.width),void 0!==t.height&&(this._height=t.height),void 0!==t.anisotropy&&(this._anisotropy=t.anisotropy),void 0!==t.minFilter&&(this._minFilter=t.minFilter),void 0!==t.magFilter&&(this._magFilter=t.magFilter),void 0!==t.mipFilter&&(this._mipFilter=t.mipFilter),void 0!==t.wrapS&&(this._wrapS=t.wrapS),void 0!==t.wrapT&&(this._wrapT=t.wrapT),void 0!==t.format&&(this._format=t.format,this._compressed=this._format>=s.enums.TEXTURE_FMT_RGB_DXT1&&this._format<=s.enums.TEXTURE_FMT_RGBA_PVRTC_4BPPV1||this._format>=s.enums.TEXTURE_FMT_RGB_ETC2&&this._format<=s.enums.TEXTURE_FMT_RGBA_ETC2),void 0!==t.genMipmaps&&(this._genMipmaps=t.genMipmaps,i=t.genMipmaps),void 0!==t.images&&t.images.length>1&&(i=!1,t.width!==t.height&&console.warn("texture-cube width and height should be identical."),t.width>>t.images.length-1!=1&&console.error("texture-cube mipmap is invalid. please set mipmap as 1x1, 2x2, 4x4 ... nxn"))),(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height)||(i=!1),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_CUBE_MAP,this._glID),void 0!==t.images&&t.images.length>0&&(this._setMipmap(t.images,t.flipY,t.premultiplyAlpha),t.images.length>1&&(this._genMipmaps=!0)),i&&(e.hint(e.GENERATE_MIPMAP_HINT,e.NICEST),e.generateMipmap(e.TEXTURE_CUBE_MAP),this._genMipmaps=!0),this._setTexInfo(),this._device._restoreTexture(0)},r.updateSubImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_CUBE_MAP,this._glID),this._setSubImage(i,t),this._device._restoreTexture(0)},r.updateImage=function(t){var e=this._device._gl,i=(0,s.glTextureFmt)(this._format);e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_CUBE_MAP,this._glID),this._setImage(i,t),this._device._restoreTexture(0)},r._setSubImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.faceIndex,a=e.image;void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),!a||ArrayBuffer.isView(a)||a instanceof ArrayBuffer?this._compressed?i.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,e.x,e.y,e.width,e.height,t.format,a):i.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,e.x,e.y,e.width,e.height,t.format,t.pixelType,a):i.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,e.x,e.y,t.format,t.pixelType,a)},r._setImage=function(t,e){var i=this._device._gl,n=e.flipY,r=e.premultiplyAlpha,s=e.faceIndex,a=e.image;void 0===n?i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1):i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,n),void 0===r?i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1):i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),!a||ArrayBuffer.isView(a)||a instanceof ArrayBuffer?this._compressed?i.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,t.internalFormat,e.width,e.height,0,a):i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,t.internalFormat,e.width,e.height,0,t.format,t.pixelType,a):i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+s,e.level,t.internalFormat,t.format,t.pixelType,a)},r._setMipmap=function(t,e,i){for(var n=(0,s.glTextureFmt)(this._format),r={width:this._width,height:this._height,faceIndex:0,flipY:e,premultiplyAlpha:i,level:0,image:null},a=0;a>a,r.height=this._height>>a;for(var l=0;l<6;++l)r.faceIndex=l,r.image=o[l],this._setImage(n,r)}},r._setTexInfo=function(){var t=this._device._gl,e=(0,a.isPow2)(this._width)&&(0,a.isPow2)(this._height);e||this._wrapS===s.enums.WRAP_CLAMP&&this._wrapT===s.enums.WRAP_CLAMP||(console.warn("WebGL1 doesn't support all wrap modes with NPOT textures"),this._wrapS=s.enums.WRAP_CLAMP,this._wrapT=s.enums.WRAP_CLAMP);var i=this._genMipmaps?this._mipFilter:-1;e||-1===i||(console.warn("NPOT textures do not support mipmap filter"),i=-1),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,(0,s.glFilter)(t,this._minFilter,i)),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,(0,s.glFilter)(t,this._magFilter,-1)),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_S,this._wrapS),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_T,this._wrapT);var n=this._device.ext("EXT_texture_filter_anisotropic");n&&t.texParameteri(t.TEXTURE_CUBE_MAP,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisotropy)},n})(r.default);i.default=o,e.exports=i.default}),{"./enums":368,"./misc":372,"./texture":378}],378:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("./enums"),r=0,s=(function(){function t(t){this._device=t,this._width=4,this._height=4,this._genMipmaps=!1,this._compressed=!1,this._anisotropy=1,this._minFilter=n.enums.FILTER_LINEAR,this._magFilter=n.enums.FILTER_LINEAR,this._mipFilter=n.enums.FILTER_LINEAR,this._wrapS=n.enums.WRAP_REPEAT,this._wrapT=n.enums.WRAP_REPEAT,this._format=n.enums.TEXTURE_FMT_RGBA8,this._target=-1,this._id=r++}return t.prototype.destroy=function(){null!==this._glID?(this._device._gl.deleteTexture(this._glID),this._device._stats.tex-=this.bytes,this._glID=null):console.error("The texture already destroyed")},t})();i.default=s,e.exports=i.default}),{"./enums":368}],379:[(function(t,e,i){"use strict";function n(t,e){for(var i=0;ithis._bytes){if(t)return void console.error("Failed to update data, bytes exceed.");this._needExpandDataStore=!0,this._bytes=t+e.byteLength,this._numVertices=this._bytes/this._bytesPerVertex}var i=this._device._gl,n=this._usage;i.bindBuffer(i.ARRAY_BUFFER,this._glID),this._needExpandDataStore?(i.bufferData(i.ARRAY_BUFFER,e,n),this._needExpandDataStore=!1):i.bufferSubData(i.ARRAY_BUFFER,t,e),i.bindBuffer(i.ARRAY_BUFFER,null)}}else console.error("The buffer is destroyed")},r.getFormat=function(t){return this._format.element(t)},r.setUsage=function(t){this._usage=t},e=t,(i=[{key:"count",get:function(){return this._numVertices}}])&&n(e.prototype,i),t})();i.default=r,e.exports=i.default}),{"./enums":368}],380:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=t("./enums"),s=(n=t("../murmurhash2_gc"))&&n.__esModule?n:{default:n},a=(function(){function t(t){this._attr2el={},this._elements=[],this._bytes=0;for(var e="",i=0,n=t.length;ithis._data.length)for(var e=this._data.length;e=this._data.length&&this._resize(2*this._data.length),this._data[this._count]=t,++this._count},n.pop=function(){--this._count,this._count<0&&(this._count=0);var t=this._data[this._count];return this._data[this._count]=void 0,t},n.fastRemove=function(t){if(!(t>=this._count||t<0)){var e=this._count-1;this._data[t]=this._data[e],this._data[e]=void 0,this._count-=1}},n.indexOf=function(t){return this._data.indexOf(t)},n.sort=function(t){return(0,r.default)(this._data,0,this._count,t)},e=t,(i=[{key:"length",get:function(){return this._count}},{key:"data",get:function(){return this._data}}])&&s(e.prototype,i),t})();i.default=a,e.exports=i.default}),{"./timsort":387}],383:[(function(t,e,i){"use strict";i.__esModule=!0,i.TypedArrayPool=i.RecyclePool=i.Pool=i.LinkedArray=i.FixedArray=i.CircularPool=void 0;var n=c(t("./circular-pool"));i.CircularPool=n.default;var r=c(t("./fixed-array"));i.FixedArray=r.default;var s=c(t("./linked-array"));i.LinkedArray=s.default;var a=c(t("./pool"));i.Pool=a.default;var o=c(t("./recycle-pool"));i.RecyclePool=o.default;var l=c(t("./typed-array-pool"));function c(t){return t&&t.__esModule?t:{default:t}}i.TypedArrayPool=l.default}),{"./circular-pool":381,"./fixed-array":382,"./linked-array":384,"./pool":385,"./recycle-pool":386,"./typed-array-pool":388}],384:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n,r=(n=t("./pool"))&&n.__esModule?n:{default:n};function s(t,e){for(var i=0;ithis._data.length)for(var e=this._data.length;e=this._data.length&&this.resize(2*this._data.length),this._data[this._count++]},n.remove=function(t){if(!(t>=this._count)){var e=this._count-1,i=this._data[t];this._data[t]=this._data[e],this._data[e]=i,this._count-=1}},n.sort=function(t){return(0,r.default)(this._data,0,this._count,t)},e=t,(i=[{key:"length",get:function(){return this._count}},{key:"data",get:function(){return this._data}}])&&s(e.prototype,i),t})();i.default=a,cc.RecyclePool=a,e.exports=i.default}),{"./timsort":387}],387:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e,i,r){if(!Array.isArray(t))throw new TypeError("Can only sort arrays");void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=l);var s=i-e;if(!(s<2)){var a=0;if(su&&(f=u),_(t,e,e+f,e+a,r),a=f}o.pushRun(e,a),o.mergeRuns(),s-=a,e+=a}while(0!==s);o.forceMergeRuns()}};var n=32,r=7,s=256,a=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function o(t){return t<1e5?t<100?t<10?0:1:t<1e4?t<1e3?2:3:4:t<1e7?t<1e6?5:6:t<1e9?t<1e8?7:8:9}function l(t,e){if(t===e)return 0;if(~~t===t&&~~e===e){if(0===t||0===e)return t=0)return-1;if(t>=0)return 1;t=-t,e=-e}var i=o(t),n=o(e),r=0;return in&&(e*=a[i-n-1],t/=10,r=1),t===e?r:t=n;)e|=1&t,t>>=1;return t+e}function h(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function u(t,e,i){for(i--;e>>1;r(s,t[l])<0?o=l:a=l+1}var c=n-a;switch(c){case 3:t[a+3]=t[a+2];case 2:t[a+2]=t[a+1];case 1:t[a+1]=t[a];break;default:for(;c>0;)t[a+c]=t[a+c-1],c--}t[a]=s}}function f(t,e,i,n,r,s){var a=0,o=0,l=1;if(s(t,e[i+r])>0){for(o=n-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=o);l>o&&(l=o),a+=r,l+=r}else{for(o=r+1;lo&&(l=o);var c=a;a=r-l,l=r-c}for(a++;a>>1);s(t,e[i+h])>0?a=h+1:l=h}return l}function d(t,e,i,n,r,s){var a=0,o=0,l=1;if(s(t,e[i+r])<0){for(o=r+1;lo&&(l=o);var c=a;a=r-l,l=r-c}else{for(o=n-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=o);l>o&&(l=o),a+=r,l+=r}for(a++;a>>1);s(t,e[i+h])<0?l=h:a=h+1}return l}var p=(function(){function t(t,e){this.array=t,this.compare=e,this.minGallop=r,this.length=t.length,this.tmpStorageLength=s,this.length<2*s&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}var e=t.prototype;return e.pushRun=function(t,e){this.runStart[this.stackSize]=t,this.runLength[this.stackSize]=e,this.stackSize+=1},e.mergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;if(t>=1&&this.runLength[t-1]<=this.runLength[t]+this.runLength[t+1]||t>=2&&this.runLength[t-2]<=this.runLength[t]+this.runLength[t-1])this.runLength[t-1]this.runLength[t+1])break;this.mergeAt(t)}},e.forceMergeRuns=function(){for(;this.stackSize>1;){var t=this.stackSize-2;t>0&&this.runLength[t-1]=r||m>=r);if(y)break;_<0&&(_=0),_+=2}if(this.minGallop=_,_<1&&(this.minGallop=1),1===e){for(l=0;l=0;l--)a[p+l]=a[_+l];if(0===e){g=!0;break}}if(a[u--]=o[h--],1==--n){g=!0;break}if(0!=(v=n-f(a[c],o,0,n,n-1,s))){for(n-=v,p=1+(u-=v),_=1+(h-=v),l=0;l=r||v>=r);if(g)break;m<0&&(m=0),m+=2}if(this.minGallop=m,m<1&&(this.minGallop=1),1===n){for(p=1+(u-=e),_=1+(c-=e),l=e-1;l>=0;l--)a[p+l]=a[_+l];a[u]=o[h]}else{if(0===n)throw new Error("mergeHigh preconditions were not respected");for(_=u-(n-1),l=0;l=0;l--)a[p+l]=a[_+l];a[u]=o[h]}else for(_=u-(n-1),l=0;l65535)<<4,e|=i=((t>>>=e)>255)<<3,e|=i=((t>>>=i)>15)<<2,(e|=i=((t>>>=i)>3)<<1)|(t>>>=i)>>1}function o(t){var e=s(t),i=n[a(e)>>2];return i.length>0?i.pop():new ArrayBuffer(e)}var l={alloc_int8:function(t){var e=new Int8Array(o(t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_uint8:function(t){var e=new Uint8Array(o(t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_int16:function(t){var e=new Int16Array(o(2*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_uint16:function(t){var e=new Uint16Array(o(2*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_int32:function(t){var e=new Int32Array(o(4*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_uint32:function(t){var e=new Uint32Array(o(4*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_float32:function(t){var e=new Float32Array(o(4*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_float64:function(t){var e=new Float64Array(o(8*t),0,t);return e.length!==t?e.subarray(0,t):e},alloc_dataview:function(t){var e=new DataView(o(t),0,t);return e.length!==t?e.subarray(0,t):e},free:function(t){var e;e=t.buffer,n[a(e.byteLength)>>2].push(e)},reset:function(){for(var t=Array(8),e=0;e<8;++e)t[e]=[]}};i.default=l,e.exports=i.default}),{}],389:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=function(t,e){for(var i,n=t.length,r=e^n,s=0;n>=4;)i=1540483477*(65535&(i=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24))+((1540483477*(i>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),n-=4,++s;switch(n){case 3:r^=(255&t.charCodeAt(s+2))<<16;case 2:r^=(255&t.charCodeAt(s+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(s)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0},e.exports=i.default}),{}],390:[(function(t,e,i){"use strict";i.__esModule=!0,i.default=void 0;var n=t("../../core/value-types"),r=o(t("../core/base-renderer")),s=o(t("../enums")),a=t("../memop");function o(t){return t&&t.__esModule?t:{default:t}}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var c=new Float32Array(16),h=new Float32Array(16),u=new Float32Array(16),_=new Float32Array(16),f=new Float32Array(4),d=new Float32Array(64),p=[],m=new Float32Array(4),y=new n.Vec4(0,0,0,0),v=new n.Vec3(0,0,0),g=new n.Vec3(0,0,0),b=new a.RecyclePool(function(){return new Float32Array(16)},8);function A(t,e){return t._priority-e._priority}var x=(function(t){var e,i;function r(e,i){var n;return(n=t.call(this,e,i)||this)._time=new Float32Array(4),n._lights=[],n._shadowLights=[],n._numLights=0,n._defines={},n._registerStage("shadowcast",n._shadowStage.bind(l(n))),n._registerStage("opaque",n._opaqueStage.bind(l(n))),n._registerStage("transparent",n._transparentStage.bind(l(n))),n}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var a=r.prototype;return a.reset=function(){b.reset(),t.prototype.reset.call(this)},a.render=function(t,e){this.reset(),e&&(this._time[0]+=e,this._time[1]=e,this._time[2]++),this._device.setUniform("cc_time",this._time),this._updateLights(t);for(var i=this._device._gl.canvas,n=0;n0){for(var e=b.add(),i=b.add(),n=b.add(),r=Math.min(4,this._lights.length),a=0;a1,C=A[0],T=C.getAttribute("source");T=T.replace(/\\/g,"/");var S=y.getElementsByTagName("tile"),w=S&&S.length||1,E=null,M=y.getAttribute("name")||"",D=parseInt(y.getAttribute("spacing"))||0,B=parseInt(y.getAttribute("margin"))||0,I=parseInt(e);I||(I=parseInt(y.getAttribute("firstgid"))||0);var P=cc.size(0,0);P.width=parseFloat(y.getAttribute("tilewidth")),P.height=parseFloat(y.getAttribute("tileheight"));var R=y.getElementsByTagName("tileoffset")[0],O=cc.v2(0,0);R&&(O.x=parseFloat(R.getAttribute("x")),O.y=parseFloat(R.getAttribute("y")));for(var L=null,F=0;F0){var N=(C=V[0]).getAttribute("source");N=N.replace(/\\/g,"/"),L.sourceImage=this._textures[N],L.sourceImage||cc.errorID(7221,N);var k=cc.size(0,0);k.width=parseFloat(C.getAttribute("width")),k.height=parseFloat(C.getAttribute("height")),L._tileSize=k,L.firstGid=this.parentGID}this._tileProperties[this.parentGID]=l(E);var z=E.getElementsByTagName("animation");if(z&&z.length>0){var G=z[0].getElementsByTagName("frame"),U={frames:[],dt:0,frameIdx:0};this._tileAnimations[this.parentGID]=U;for(var j=U.frames,H=0;H0){var m=p[0];f.type=cc.TiledMap.TMXObjectType.TEXT,f.wrap="1"==m.getAttribute("wrap"),f.color=o(m.getAttribute("color")),f.halign=s(m.getAttribute("halign")),f.valign=a(m.getAttribute("valign")),f.pixelsize=parseInt(m.getAttribute("pixelsize"))||16,f.text=m.childNodes[0].nodeValue}var y=_.getAttribute("gid");y&&(f.gid=parseInt(y),f.type=cc.TiledMap.TMXObjectType.IMAGE);var v=_.getElementsByTagName("ellipse");v&&v.length>0&&(f.type=cc.TiledMap.TMXObjectType.ELLIPSE);var g=_.getElementsByTagName("polygon");if(g&&g.length>0){f.type=cc.TiledMap.TMXObjectType.POLYGON;var b=g[0].getAttribute("points");b&&(f.points=this._parsePointsString(b))}var A=_.getElementsByTagName("polyline");if(A&&A.length>0){f.type=cc.TiledMap.TMXObjectType.POLYLINE;var x=A[0].getAttribute("points");x&&(f.polylinePoints=this._parsePointsString(x))}f.type||(f.type=cc.TiledMap.TMXObjectType.RECT),e._objects.push(f)}"index"!==c&&e._objects.sort((function(t,e){return t.y-e.y}))}return e},_parsePointsString:function(t){if(!t)return null;for(var e=[],i=t.split(" "),n=0;nthis._rightTop.row&&(t.row=this._rightTop.row),i<0&&(t.col=0),i>this._rightTop.col&&(t.col=this._rightTop.col)},_addUserNodeToGrid:function(t,e){var i=e.row,n=e.col,r=this._userNodeGrid[i]=this._userNodeGrid[i]||{count:0},s=r[n]=r[n]||{count:0,list:[]};t._row=i,t._col=n,t._index=s.list.length,r.count++,s.count++,s.list.push(t),this._userNodeDirty=!0},_isUserNodeDirty:function(){return this._userNodeDirty},_setUserNodeDirty:function(t){this._userNodeDirty=t},onEnable:function(){this._super(),this.node.on(cc.Node.EventType.ANCHOR_CHANGED,this._syncAnchorPoint,this),this._activateMaterial()},onDisable:function(){this._super(),this.node.off(cc.Node.EventType.ANCHOR_CHANGED,this._syncAnchorPoint,this)},_syncAnchorPoint:function(){var t=this.node;this._leftDownToCenterX=t.width*t.anchorX*t.scaleX,this._leftDownToCenterY=t.height*t.anchorY*t.scaleY,this._cullingDirty=!0},onDestroy:function(){this._super(),this._buffer&&(this._buffer.destroy(),this._buffer=null),this._renderDataList=null},getLayerName:function(){return this._layerName},setLayerName:function(t){this._layerName=t},getProperty:function(t){return this._properties[t]},getPositionAt:function(t,e){var i,n;switch(void 0!==e?(i=Math.floor(t),e=Math.floor(e)):(i=Math.floor(t.x),e=Math.floor(t.y)),this._layerOrientation){case cc.TiledMap.Orientation.ORTHO:n=this._positionForOrthoAt(i,e);break;case cc.TiledMap.Orientation.ISO:n=this._positionForIsoAt(i,e);break;case cc.TiledMap.Orientation.HEX:n=this._positionForHexAt(i,e)}return n},_isInvalidPosition:function(t,e){if(t&&"object"==typeof t){var i=t;e=i.y,t=i.x}return t>=this._layerSize.width||e>=this._layerSize.height||t<0||e<0},_positionForIsoAt:function(t,e){var i=0,n=0,r=Math.floor(t)+Math.floor(e)*this._layerSize.width,s=this._tiles[r];if(s){var a=(s&cc.TiledMap.TileFlag.FLIPPED_MASK)>>>0,o=this._texGrids[a].tileset.tileOffset;i=o.x,n=o.y}return cc.v2(.5*this._mapTileSize.width*(this._layerSize.height+t-e-1)+i,.5*this._mapTileSize.height*(this._layerSize.width-t+this._layerSize.height-e-2)-n)},_positionForOrthoAt:function(t,e){var i=0,n=0,r=Math.floor(t)+Math.floor(e)*this._layerSize.width,s=this._tiles[r];if(s){var a=(s&cc.TiledMap.TileFlag.FLIPPED_MASK)>>>0,o=this._texGrids[a].tileset.tileOffset;i=o.x,n=o.y}return cc.v2(t*this._mapTileSize.width+i,(this._layerSize.height-e-1)*this._mapTileSize.height-n)},_positionForHexAt:function(t,e){var i,n=this._mapTileSize.width,r=this._mapTileSize.height,s=this._layerSize.height,a=Math.floor(t)+Math.floor(e)*this._layerSize.width,o=this._tiles[a];i=this._texGrids[o]?this._texGrids[o].tileset.tileOffset:{x:0,y:0};var l=this._staggerIndex===cc.TiledMap.StaggerIndex.STAGGERINDEX_ODD?1:-1,c=0,h=0,u=0,_=0;switch(this._staggerAxis){case cc.TiledMap.StaggerAxis.STAGGERAXIS_Y:u=0,e%2==1&&(u=n/2*l),c=t*n+u+i.x,h=(s-e-1)*(r-(r-this._hexSideLength)/2)-i.y;break;case cc.TiledMap.StaggerAxis.STAGGERAXIS_X:_=0,t%2==1&&(_=r/2*-l),c=t*(n-(n-this._hexSideLength)/2)+i.x,h=(s-e-1)*r+_-i.y}return cc.v2(c,h)},setTilesGIDAt:function(t,e,i,n){if(t&&0!==t.length&&!(n<=0)){i<0&&(i=0),e<0&&(e=0);for(var r=0,s=e+n,a=i;;a++)for(var o=e;o=t.length)return;this._updateTileForGID(t[r],o,a),r++}}},setTileGIDAt:function(t,e,i,n){if(void 0===e)throw new Error("cc.TiledLayer.setTileGIDAt(): pos should be non-null");var r;void 0===n&&e instanceof cc.Vec2?(r=e,n=i):(u.x=e,u.y=i,r=u);var s=t&cc.TiledMap.TileFlag.FLIPPED_MASK;if(r.x=Math.floor(r.x),r.y=Math.floor(r.y),this._isInvalidPosition(r))throw new Error("cc.TiledLayer.setTileGIDAt(): invalid position");this._tiles&&this._tilesets&&0!=this._tilesets.length?0!==s&&s>>0,r.x,r.y)):cc.logID(7238)},_updateTileForGID:function(t,e,i){var n=0|e+i*this._layerSize.width;if(!(n>=this._tiles.length)&&t!==this._tiles[n]){var r=(t&cc.TiledMap.TileFlag.FLIPPED_MASK)>>>0,s=this._texGrids[r],a=s&&s.texId;s?(this._tiles[n]=t,this._updateVertex(e,i),this._buildMaterial(a)):this._tiles[n]=0,this._cullingDirty=!0}},getTiles:function(){return this._tiles},getTileGIDAt:function(t,e){if(void 0===t)throw new Error("cc.TiledLayer.getTileGIDAt(): pos should be non-null");var i=t;if(void 0===e&&(i=t.x,e=t.y),this._isInvalidPosition(i,e))throw new Error("cc.TiledLayer.getTileGIDAt(): invalid position");if(!this._tiles)return cc.logID(7237),null;var n=Math.floor(i)+Math.floor(e)*this._layerSize.width;return(this._tiles[n]&cc.TiledMap.TileFlag.FLIPPED_MASK)>>>0},getTileFlagsAt:function(t,e){if(!t)throw new Error("TiledLayer.getTileFlagsAt: pos should be non-null");if(void 0!==e&&(t=cc.v2(t,e)),this._isInvalidPosition(t))throw new Error("TiledLayer.getTileFlagsAt: invalid position");if(!this._tiles)return cc.logID(7240),null;var i=Math.floor(t.x)+Math.floor(t.y)*this._layerSize.width;return(this._tiles[i]&cc.TiledMap.TileFlag.FLIPPED_ALL)>>>0},_setCullingDirty:function(t){this._cullingDirty=t},_isCullingDirty:function(){return this._cullingDirty},_updateViewPort:function(t,e,i,n){if(this._viewPort.width!==i||this._viewPort.height!==n||this._viewPort.x!==t||this._viewPort.y!==e){this._viewPort.x=t,this._viewPort.y=e,this._viewPort.width=i,this._viewPort.height=n;var r=1;this._layerOrientation===cc.TiledMap.Orientation.ISO&&(r=2);var s=this._viewPort.x-this._offset.x+this._leftDownToCenterX,a=this._viewPort.y-this._offset.y+this._leftDownToCenterY,o=s-this._leftOffset,l=a-this._downOffset,c=s+i+this._rightOffset,h=a+n+this._topOffset,u=this._cullingRect.leftDown,f=this._cullingRect.rightTop;o<0&&(o=0),l<0&&(l=0),this._positionToRowCol(o,l,_),_.row-=r,_.col-=r,_.row=_.row>0?_.row:0,_.col=_.col>0?_.col:0,_.row===u.row&&_.col===u.col||(u.row=_.row,u.col=_.col,this._cullingDirty=!0),c<0||h<0?(_.row=-1,_.col=-1):(this._positionToRowCol(c,h,_),_.row++,_.col++),_.row>this._rightTop.row&&(_.row=this._rightTop.row),_.col>this._rightTop.col&&(_.col=this._rightTop.col),_.row===f.row&&_.col===f.col||(f.row=_.row,f.col=_.col,this._cullingDirty=!0)}},_positionToRowCol:function(t,e,i){var n=cc.TiledMap,r=n.Orientation,s=n.StaggerAxis,a=this._mapTileSize.width,o=this._mapTileSize.height,l=.5*a,c=.5*o,h=0,u=0,_=0,f=0,d=this._staggerAxis;switch(this._layerSize.width,this._layerOrientation){case r.ORTHO:u=Math.floor(t/a),h=Math.floor(e/o);break;case r.ISO:u=Math.floor(t/l),h=Math.floor(e/c);break;case r.HEX:d===s.STAGGERAXIS_Y?(_=(h=Math.floor(e/(o-this._diffY1)))%2==1?l*this._odd_even:0,u=Math.floor((t-_)/a)):(f=(u=Math.floor(t/(a-this._diffX1)))%2==1?c*-this._odd_even:0,h=Math.floor((e-f)/o))}return i.row=h,i.col=u,i},_updateCulling:function(){if(this._enableCulling){this.node._updateWorldMatrix(),n.Mat4.invert(l,this.node._worldMatrix);var t=cc.visibleRect,e=cc.Camera.findCamera(this.node);e&&(c.x=0,c.y=0,h.x=c.x+t.width,h.y=c.y+t.height,e.getScreenToWorldPoint(c,c),e.getScreenToWorldPoint(h,h),n.Vec2.transformMat4(c,c,l),n.Vec2.transformMat4(h,h,l),this._updateViewPort(c.x,c.y,h.x-c.x,h.y-c.y))}},getLayerOrientation:function(){return this._layerOrientation},getProperties:function(){return this._properties},_updateVertex:function(t,e){var i=cc.TiledMap,n=i.TileFlag.FLIPPED_MASK,r=i.StaggerAxis,s=i.Orientation,a=this._vertices,o=this._layerOrientation,l=this._tiles;if(l){var c,h,u,_,f,d,p,m=this._rightTop,y=this._mapTileSize.width,v=this._mapTileSize.height,g=.5*y,b=.5*v,A=this._layerSize.height,x=this._layerSize.width,C=this._texGrids;o===s.HEX&&(_=this._staggerAxis,f=this._diffX1,d=this._diffY1,p=this._odd_even);var T,S,w,E,M=0,D=0,B=0,I=0,P=e*x+t;if(c=C[S=(l[P]&n)>>>0]){switch(this._animations[S]&&(this._hasAniGrid=this._hasAniGrid||!0),o){case s.ORTHO:h=(M=t)*y,u=(D=A-e-1)*v;break;case s.ISO:h=g*(M=A+t-e-1),u=b*(D=A+x-t-e-2);break;case s.HEX:h=t*(y-f)+(_===r.STAGGERAXIS_Y&&e%2==1?g*p:0),u=(A-e-1)*(v-d)+(_===r.STAGGERAXIS_X&&t%2==1?b*-p:0),M=t,D=A-e-1}var R=a[D]=a[D]||{minCol:0,maxCol:0},O=R[M]=R[M]||{};R.minCol>M&&(R.minCol=M),R.maxCol=0&&this._textures.length>t?this._textures[t]:null},getTextures:function(){return this._textures},setTexture:function(t){this.setTextures([t])},setTextures:function(t){this._textures=t,this._activateMaterial()},getLayerSize:function(){return this._layerSize},getMapTileSize:function(){return this._mapTileSize},getTileSet:function(t){return t=t||0,this._tilesets&&t>=0&&this._tilesets.length>t?this._tilesets[t]:null},getTileSets:function(){return this._tilesets},setTileSet:function(t){this.setTileSets([t])},setTileSets:function(t){this._tilesets=t;for(var e=this._textures=[],i=this._texGrids=[],n=0;n>>0];if(o){var l=o.texId;void 0===n[l]&&(n[l]=i.length,i.push(l))}else cc.error("CCTiledLayer:_traverseAllGrid grid is null, gid is:",a)}}},_init:function(t,e,i,n,r){this._cullingDirty=!0,this._layerInfo=t,this._mapInfo=e;var s=t._layerSize;this._layerName=t.name,this._tiles=t._tiles,this._properties=t.properties,this._layerSize=s,this._minGID=t._minGID,this._maxGID=t._maxGID,this._opacity=t._opacity,this._renderOrder=e.renderOrder,this._staggerAxis=e.getStaggerAxis(),this._staggerIndex=e.getStaggerIndex(),this._hexSideLength=e.getHexSideLength(),this._animations=e.getTileAnimations(),this._tilesets=i,this._textures=n,this._texGrids=r,this._layerOrientation=e.orientation,this._mapTileSize=e.getTileSize();var a=this._mapTileSize.width,o=this._mapTileSize.height,l=this._layerSize.width,c=this._layerSize.height;if(this._layerOrientation===cc.TiledMap.Orientation.HEX){var h=cc.TiledMap,u=h.StaggerAxis,_=h.StaggerIndex,f=0,d=0;this._odd_even=this._staggerIndex===_.STAGGERINDEX_ODD?1:-1,this._staggerAxis===u.STAGGERAXIS_X?(this._diffX1=(a-this._hexSideLength)/2,this._diffY1=0,d=o*(c+.5),f=(a+this._hexSideLength)*Math.floor(l/2)+a*(l%2)):(this._diffX1=0,this._diffY1=(o-this._hexSideLength)/2,f=a*(l+.5),d=(o+this._hexSideLength)*Math.floor(c/2)+o*(c%2)),this.node.setContentSize(f,d)}else if(this._layerOrientation===cc.TiledMap.Orientation.ISO){var p=l+c;this.node.setContentSize(.5*a*p,.5*o*p)}else this.node.setContentSize(l*a,c*o);this._offset=cc.v2(t.offset.x,-t.offset.y),this._useAutomaticVertexZ=!1,this._vertexZvalue=0,this._syncAnchorPoint(),this._prepareToRender()},_prepareToRender:function(){this._updateVertices(),this._traverseAllGrid(),this._updateAllUserNode(),this._activateMaterial()},_buildMaterial:function(t){var e=this._texIdToMatIndex;if(void 0!==e[t])return null;var i=this._tilesetIndexArr,n=this._tilesetIndexToArrIndex,s=n[t];void 0===s&&(n[t]=s=i.length,i.push(t));var o=this._textures[t],l=this._materials[s];return l||(l=a.getBuiltinMaterial("2d-sprite")),(l=r.default.create(l,this)).define("CC_USE_MODEL",!0),l.setProperty("texture",o),this._materials[s]=l,e[t]=s,l},_activateMaterial:function(){var t=this._tilesetIndexArr;if(0!==t.length){for(var e=t.length,i=0;i0&&(_[h[f]]=u[f].text);var d=new cc.TMXMapInfo(t.tmxXmlStr,_,r,s,l),p=d.getTilesets();p&&0!==p.length||cc.logID(7241),this._buildWithMapInfo(d)}else this._releaseMapInfo()},_releaseMapInfo:function(){for(var t=this._layers,e=0,i=t.length;e0)for(var x=0,C=v.length;x=s.length&&(r.frameIdx=0),a=s[r.frameIdx]),i[n]=a.grid}}});cc.TiledMap=e.exports=c,cc.TiledMap.loadAllTextures=function(t,e){var i=t.length;if(0!==i)for(var n=0,r=function(){++n>=i&&e()},s=0;s=this._dataList.length&&this._pushRenderData();var e=this._dataList[this._offset];e.nodesRenderList.length=0;var i=e.ia;return i._vertexBuffer=t._vb,i._indexBuffer=t._ib,i._start=t.indiceOffset,i._count=0,this._offset++,e},pushNodesList:function(t,e){t.nodesRenderList.push(e)},reset:function(){this._offset=0}});cc.TiledMapRenderDataList=e.exports=r}),{"../renderer/core/input-assembler":361}],401:[(function(t,e){"use strict";var i=cc.Class({name:"cc.TiledObjectGroup",extends:cc.Component,getPositionOffset:function(){return this._positionOffset},getProperties:function(){this._properties},getGroupName:function(){return this._groupName},getProperty:function(t){return this._properties[t.toString()]},getObject:function(t){for(var e=0,i=this._objects.length;e>>0];if(!P)continue;var R=P.tileset,O="img"+x.id;g[O]=!0;var L=this.node.getChildByName(O),F=x.width||P.width,V=x.height||P.height,N=R.tileOffset.x,k=R.tileOffset.y;L instanceof cc.PrivateNode&&(L.removeFromParent(),L.destroy(),L=null),L||(L=new cc.Node),s.ISO==e.orientation?(L.anchorX=.5+N/F,L.anchorY=k/V):(L.anchorX=N/F,L.anchorY=k/V),L.active=x.visible,L.angle=-x.rotation,L.x=x.x-m,L.y=x.y-y,L.name=O,L.parent=this.node,L.opacity=this._opacity,L.setSiblingIndex(b);var z=L.getComponent(cc.Sprite);z||(z=L.addComponent(cc.Sprite));var G=z.spriteFrame;G||(G=new cc.SpriteFrame),(I&c)>>>0?G.setFlipX(!0):G.setFlipX(!1),(I&h)>>>0?G.setFlipY(!0):G.setFlipY(!1),G.setTexture(P.tileset.sourceImage,cc.rect(P)),z.spriteFrame=G,z.setVertsDirty(),L.width=F,L.height=V}}this._objects=v;for(var U=this.node.children,j=/^(?:img|text)\d+$/,H=0,W=U.length;H=_?(I.uploadData(),I.switchBuffer(),O=I._vData,L=I._uintVData,x=B.popRenderData(I),C=x.ia,S=0,T=0):(x=B.popRenderData(I),C=x.ia),x.material=P)}function N(t,e){var i=R._getNodesByRowCol(t,e);if(i&&0!=i.count){var n=i.list,r=0,s=0;for(V(),D.worldMatDirty++;r>>0&&(i=g,g=b,b=i),(e&l.HORIZONTAL)>>>0&&(i=v,v=g,g=i,i=b,b=A,A=i),(e&l.VERTICAL)>>>0&&(i=v,v=b,b=i,i=g,g=A,A=i)}var z=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.updateRenderData=function(t){t._renderDataList||(t._buffer=new cc.TiledMapBuffer(h._handle,u),t._renderDataList=new cc.TiledMapRenderDataList)},r.fillBuffers=function(t,e){if(0!==t._vertices.length){t._updateCulling();var i=t.node;if(w=t._leftDownToCenterX,E=t._leftDownToCenterY,M=i._worldMatrix,D=e,R=t,B=t._renderDataList,I=t._buffer,t._isCullingDirty()||t._isUserNodeDirty()||t._hasAnimation()||t._hasTiledNode()){var n,r;if(I.reset(),t._enableCulling){var s=t._cullingRect;n=s.leftDown,r=s.rightTop}else n=y,r=t._rightTop;var a=(r.row-n.row+1)*(r.col-n.col+1);switch(a>_&&(a=_),I.request(4*a,6*a),t._renderOrder){case f.RightDown:this.traverseGrids(n,r,-1,1);break;case f.LeftDown:this.traverseGrids(n,r,-1,-1);break;case f.RightUp:this.traverseGrids(n,r,1,1);break;case f.LeftUp:this.traverseGrids(n,r,1,-1)}t._setCullingDirty(!1),t._setUserNodeDirty(!1)}else for(var o=null,l=null,c=null,h=0;h0){e.worldMatDirty++;for(var u=0;u0&&(e.material=o.material,e.node=i,e._flushIA(o.ia))}x=null,C=null,M=null,D=null,B=null,I=null,P=null,R=null,O=null,L=null}},r.traverseGrids=function(t,e,i,n){if(B.reset(),!(e.row<0||e.col<0)){x=B.popRenderData(I),C=x.ia,O=I._vData,L=I._uintVData,T=0,S=0,P=null;var r=R.node,s=(r.parent?r.parent._opacity/255:1)*r._opacity;r._color._fastSetA(s);var a,o,l,h,u,f,d,p,m=r._color._val,y=R._tiledTiles,M=R._texGrids,F=R._tiles,z=R._texIdToMatIndex,G=R._materials,U=R._vertices,j=null,H=0,W=0,X=0,Y=0,q=0,J=null,Z=-1,K=0,Q=!0;for(-1==i?(h=e.row,u=t.row):(h=t.row,u=e.row);(u-h)*i>=0;h+=i)for(a=U[h],Q=0==(K=R._getNodesCountByRow(h))&&null!=a,1==n?(o=Q&&t.cola.maxCol?a.maxCol:e.col):(o=Q&&e.col>a.maxCol?a.maxCol:e.col,l=Q&&t.col=0;o+=n)(f=a&&a[o])?(j=M[((H=F[f.index])&c)>>>0])&&(Z!==j.texId&&(-1!==Z&&V(),p=z[Z=j.texId],P=G[p],x.material=P),P&&(W=f.left-w,X=f.bottom-E,Y=W+(d=j.tileset._tileSize).width,q=X+d.height,(J=y[f.index])?J.node.active&&(J.node._color._fastSetA(J.node._opacity*s/255),this.fillByTiledNode(J.node,O,L,W,Y,q,X)):(O[S]=W,O[S+1]=q,L[S+4]=m,O[S+5]=W,O[S+6]=X,L[S+9]=m,O[S+10]=Y,O[S+11]=q,L[S+14]=m,O[S+15]=Y,O[S+16]=X,L[S+19]=m),k(j,H),O[S+2]=v.x,O[S+3]=v.y,O[S+7]=b.x,O[S+8]=b.y,O[S+12]=g.x,O[S+13]=g.y,O[S+17]=A.x,O[S+18]=A.y,S+=20,I.adjust(4,6),C._count+=6,T++,K>0&&N(h,o),T>=_&&V())):K>0&&N(h,o);I.uploadData(),C._count>0&&(D.material=x.material,D.node=R.node,D._flushIA(x.ia))}},r.fillByTiledNode=function(t,e,i,n,r,a,o){t._updateLocalMatrix(),s.Mat4.copy(p,t._matrix),s.Vec3.set(m,-(n+w),-(o+E),0),s.Mat4.transform(p,p,m);var l=p.m,c=l[0],h=l[1],u=l[4],_=l[5],f=l[12],d=l[13],y=t._color._val;e[S]=n*c+a*u+f,e[S+1]=n*h+a*_+d,i[S+4]=y,e[S+5]=n*c+o*u+f,e[S+6]=n*h+o*_+d,i[S+9]=y,e[S+10]=r*c+a*u+f,e[S+11]=r*h+a*_+d,i[S+14]=y,e[S+15]=r*c+o*u+f,e[S+16]=r*h+o*_+d,i[S+19]=y},n})(r.default);i.default=z,r.default.register(a,z),e.exports=i.default}),{"../core/renderer/":270,"../core/renderer/assembler":267,"../core/renderer/render-flow":271,"../core/renderer/webgl/vertex-format":312,"../core/value-types":338,"./CCTiledLayer":397,"./CCTiledMap":398}],406:[(function(t,e){"use strict";var i=t("./video-player-impl"),n=i.EventType,r=cc.Enum({REMOTE:0,LOCAL:1}),s=cc.Class({name:"cc.VideoPlayer",extends:cc.Component,editor:!1,properties:{_resourceType:r.REMOTE,resourceType:{tooltip:!1,type:r,set:function(t){this._resourceType=t,this._updateVideoSource()},get:function(){return this._resourceType}},_remoteURL:"",remoteURL:{tooltip:!1,type:cc.String,set:function(t){this._remoteURL=t,this._updateVideoSource()},get:function(){return this._remoteURL}},_clip:{default:null,type:cc.Asset},clip:{tooltip:!1,get:function(){return this._clip},set:function(t){this._clip=t,this._updateVideoSource()},type:cc.Asset},currentTime:{tooltip:!1,type:cc.Float,set:function(t){this._impl&&this._impl.seekTo(t)},get:function(){return this._impl?this._currentStatus===n.NONE||this._currentStatus===n.STOPPED||this._currentStatus===n.META_LOADED||this._currentStatus===n.READY_TO_PLAY?0:this._currentStatus===n.COMPLETED?this._impl.duration():this._impl.currentTime():-1}},_volume:1,volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.isPlaying()&&!this._mute&&this._syncVolume()},range:[0,1],type:cc.Float,tooltip:!1},_mute:!1,mute:{get:function(){return this._mute},set:function(t){this._mute=t,this._syncVolume()},tooltip:!1},keepAspectRatio:{tooltip:!1,default:!0,type:cc.Boolean,notify:function(){this._impl&&this._impl.setKeepAspectRatioEnabled(this.keepAspectRatio)}},_isFullscreen:{default:!1,formerlySerializedAs:"_N$isFullscreen"},isFullscreen:{get:function(){return this._isFullscreen=this._impl&&this._impl.isFullScreenEnabled(),this._isFullscreen},set:function(t){this._isFullscreen=t,this._impl&&this._impl.setFullScreenEnabled(t)},animatable:!1,tooltip:!1},_stayOnBottom:!1,stayOnBottom:{get:function(){return this._stayOnBottom},set:function(t){this._stayOnBottom=t,this._impl&&this._impl.setStayOnBottom(t)},animatable:!1,tooltip:!1},videoPlayerEvent:{default:[],type:cc.Component.EventHandler}},statics:{EventType:n,ResourceType:r,Impl:i},ctor:function(){this._impl=new i,this._currentStatus=n.NONE},_syncVolume:function(){var t=this._impl;if(t){var e=this._mute?0:this._volume;t.setVolume(e)}},_updateVideoSource:function(){var t="";this.resourceType===r.REMOTE?t=this.remoteURL:this._clip&&(t=this._clip.nativeUrl),this._impl.setURL(t,this._mute||0===this._volume),this._impl.setKeepAspectRatioEnabled(this.keepAspectRatio)},onLoad:function(){var t=this._impl;t&&(t.createDomElementIfNeeded(this._mute||0===this._volume),t.setStayOnBottom(this._stayOnBottom),this._updateVideoSource(),t.seekTo(this.currentTime),t.setFullScreenEnabled(this._isFullscreen),this.pause(),t.setEventListener(n.PLAYING,this.onPlaying.bind(this)),t.setEventListener(n.PAUSED,this.onPasued.bind(this)),t.setEventListener(n.STOPPED,this.onStopped.bind(this)),t.setEventListener(n.COMPLETED,this.onCompleted.bind(this)),t.setEventListener(n.META_LOADED,this.onMetaLoaded.bind(this)),t.setEventListener(n.CLICKED,this.onClicked.bind(this)),t.setEventListener(n.READY_TO_PLAY,this.onReadyToPlay.bind(this)))},onRestore:function(){this._impl||(this._impl=new i)},onEnable:function(){this._impl&&this._impl.enable()},onDisable:function(){this._impl&&this._impl.disable()},onDestroy:function(){this._impl&&(this._impl.destroy(),this._impl=null)},update:function(){this._impl&&this._impl.updateMatrix(this.node)},onReadyToPlay:function(){this._currentStatus=n.READY_TO_PLAY,cc.Component.EventHandler.emitEvents(this.videoPlayerEvent,this,n.READY_TO_PLAY),this.node.emit("ready-to-play",this)},onMetaLoaded:function(){this._currentStatus=n.META_LOADED,cc.Component.EventHandler.emitEvents(this.videoPlayerEvent,this,n.META_LOADED),this.node.emit("meta-loaded",this)},onClicked:function(){this._currentStatus=n.CLICKED,cc.Component.EventHandler.emitEvents(this.videoPlayerEvent,this,n.CLICKED),this.node.emit("clicked",this)},onPlaying:function(){this._currentStatus=n.PLAYING,cc.Component.EventHandler.emitEvents(this.videoPlayerEvent,this,n.PLAYING),this.node.emit("playing",this)},onPasued:function(){this._currentStatus=n.PAUSED,cc.Component.EventHandler.emitEvents(this.videoPlayerEvent,this,n.PAUSED),this.node.emit("paused",this)},onStopped:function(){this._currentStatus=n.STOPPED,cc.Component.EventHandler.emitEvents(this.videoPlayerEvent,this,n.STOPPED),this.node.emit("stopped",this)},onCompleted:function(){this._currentStatus=n.COMPLETED,cc.Component.EventHandler.emitEvents(this.videoPlayerEvent,this,n.COMPLETED),this.node.emit("completed",this)},play:function(){this._impl&&(this._syncVolume(),this._impl.play())},resume:function(){this._impl&&(this._syncVolume(),this._impl.resume())},pause:function(){this._impl&&this._impl.pause()},stop:function(){this._impl&&this._impl.stop()},getDuration:function(){return this._impl?this._impl.duration():-1},isPlaying:function(){return!!this._impl&&this._impl.isPlaying()}});cc.VideoPlayer=e.exports=s}),{"./video-player-impl":407}],407:[(function(t,e){"use strict";var i=t("../core/platform/utils"),n=t("../core/platform/CCSys"),r=t("../core/platform/CCMacro"),s=1,a=4,o=cc.mat4(),l=cc.Class({name:"VideoPlayerImpl",ctor:function(){this._EventList={},this._video=null,this._url="",this._waitingFullscreen=!1,this._fullScreenEnabled=!1,this._stayOnBottom=!1,this._loadedmeta=!1,this._loaded=!1,this._visible=!1,this._playing=!1,this._ignorePause=!1,this._forceUpdate=!1,this._m00=0,this._m01=0,this._m04=0,this._m05=0,this._m12=0,this._m13=0,this._w=0,this._h=0,this.__eventListeners={}},_bindEvent:function(){var t=this._video,e=this,i=this.__eventListeners;i.loadedmetadata=function(){e._loadedmeta=!0,e._forceUpdate=!0,e._waitingFullscreen&&(e._waitingFullscreen=!1,e._toggleFullscreen(!0)),e._dispatchEvent(l.EventType.META_LOADED)},i.ended=function(){e._video===t&&(e._playing=!1,e._dispatchEvent(l.EventType.COMPLETED))},i.play=function(){e._video===t&&(e._playing=!0,e._updateVisibility(),e._dispatchEvent(l.EventType.PLAYING))},i.pause=function(){e._video===t&&(e._playing=!1,e._ignorePause||e._dispatchEvent(l.EventType.PAUSED))},i.click=function(){e._dispatchEvent(l.EventType.CLICKED)},t.addEventListener("loadedmetadata",i.loadedmetadata),t.addEventListener("ended",i.ended),t.addEventListener("play",i.play),t.addEventListener("pause",i.pause),t.addEventListener("click",i.click),i.onCanPlay=function(){if(!e._loaded&&!e._playing){var t=e._video;t.readyState!==a&&t.readyState!==s||(t.currentTime=0,e._loaded=!0,e._forceUpdate=!0,e._dispatchEvent(l.EventType.READY_TO_PLAY),e._updateVisibility())}},t.addEventListener("canplay",i.onCanPlay),t.addEventListener("canplaythrough",i.onCanPlay),t.addEventListener("suspend",i.onCanPlay)},_updateVisibility:function(){var t=this._video;t&&(this._visible?t.style.visibility="visible":(t.style.visibility="hidden",t.pause(),this._playing=!1))},_updateSize:function(t,e){var i=this._video;i&&(i.style.width=t+"px",i.style.height=e+"px")},_createDom:function(t){var e=document.createElement("video");e.style.position="absolute",e.style.bottom="0px",e.style.left="0px",e.style["z-index"]=this._stayOnBottom?r.MIN_ZINDEX:0,e.className="cocosVideo",e.setAttribute("preload","auto"),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""),e.setAttribute("playsinline",""),t&&e.setAttribute("muted",""),this._video=e,cc.game.container.appendChild(e)},createDomElementIfNeeded:function(t){this._video||this._createDom(t)},removeDom:function(){var t=this._video;if(t){i.contains(cc.game.container,t)&&cc.game.container.removeChild(t);var e=this.__eventListeners;t.removeEventListener("loadedmetadata",e.loadedmetadata),t.removeEventListener("ended",e.ended),t.removeEventListener("play",e.play),t.removeEventListener("pause",e.pause),t.removeEventListener("click",e.click),t.removeEventListener("canplay",e.onCanPlay),t.removeEventListener("canplaythrough",e.onCanPlay),t.removeEventListener("suspend",e.onCanPlay),e.loadedmetadata=null,e.ended=null,e.play=null,e.pause=null,e.click=null,e.onCanPlay=null}this._video=null,this._url=""},setURL:function(t,e){var i,n;if(this._url!==t){this.removeDom(),this._url=t,this.createDomElementIfNeeded(e),this._bindEvent();var r=this._video;r.style.visibility="hidden",this._loaded=!1,this._playing=!1,this._loadedmeta=!1,(i=document.createElement("source")).src=t,r.appendChild(i),n=cc.path.extname(t);for(var s=l._polyfill,a=0;a0&&(m[d-1].vfOffset=l),m.length=d,y.length=a;var v=f-1;if(v>=0)if(_>0){var g=n[v];g.indexCount=_,g.vfCount=5*u,g.vertexCount=u,n.length=f}else n.length=f-1;if(0!==n.length){var b=i.vertices,A=i.uintVert;(!b||b.length=0&&(_>0?((T=w[C]).indexCount=_,T.vertexCount=u,T.vfCount=5*u):f--),w[f]={tex:x,blendMode:v._blendMode,indexCount:0,vertexCount:0,vfCount:0},f++,_=0,u=0),A=(b.a*e<<24>>>0)+(b.b<<16)+(b.g<<8)+b.r,p!==A&&(p=A,d>0&&(S[d-1].vfOffset=l),S[d++]={r:b.r,g:b.g,b:b.b,a:b.a*e,vfOffset:0}),m=v._localVertices,y=v._indices,g=v._worldMatrix.m;for(var k=0,z=m.length;k":0}),h=(cc.Enum({REALTIME:0}),cc.Enum({REALTIME:0,SHARED_CACHE:1,PRIVATE_CACHE:2})),u=cc.Class({name:"dragonBones.ArmatureDisplay",extends:i,editor:!1,statics:{AnimationCacheMode:h},properties:{_factory:{default:null,type:dragonBones.CCFactory,serializable:!1},dragonAsset:{default:null,type:dragonBones.DragonBonesAsset,notify:function(){this._refresh()},tooltip:!1},dragonAtlasAsset:{default:null,type:dragonBones.DragonBonesAtlasAsset,notify:function(){this._parseDragonAtlasAsset(),this._refresh()},tooltip:!1},_armatureName:"",armatureName:{get:function(){return this._armatureName},set:function(t){this._armatureName=t;var e=this.getAnimationNames(this._armatureName);(!this.animationName||e.indexOf(this.animationName)<0)&&(this.animationName=""),this._armature&&!this.isAnimationCached()&&this._factory._dragonBones.clock.remove(this._armature),this._refresh(),this._armature&&!this.isAnimationCached()&&this._factory._dragonBones.clock.add(this._armature)},visible:!1},_animationName:"",animationName:{get:function(){return this._animationName},set:function(t){this._animationName=t},visible:!1},_defaultArmatureIndex:{default:0,notify:function(){var t="";if(this.dragonAsset){var e;if(this.dragonAsset&&(e=this.dragonAsset.getArmatureEnum()),!e)return cc.errorID(7400,this.name);t=e[this._defaultArmatureIndex]}void 0!==t?this.armatureName=t:cc.errorID(7401,this.name)},type:l,visible:!0,editorOnly:!0,animatable:!1,displayName:"Armature",tooltip:!1},_animationIndex:{default:0,notify:function(){var t;if(0!==this._animationIndex){if(this.dragonAsset&&(t=this.dragonAsset.getAnimsEnum(this.armatureName)),t){var e=t[this._animationIndex];void 0!==e?this.playAnimation(e,this.playTimes):cc.errorID(7402,this.name)}}else this.animationName=""},type:c,visible:!0,editorOnly:!0,animatable:!1,displayName:"Animation",tooltip:!1},_preCacheMode:-1,_cacheMode:h.REALTIME,_defaultCacheMode:{default:0,type:h,notify:function(){if(this._defaultCacheMode!==h.REALTIME&&this._armature&&!a.canCache(this._armature))return this._defaultCacheMode=h.REALTIME,void cc.warn("Animation cache mode doesn't support skeletal nesting");this.setAnimationCacheMode(this._defaultCacheMode)},editorOnly:!0,visible:!0,animatable:!1,displayName:"Animation Cache Mode",tooltip:!1},timeScale:{default:1,notify:function(){this._armature&&!this.isAnimationCached()&&(this._armature.animation.timeScale=this.timeScale)},tooltip:!1},playTimes:{default:-1,tooltip:!1},premultipliedAlpha:{default:!1,tooltip:!1},debugBones:{default:!1,notify:function(){this._updateDebugDraw()},tooltip:!1},enableBatch:{default:!1,notify:function(){this._updateBatch()},tooltip:!1},_armatureKey:"",_accTime:0,_playCount:0,_frameCache:null,_curFrame:null,_playing:!1,_armatureCache:null},ctor:function(){this._eventTarget=new n,this._materialCache={},this._inited=!1,this.attachUtil=new o,this._factory=dragonBones.CCFactory.getInstance()},onLoad:function(){for(var t=this.node.children,e=0,i=t.length;e=i.length){if(this._playCount++,this.playTimes>0&&this._playCount>=this.playTimes)return this._curFrame=i[i.length-1],this._accTime=0,this._playing=!1,this._playCount=0,void this._emitCacheCompleteEvent();this._accTime=0,s=0,this._emitCacheCompleteEvent()}this._curFrame=i[s]}else e.isInvalid()&&(e.updateToFrame(),this._curFrame=i[i.length-1])}}},onDestroy:function(){this._super(),this._inited=!1,this._cacheMode===h.PRIVATE_CACHE?(this._armatureCache.dispose(),this._armatureCache=null,this._armature=null):this._cacheMode===h.SHARED_CACHE?(this._armatureCache=null,this._armature=null):this._armature&&(this._armature.dispose(),this._armature=null)},_updateDebugDraw:function(){if(this.debugBones){if(!this._debugDraw){var t=new cc.PrivateNode;t.name="DEBUG_DRAW_NODE";var e=t.addComponent(r);e.lineWidth=1,e.strokeColor=cc.color(255,0,0,255),this._debugDraw=e}this._debugDraw.node.parent=this.node}else this._debugDraw&&(this._debugDraw.node.parent=null)},_buildArmature:function(){if(this.dragonAsset&&this.dragonAtlasAsset&&this.armatureName){this._armature&&(this._preCacheMode===h.PRIVATE_CACHE?this._armatureCache.dispose():this._preCacheMode===h.REALTIME&&this._armature.dispose(),this._armatureCache=null,this._armature=null,this._displayProxy=null,this._frameCache=null,this._curFrame=null,this._playing=!1,this._preCacheMode=null),this._cacheMode===h.SHARED_CACHE?this._armatureCache=a.sharedCache:this._cacheMode===h.PRIVATE_CACHE&&(this._armatureCache=new a,this._armatureCache.enablePrivateMode());var t=this.dragonAtlasAsset._uuid;if(this._armatureKey=this.dragonAsset.init(this._factory,t),this.isAnimationCached()&&(this._armature=this._armatureCache.getArmatureCache(this.armatureName,this._armatureKey,t),this._armature||(this._cacheMode=h.REALTIME)),this._preCacheMode=this._cacheMode,this._cacheMode===h.REALTIME){if(this._displayProxy=this._factory.buildArmatureDisplay(this.armatureName,this._armatureKey,"",t),!this._displayProxy)return;this._displayProxy._ccNode=this.node,this._displayProxy.setEventTarget(this._eventTarget),this._armature=this._displayProxy._armature,this._armature.animation.timeScale=this.timeScale}if(this._cacheMode!==h.REALTIME&&this.debugBones&&cc.warn("Debug bones is invalid in cached mode"),this._armature){var e=this._armature.armatureData.aabb;this.node.setContentSize(e.width,e.height)}this._updateBatch(),this.attachUtil.init(this),this.attachUtil._associateAttachedNode(),this.animationName&&this.playAnimation(this.animationName,this.playTimes),this.markForRender(!0)}},_parseDragonAtlasAsset:function(){this.dragonAtlasAsset&&this.dragonAtlasAsset.init(this._factory)},_refresh:function(){this._buildArmature()},_updateCacheModeEnum:!1,_updateAnimEnum:!1,_updateArmatureEnum:!1,playAnimation:function(t,e){if(this.playTimes=void 0===e?-1:e,this.animationName=t,this.isAnimationCached()){var i=this._armatureCache.getAnimationCache(this._armatureKey,t);i||(i=this._armatureCache.initAnimationCache(this._armatureKey,t)),i&&(this._accTime=0,this._playCount=0,this._frameCache=i,this.attachUtil._hasAttachedNode()&&this._frameCache.enableCacheAttachedInfo(),this._frameCache.updateToFrame(0),this._playing=!0,this._curFrame=this._frameCache.frames[0])}else if(this._armature)return this._armature.animation.play(t,this.playTimes)},updateAnimationCache:function(t){this.isAnimationCached()&&this._armatureCache.updateAnimationCache(this._armatureKey,t)},invalidAnimationCache:function(){this.isAnimationCached()&&this._armatureCache.invalidAnimationCache(this._armatureKey)},getArmatureNames:function(){var t=this._factory.getDragonBonesData(this._armatureKey);return t&&t.armatureNames||[]},getAnimationNames:function(t){var e=[],i=this._factory.getDragonBonesData(this._armatureKey);if(i){var n=i.getArmature(t);if(n)for(var r in n.animations)n.animations.hasOwnProperty(r)&&e.push(r)}return e},on:function(t,e,i){this.addEventListener(t,e,i)},off:function(t,e,i){this.removeEventListener(t,e,i)},once:function(t,e,i){this._eventTarget.once(t,e,i)},addEventListener:function(t,e,i){this._eventTarget.on(t,e,i)},removeEventListener:function(t,e,i){this._eventTarget.off(t,e,i)},buildArmature:function(t,e){return this._factory.createArmatureNode(this,t,e)},armature:function(){return this._armature}});e.exports=dragonBones.ArmatureDisplay=u}),{"../../cocos2d/core/components/CCRenderComponent":159,"../../cocos2d/core/event/event-target":185,"../../cocos2d/core/graphics/graphics":201,"../../cocos2d/core/renderer/render-flow":271,"./ArmatureCache":412,"./AttachUtil":414}],414:[(function(t,e){"use strict";var i,n=(i=t("../../cocos2d/core/value-types/mat4"))&&i.__esModule?i:{default:i},r=t("../../cocos2d/core/renderer/render-flow").FLAG_TRANSFORM,s=function(){},a=function(t){Object.defineProperty(t,"_worldMatDirty",{get:function(){return!0},set:function(){}}),t._calculWorldMatrix=s,t._mulMat=s},o=new n.default,l=cc.Class({name:"dragonBones.AttachUtil",ctor:function(){this._inited=!1,this._armature=null,this._armatureNode=null,this._armatureDisplay=null,this._attachedRootNode=null,this._attachedNodeArray=[],this._boneIndexToNode={}},init:function(t){this._inited=!0,this._armature=t._armature,this._armatureNode=t.node,this._armatureDisplay=t},reset:function(){this._inited=!1,this._armature=null,this._armatureNode=null,this._armatureDisplay=null},_prepareAttachNode:function(){if(this._armature){var t=this._armatureNode.getChildByName("ATTACHED_NODE_TREE");return t&&t.isValid||(t=new cc.Node("ATTACHED_NODE_TREE"),a(t),this._armatureNode.addChild(t)),this._armatureDisplay.isAnimationCached()&&this._armatureDisplay._frameCache&&this._armatureDisplay._frameCache.enableCacheAttachedInfo(),this._attachedRootNode=t,t}},_buildBoneAttachedNode:function(t,e){var i="ATTACHED_NODE:"+t.name,n=new cc.Node(i);return this._buildBoneRelation(n,t,e),n},_buildBoneRelation:function(t,e,i){a(t),t._bone=e,t._boneIndex=i,this._attachedNodeArray.push(t),this._boneIndexToNode[i]=t},getAttachedRootNode:function(){return this._attachedRootNode},getAttachedNodes:function(t){var e=this._attachedNodeArray,i=[];if(!this._inited)return i;for(var n=0,r=e.length;n=0;o--)if(s>=e[o]._zOrder){e.splice(o+1,0,r),a=!0;break}a||e.splice(0,0,r)}this._slots=e},_buildArmature:function(e){var i=t.borrowObject(dragonBones.Armature);i._skinData=e.skin,i._animation=t.borrowObject(dragonBones.Animation),i._animation._armature=i,i._animation.animations=e.armature.animations,i._isChildArmature=!1;var n=new dragonBones.CCArmatureDisplay;return i.init(e.armature,n,n,this._dragonBones),i},_buildSlot:function(e,i,n){var r=t.borrowObject(dragonBones.CCSlot),s=r;return r.init(i,n,s,s),r},getDragonBonesDataByUUID:function(t){for(var e in this._dragonBonesDataMap)if(-1!=e.indexOf(t))return this._dragonBonesDataMap[e];return null},removeDragonBonesDataByUUID:function(t,e){for(var i in void 0===e&&(e=!0),this._dragonBonesDataMap)-1!==i.indexOf(t)&&(e&&this._dragonBones.bufferObject(this._dragonBonesDataMap[i]),delete this._dragonBonesDataMap[i])}})}),{}],417:[(function(t){"use strict";var e,i=(e=t("../../cocos2d/core/value-types/mat4"))&&e.__esModule?e:{default:e},n=dragonBones.BinaryOffset,r=dragonBones.BoneType;dragonBones.CCSlot=cc.Class({name:"dragonBones.CCSlot",extends:dragonBones.Slot,ctor:function(){this._localVertices=[],this._indices=[],this._matrix=cc.mat4(),this._worldMatrix=cc.mat4(),this._worldMatrixDirty=!0,this._visible=!1,this._color=cc.color()},_onClear:function(){this._super(),this._localVertices.length=0,this._indices.length=0,i.default.identity(this._matrix),i.default.identity(this._worldMatrix),this._worldMatrixDirty=!0,this._color=cc.color(),this._visible=!1},statics:{toString:function(){return"[class dragonBones.CCSlot]"}},_onUpdateDisplay:function(){},_initDisplay:function(){},_addDisplay:function(){this._visible=!0},_replaceDisplay:function(){},_removeDisplay:function(){this._visible=!1},_disposeDisplay:function(){},_updateVisible:function(){this._visible=this.parent._visible},_updateZOrder:function(){},_updateBlendMode:function(){if(this._childArmature)for(var t=this._childArmature.getSlots(),e=0,i=t.length;e0&&s.inheritDeform,l=this._localVertices;if(a){var c=s.data,h=c.intArray,u=c.floatArray,_=h[s.offset+n.MeshVertexCount],f=h[a.offset+n.WeigthFloatOffset];f<0&&(f+=65536);for(var d=0,p=a.offset+n.WeigthBoneIndices+i.length,m=f,y=0,v=0;d<_;d++,v+=4){for(var g=h[p++],b=0,A=0,x=0;x0){for(var i=0,n=this._objects;i0){for(var r=0;ri&&(r.length=i),t._maxCountMap[n]=i;else for(var n in t._defaultMaxCount=i,t._poolsMap){var r;(r=t._poolsMap[n]).length>i&&(r.length=i),n in t._maxCountMap&&(t._maxCountMap[n]=i)}},t.clearPool=function(e){if(void 0===e&&(e=null),null!==e){var i=String(e);null!==(r=i in t._poolsMap?t._poolsMap[i]:null)&&r.length>0&&(r.length=0)}else for(var n in t._poolsMap){var r;(r=t._poolsMap[n]).length=0}},t.borrowObject=function(e){var i=String(e),n=i in t._poolsMap?t._poolsMap[i]:null;if(null!==n&&n.length>0){var r=n.pop();return r._isInPool=!1,r}var s=new e;return s._onClear(),s},t.prototype.returnToPool=function(){this._onClear(),t._returnObject(this)},t._hashCode=0,t._defaultMaxCount=3e3,t._maxCountMap={},t._poolsMap={},t})();t.BaseObject=e})(r||(r={})),(function(t){var e=(function(){function t(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.a=t,this.b=e,this.c=i,this.d=n,this.tx=r,this.ty=s}return 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){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},t.prototype.copyFromArray=function(t,e){return void 0===e&&(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],this},t.prototype.identity=function(){return this.a=this.d=1,this.b=this.c=0,this.tx=this.ty=0,this},t.prototype.concat=function(t){var e=this.a*t.a,i=0,n=0,r=this.d*t.d,s=this.tx*t.a+t.tx,a=this.ty*t.d+t.ty;return 0===this.b&&0===this.c||(e+=this.b*t.c,i+=this.b*t.d,n+=this.c*t.a,r+=this.c*t.b),0===t.b&&0===t.c||(i+=this.a*t.b,n+=this.d*t.c,s+=this.ty*t.c,a+=this.tx*t.b),this.a=e,this.b=i,this.c=n,this.d=r,this.tx=s,this.ty=a,this},t.prototype.invert=function(){var t=this.a,e=this.b,i=this.c,n=this.d,r=this.tx,s=this.ty;if(0===e&&0===i)return this.b=this.c=0,0===t||0===n?this.a=this.b=this.tx=this.ty=0:(t=this.a=1/t,n=this.d=1/n,this.tx=-t*r,this.ty=-n*s),this;var a=t*n-e*i;if(0===a)return this.a=this.d=1,this.b=this.c=0,this.tx=this.ty=0,this;a=1/a;var o=this.a=n*a;return e=this.b=-e*a,i=this.c=-i*a,n=this.d=t*a,this.tx=-(o*r+i*s),this.ty=-(e*r+n*s),this},t.prototype.transformPoint=function(t,e,i,n){void 0===n&&(n=!1),i.x=this.a*t+this.c*e,i.y=this.b*t+this.d*e,n||(i.x+=this.tx,i.y+=this.ty)},t.prototype.transformRectangle=function(t,e){void 0===e&&(e=!1);var i=this.a,n=this.b,r=this.c,s=this.d,a=e?0:this.tx,o=e?0:this.ty,l=t.x,c=t.y,h=l+t.width,u=c+t.height,_=i*l+r*c+a,f=n*l+s*c+o,d=i*h+r*c+a,p=n*h+s*c+o,m=i*h+r*u+a,y=n*h+s*u+o,v=i*l+r*u+a,g=n*l+s*u+o,b=0;_>d&&(b=_,_=d,d=b),m>v&&(b=m,m=v,v=b),t.x=Math.floor(_v?d:v)-t.x),f>p&&(b=f,f=p,p=b),y>g&&(b=y,y=g,g=b),t.y=Math.floor(fg?p:g)-t.y)},t})();t.Matrix=e})(r||(r={})),(function(t){var e=(function(){function t(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===s&&(s=1),this.x=t,this.y=e,this.skew=i,this.rotation=n,this.scaleX=r,this.scaleY=s}return t.normalizeRadian=function(t){return(t=(t+Math.PI)%(2*Math.PI))+(t>0?-Math.PI:Math.PI)},t.prototype.toString=function(){return"[object dragonBones.Transform] x:"+this.x+" y:"+this.y+" skewX:"+180*this.skew/Math.PI+" skewY:"+180*this.rotation/Math.PI+" scaleX:"+this.scaleX+" scaleY:"+this.scaleY},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.skew=t.skew,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this},t.prototype.identity=function(){return this.x=this.y=0,this.skew=this.rotation=0,this.scaleX=this.scaleY=1,this},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this.skew+=t.skew,this.rotation+=t.rotation,this.scaleX*=t.scaleX,this.scaleY*=t.scaleY,this},t.prototype.minus=function(t){return this.x-=t.x,this.y-=t.y,this.skew-=t.skew,this.rotation-=t.rotation,this.scaleX/=t.scaleX,this.scaleY/=t.scaleY,this},t.prototype.fromMatrix=function(e){var i=this.scaleX,n=this.scaleY,r=t.PI_Q;this.x=e.tx,this.y=e.ty,this.rotation=Math.atan(e.b/e.a);var s=Math.atan(-e.c/e.d);return this.scaleX=this.rotation>-r&&this.rotation-r&&s=0&&this.scaleX<0&&(this.scaleX=-this.scaleX,this.rotation=this.rotation-Math.PI),n>=0&&this.scaleY<0&&(this.scaleY=-this.scaleY,s-=Math.PI),this.skew=s-this.rotation,this},t.prototype.toMatrix=function(t){return 0===this.rotation?(t.a=1,t.b=0):(t.a=Math.cos(this.rotation),t.b=Math.sin(this.rotation)),0===this.skew?(t.c=-t.b,t.d=t.a):(t.c=-Math.sin(this.skew+this.rotation),t.d=Math.cos(this.skew+this.rotation)),1!==this.scaleX&&(t.a*=this.scaleX,t.b*=this.scaleX),1!==this.scaleY&&(t.c*=this.scaleY,t.d*=this.scaleY),t.tx=this.x,t.ty=this.y,this},t.PI=Math.PI,t.PI_D=2*Math.PI,t.PI_H=Math.PI/2,t.PI_Q=Math.PI/4,t.RAD_DEG=180/Math.PI,t.DEG_RAD=Math.PI/180,t})();t.Transform=e})(r||(r={})),(function(t){var e=(function(){function t(t,e,i,n,r,s,a,o){void 0===t&&(t=1),void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o=0),this.alphaMultiplier=t,this.redMultiplier=e,this.greenMultiplier=i,this.blueMultiplier=n,this.alphaOffset=r,this.redOffset=s,this.greenOffset=a,this.blueOffset=o}return 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},t})();t.ColorTransform=e})(r||(r={})),(function(t){var e=(function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t.prototype.clear=function(){this.x=this.y=0},t})();t.Point=e})(r||(r={})),(function(t){var e=(function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n}return 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},t})();t.Rectangle=e})(r||(r={})),(function(t){var e=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ints=[],e.floats=[],e.strings=[],e}return s(e,t),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){return void 0===t&&(t=0),t>=0&&t=0&&t=0&&t=t&&(i=0),!(this.sortedBones.indexOf(r)>=0)){var s=!1;for(var a in this.constraints){var o=this.constraints[a];if(o.root===r&&this.sortedBones.indexOf(o.target)<0){s=!0;break}}s||null!==r.parent&&this.sortedBones.indexOf(r.parent)<0||(this.sortedBones.push(r),n++)}}}},i.prototype.cacheFrames=function(t){if(!(this.cacheFrameRate>0))for(var e in this.cacheFrameRate=t,this.animations)this.animations[e].cacheFrames(this.cacheFrameRate)},i.prototype.setCacheFrame=function(t,e){var i=this.parent.cachedFrames,n=i.length;return i.length+=10,i[n]=t.a,i[n+1]=t.b,i[n+2]=t.c,i[n+3]=t.d,i[n+4]=t.tx,i[n+5]=t.ty,i[n+6]=e.rotation,i[n+7]=e.skew,i[n+8]=e.scaleX,i[n+9]=e.scaleY,n},i.prototype.getCacheFrame=function(t,e,i){var n=this.parent.cachedFrames;t.a=n[i],t.b=n[i+1],t.c=n[i+2],t.d=n[i+3],t.tx=n[i+4],t.ty=n[i+5],e.rotation=n[i+6],e.skew=n[i+7],e.scaleX=n[i+8],e.scaleY=n[i+9],e.x=t.tx,e.y=t.ty},i.prototype.addBone=function(t){t.name in this.bones?console.warn("Same bone: "+t.name):(this.bones[t.name]=t,this.sortedBones.push(t))},i.prototype.addSlot=function(t){t.name in this.slots?console.warn("Same slot: "+t.name):(this.slots[t.name]=t,this.sortedSlots.push(t))},i.prototype.addConstraint=function(t){t.name in this.constraints?console.warn("Same constraint: "+t.name):this.constraints[t.name]=t},i.prototype.addSkin=function(t){t.name in this.skins?console.warn("Same skin: "+t.name):(t.parent=this,this.skins[t.name]=t,null===this.defaultSkin&&(this.defaultSkin=t),"default"===t.name&&(this.defaultSkin=t))},i.prototype.addAnimation=function(t){t.name in this.animations?console.warn("Same animation: "+t.name):(t.parent=this,this.animations[t.name]=t,this.animationNames.push(t.name),null===this.defaultAnimation&&(this.defaultAnimation=t))},i.prototype.addAction=function(t,e){e?this.defaultActions.push(t):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.getMesh=function(t,e,i){var n=this.getSkin(t);return null===n?null:n.getDisplay(e,i)},i.prototype.getAnimation=function(t){return t in this.animations?this.animations[t]:null},i})(t.BaseObject);t.ArmatureData=e;var i=(function(e){function i(){var i=null!==e&&e.apply(this,arguments)||this;return i.transform=new t.Transform,i.userData=null,i}return s(i,e),i.toString=function(){return"[class dragonBones.BoneData]"},i.prototype._onClear=function(){null!==this.userData&&this.userData.returnToPool(),this.inheritTranslation=!1,this.inheritRotation=!1,this.inheritScale=!1,this.inheritReflection=!1,this.type=0,this.length=0,this.name="",this.transform.identity(),this.userData=null,this.parent=null},i})(t.BaseObject);t.BoneData=i;var n=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.vertices=[],e}return s(e,t),e.toString=function(){return"[class dragonBones.SurfaceData]"},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.type=1,this.segmentX=0,this.segmentY=0,this.vertices.length=0},e})(i);t.SurfaceData=n;var r=(function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.color=null,t.userData=null,t}return s(i,e),i.createColor=function(){return new t.ColorTransform},i.toString=function(){return"[class dragonBones.SlotData]"},i.prototype._onClear=function(){null!==this.userData&&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,i})(t.BaseObject);t.SlotData=r})(r||(r={})),(function(t){var e=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype._onClear=function(){this.order=0,this.name="",this.type=0,this.target=null,this.root=null,this.bone=null},e})(t.BaseObject);t.ConstraintData=e;var i=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.toString=function(){return"[class dragonBones.IKConstraintData]"},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.scaleEnabled=!1,this.bendPositive=!1,this.weight=1},e})(e);t.IKConstraintData=i;var n=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bones=[],e}return s(e,t),e.toString=function(){return"[class dragonBones.PathConstraintData]"},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.pathSlot=null,this.pathDisplayData=null,this.bones.length=0,this.positionMode=0,this.spacingMode=1,this.rotateMode=1,this.position=0,this.spacing=0,this.rotateOffset=0,this.rotateMix=0,this.translateMix=0},e.prototype.AddBone=function(t){this.bones.push(t)},e})(e);t.PathConstraintData=n})(r||(r={})),(function(t){var e=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.toString=function(){return"[class dragonBones.CanvasData]"},e.prototype._onClear=function(){this.hasBackground=!1,this.color=0,this.x=0,this.y=0,this.width=0,this.height=0},e})(t.BaseObject);t.CanvasData=e})(r||(r={})),(function(t){var e=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.displays={},e}return s(e,t),e.toString=function(){return"[class dragonBones.SkinData]"},e.prototype._onClear=function(){for(var t in this.displays){for(var e=0,i=this.displays[t];er&&(a|=2),es&&(a|=8),a},e.rectangleIntersectsSegment=function(t,i,n,r,s,a,o,l,c,h,u){void 0===c&&(c=null),void 0===h&&(h=null),void 0===u&&(u=null);var _=t>s&&ta&&is&&na&&r=-i&&t<=i){var n=.5*this.height;if(e>=-n&&e<=n)return!0}return!1},e.prototype.intersectsSegment=function(t,i,n,r,s,a,o){void 0===s&&(s=null),void 0===a&&(a=null),void 0===o&&(o=null);var l=.5*this.width,c=.5*this.height;return e.rectangleIntersectsSegment(t,i,n,r,-l,-c,l,c,s,a,o)},e})(e);t.RectangleBoundingBoxData=i;var n=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.toString=function(){return"[class dragonBones.EllipseData]"},e.ellipseIntersectsSegment=function(t,e,i,n,r,s,a,o,l,c,h){void 0===l&&(l=null),void 0===c&&(c=null),void 0===h&&(h=null);var u=a/o,_=u*u,f=i-t,d=(n*=u)-(e*=u),p=Math.sqrt(f*f+d*d),m=f/p,y=d/p,v=(r-t)*m+(s-e)*y,g=a*a,b=g-(t*t+e*e)+v*v,A=0;if(b>=0){var x=Math.sqrt(b),C=v-x,T=v+x,S=C<0?-1:C<=p?0:1,w=T<0?-1:T<=p?0:1,E=S*w;if(E<0)return-1;0===E&&(-1===S?(A=2,i=t+T*m,n=(e+T*y)/u,null!==l&&(l.x=i,l.y=n),null!==c&&(c.x=i,c.y=n),null!==h&&(h.x=Math.atan2(n/g*_,i/g),h.y=h.x+Math.PI)):1===w?(A=1,t+=C*m,e=(e+C*y)/u,null!==l&&(l.x=t,l.y=e),null!==c&&(c.x=t,c.y=e),null!==h&&(h.x=Math.atan2(e/g*_,t/g),h.y=h.x+Math.PI)):(A=3,null!==l&&(l.x=t+C*m,l.y=(e+C*y)/u,null!==h&&(h.x=Math.atan2(l.y/g*_,l.x/g))),null!==c&&(c.x=t+T*m,c.y=(e+T*y)/u,null!==h&&(h.y=Math.atan2(c.y/g*_,c.x/g)))))}return A},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.type=1},e.prototype.containsPoint=function(t,e){var i=.5*this.width;if(t>=-i&&t<=i){var n=.5*this.height;if(e>=-n&&e<=n)return e*=i/n,Math.sqrt(t*t+e*e)<=i}return!1},e.prototype.intersectsSegment=function(t,i,n,r,s,a,o){return void 0===s&&(s=null),void 0===a&&(a=null),void 0===o&&(o=null),e.ellipseIntersectsSegment(t,i,n,r,0,0,.5*this.width,.5*this.height,s,a,o)},e})(e);t.EllipseBoundingBoxData=n;var r=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.vertices=[],e}return s(e,t),e.toString=function(){return"[class dragonBones.PolygonBoundingBoxData]"},e.polygonIntersectsSegment=function(t,e,i,n,r,s,a,o){void 0===s&&(s=null),void 0===a&&(a=null),void 0===o&&(o=null),t===i&&(t=i+1e-6),e===n&&(e=n+1e-6);for(var l=r.length,c=t-i,h=e-n,u=t*n-e*i,_=0,f=r[l-2],d=r[l-1],p=0,m=0,y=0,v=0,g=0,b=0,A=0;A=f&&M<=x||M>=x&&M<=f)&&(0===c||M>=t&&M<=i||M>=i&&M<=t)){var D=(u*S-h*w)/E;if((D>=d&&D<=C||D>=C&&D<=d)&&(0===h||D>=e&&D<=n||D>=n&&D<=e)){if(null===a){y=M,v=D,g=M,b=D,_++,null!==o&&(o.x=Math.atan2(C-d,x-f)-.5*Math.PI,o.y=o.x);break}var B=M-t;B<0&&(B=-B),0===_?(p=B,m=B,y=M,v=D,g=M,b=D,null!==o&&(o.x=Math.atan2(C-d,x-f)-.5*Math.PI,o.y=o.x)):(Bm&&(m=B,g=M,b=D,null!==o&&(o.y=Math.atan2(C-d,x-f)-.5*Math.PI))),_++}}f=x,d=C}return 1===_?(null!==s&&(s.x=y,s.y=v),null!==a&&(a.x=y,a.y=v),null!==o&&(o.y=o.x+Math.PI)):_>1&&(_++,null!==s&&(s.x=y,s.y=v),null!==a&&(a.x=g,a.y=b)),_},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.type=2,this.x=0,this.y=0,this.vertices.length=0},e.prototype.containsPoint=function(t,e){var i=!1;if(t>=this.x&&t<=this.width&&e>=this.y&&e<=this.height)for(var n=0,r=this.vertices.length,s=r-2;n=e||a=e){var l=this.vertices[s],c=this.vertices[n];(e-o)*(l-c)/(a-o)+c0)){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,n=this.cacheFrames.length;i=0},e.prototype.addBoneMask=function(t,e,i){void 0===i&&(i=!0);var n=t.getBone(e);if(null!==n&&(this.boneMask.indexOf(e)<0&&this.boneMask.push(e),i))for(var r=0,s=t.getBones();r=0&&this.boneMask.splice(n,1),i){var r=t.getBone(e);if(null!==r)if(this.boneMask.length>0)for(var s=0,a=t.getBones();s=0&&r.contains(o)&&this.boneMask.splice(l,1)}else for(var c=0,h=t.getBones();ce._zOrder?1:-1},e.prototype._onClear=function(){null!==this._clock&&this._clock.remove(this);for(var t=0,e=this._bones;t=s)){var o=i[a],l=this.getSlot(o.name);null!==l&&l._setZorder(r)}}this._slotsDirty=!0,this._zOrderDirty=!n}},e.prototype._addBone=function(t){this._bones.indexOf(t)<0&&this._bones.push(t)},e.prototype._addSlot=function(t){this._slots.indexOf(t)<0&&this._slots.push(t)},e.prototype._addConstraint=function(t){this._constraints.indexOf(t)<0&&this._constraints.push(t)},e.prototype._bufferAction=function(t,e){this._actions.indexOf(t)<0&&(e?this._actions.push(t):this._actions.unshift(t))},e.prototype.dispose=function(){null!==this._armatureData&&(this._lockUpdate=!0,this._dragonBones.bufferObject(this))},e.prototype.init=function(t,e,n,r){null===this._armatureData&&(this._armatureData=t,this._animation=i.BaseObject.borrowObject(i.Animation),this._proxy=e,this._display=n,this._dragonBones=r,this._proxy.dbInit(this),this._animation.init(this),this._animation.animations=this._armatureData.animations)},e.prototype.advanceTime=function(t){if(!this._lockUpdate)if(null!==this._armatureData)if(null!==this._armatureData.parent){var i=this._cacheFrameIndex;if(this._animation.advanceTime(t),this._slotsDirty&&(this._slotsDirty=!1,this._slots.sort(e._onSortSlots)),this._cacheFrameIndex<0||this._cacheFrameIndex!==i){var n=0,r=0;for(n=0,r=this._bones.length;n0){this._lockUpdate=!0;for(var s=0,a=this._actions;s0){if(null!==(a=this.getBone(t))&&(a.invalidUpdate(),e))for(var i=0,n=this._slots;i0){if(null===r&&null===s){m=b;break}var A;null!==r&&((A=o?r.y-e:r.x-t)<0&&(A=-A),(null===m||Ac)&&(c=A,_=s.x,f=s.y,y=b,null!==a&&(p=a.y)))}}return null!==m&&null!==r&&(r.x=h,r.y=u,null!==a&&(a.x=d)),null!==y&&null!==s&&(s.x=_,s.y=f,null!==a&&(a.y=p)),m},e.prototype.getBone=function(t){for(var e=0,i=this._bones;e=0&&null!==this._cachedFrameIndices){var e=this._cachedFrameIndices[t];if(e>=0&&this._cachedFrameIndex===e)this._transformDirty=!1;else if(e>=0)this._transformDirty=!0,this._cachedFrameIndex=e;else{if(this._hasConstraint)for(var i=0,n=this._armature._constraints;i=0?(this._transformDirty=!1,this._cachedFrameIndices[t]=this._cachedFrameIndex):(this._transformDirty=!0,this._cachedFrameIndex=-1)}}else{if(this._hasConstraint)for(var r=0,s=this._armature._constraints;r=0;this._localDirty&&this._updateGlobalTransformMatrix(o),o&&null!==this._cachedFrameIndices&&(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 this._childrenTransformDirty&&(this._childrenTransformDirty=!1);this._localDirty=!0},i.prototype.updateByConstraint=function(){this._localDirty&&(this._localDirty=!1,(this._transformDirty||null!==this._parent&&this._parent._childrenTransformDirty)&&this._updateGlobalTransformMatrix(!0),this._transformDirty=!0)},i.prototype.invalidUpdate=function(){this._transformDirty=!0},i.prototype.contains=function(t){if(t===this)return!1;for(var e=t;e!==this&&null!==e;)e=e.parent;return e===this},Object.defineProperty(i.prototype,"boneData",{get:function(){return this._boneData},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(t){if(this._visible!==t){this._visible=t;for(var e=0,i=this._armature.getSlots();e=s)return this.globalTransformMatrix;if(d=7*(2*(o*(l+1)+2*o+l+f)+((r=i>this._kX*(t+s)+m)?1:0)),this._matrixCahce[d]>0)v.copyFromArray(y,d+1);else{var g=f*(c+2),b=this._hullCache[4],A=this._hullCache[5],x=this._hullCache[2]-(l-f)*b,C=this._hullCache[3]-(l-f)*A,T=this._vertices;r?this._getAffineTransform(-s,m+u,800,u,T[g+c+2],T[g+c+3],x+b,C+A,T[g],T[g+1],e._helpTransform,v,!0):this._getAffineTransform(-n,m,800,u,x,C,T[g],T[g+1],x+b,C+A,e._helpTransform,v,!1),y[d]=1,y[d+1]=v.a,y[d+2]=v.b,y[d+3]=v.c,y[d+4]=v.d,y[d+5]=v.tx,y[d+6]=v.ty}}else if(t>=s){if(i<-s||i>=s)return this.globalTransformMatrix;d=7*(2*(o*(l+1)+o+f)+((r=i>this._kX*(t-n)+m)?1:0)),this._matrixCahce[d]>0?v.copyFromArray(y,d+1):(g=(f+1)*(c+2)-2,b=this._hullCache[4],A=this._hullCache[5],x=this._hullCache[0]+f*b,C=this._hullCache[1]+f*A,T=this._vertices,r?this._getAffineTransform(n,m+u,800,u,x+b,C+A,T[g+c+2],T[g+c+3],x,C,e._helpTransform,v,!0):this._getAffineTransform(s,m,800,u,T[g],T[g+1],x,C,T[g+c+2],T[g+c+3],e._helpTransform,v,!1),y[d]=1,y[d+1]=v.a,y[d+2]=v.b,y[d+3]=v.c,y[d+4]=v.d,y[d+5]=v.tx,y[d+6]=v.ty)}else if(i<-s){if(t<-s||t>=s)return this.globalTransformMatrix;d=7*(o*(l+1)+2*_+((r=i>this._kY*(t-p-h)-n)?1:0)),this._matrixCahce[d]>0?v.copyFromArray(y,d+1):(g=2*_,b=this._hullCache[10],A=this._hullCache[11],x=this._hullCache[8]+_*b,C=this._hullCache[9]+_*A,T=this._vertices,r?this._getAffineTransform(p+h,-s,h,800,T[g+2],T[g+3],T[g],T[g+1],x+b,C+A,e._helpTransform,v,!0):this._getAffineTransform(p,-n,h,800,x,C,x+b,C+A,T[g],T[g+1],e._helpTransform,v,!1),y[d]=1,y[d+1]=v.a,y[d+2]=v.b,y[d+3]=v.c,y[d+4]=v.d,y[d+5]=v.tx,y[d+6]=v.ty)}else if(i>=s){if(t<-s||t>=s)return this.globalTransformMatrix;d=7*(2*(o*(l+1)+o+l+f)+((r=i>this._kY*(t-p-h)+s)?1:0)),this._matrixCahce[d]>0?v.copyFromArray(y,d+1):(g=l*(c+2)+2*_,b=this._hullCache[10],A=this._hullCache[11],x=this._hullCache[6]-(o-_)*b,C=this._hullCache[7]-(o-_)*A,T=this._vertices,r?this._getAffineTransform(p+h,n,h,800,x+b,C+A,x,C,T[g+2],T[g+3],e._helpTransform,v,!0):this._getAffineTransform(p,s,h,800,T[g],T[g+1],T[g+2],T[g+3],x,C,e._helpTransform,v,!1),y[d]=1,y[d+1]=v.a,y[d+2]=v.b,y[d+3]=v.c,y[d+4]=v.d,y[d+5]=v.tx,y[d+6]=v.ty)}else d=7*(2*(o*f+_)+((r=i>this._k*(t-p-h)+m)?1:0)),this._matrixCahce[d]>0?v.copyFromArray(y,d+1):(g=2*_+f*(c+2),T=this._vertices,r?this._getAffineTransform(p+h,m+u,h,u,T[g+c+4],T[g+c+5],T[g+c+2],T[g+c+3],T[g+2],T[g+3],e._helpTransform,v,!0):this._getAffineTransform(p,m,h,u,T[g],T[g+1],T[g+2],T[g+3],T[g+c+2],T[g+c+3],e._helpTransform,v,!1),y[d]=1,y[d+1]=v.a,y[d+2]=v.b,y[d+3]=v.c,y[d+4]=v.d,y[d+5]=v.tx,y[d+6]=v.ty);return v},e.prototype.init=function(e,i){if(null===this._boneData){t.prototype.init.call(this,e,i);var n=e.segmentX,r=e.segmentY,s=e.vertices.length;this._dX=400/n,this._dY=400/r,this._k=-this._dY/this._dX,this._kX=-this._dY/800,this._kY=-800/this._dX,this._vertices.length=s,this._deformVertices.length=s,this._matrixCahce.length=14*(n*r+2*n+2*r),this._hullCache.length=10;for(var a=0;a=0&&null!==this._cachedFrameIndices){var i=this._cachedFrameIndices[t];if(i>=0&&this._cachedFrameIndex===i)this._transformDirty=!1;else if(i>=0)this._transformDirty=!0,this._cachedFrameIndex=i;else{if(this._hasConstraint)for(var n=0,r=this._armature._constraints;n=0?(this._transformDirty=!1,this._cachedFrameIndices[t]=this._cachedFrameIndex):(this._transformDirty=!0,this._cachedFrameIndex=-1)}}else{if(this._hasConstraint)for(var s=0,a=this._armature._constraints;s=0;this._localDirty&&this._updateGlobalTransformMatrix(h),h&&null!==this._cachedFrameIndices&&(this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global))}else this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex);var u=2*this.global.x,_=2*this.global.y,f=e._helpPoint;this.globalTransformMatrix.transformPoint(1e3,-200,f),this._hullCache[0]=f.x,this._hullCache[1]=f.y,this._hullCache[2]=u-f.x,this._hullCache[3]=_-f.y,this.globalTransformMatrix.transformPoint(0,this._dY,f,!0),this._hullCache[4]=f.x,this._hullCache[5]=f.y,this.globalTransformMatrix.transformPoint(200,1e3,f),this._hullCache[6]=f.x,this._hullCache[7]=f.y,this._hullCache[8]=u-f.x,this._hullCache[9]=_-f.y,this.globalTransformMatrix.transformPoint(this._dX,0,f,!0),this._hullCache[10]=f.x,this._hullCache[11]=f.y}else this._childrenTransformDirty&&(this._childrenTransformDirty=!1);this._localDirty=!0},e})(t.Bone);t.Surface=e})(r||(r={})),(function(t){var e=(function(e){function i(){var i=null!==e&&e.apply(this,arguments)||this;return i._localMatrix=new t.Matrix,i._colorTransform=new t.ColorTransform,i._displayDatas=[],i._displayList=[],i._deformVertices=null,i._rawDisplay=null,i._meshDisplay=null,i}return s(i,e),i.prototype._onClear=function(){e.prototype._onClear.call(this);for(var i=[],n=0,r=this._displayList;n=0&&(null!==this._rawDisplayDatas&&(s=this._displayIndex=0&&this._displayIndex=0&&null!==this._rawDisplayDatas){var a=this._displayIndex0)for(var o=0,l=s;o0){this._displayList.length!==e.length&&(this._displayList.length=e.length);for(var i=0,n=e.length;i0&&(this._displayList.length=0);return this._displayIndex>=0&&this._displayIndex=0&&null!==this._cachedFrameIndices){var e=this._cachedFrameIndices[t];e>=0&&this._cachedFrameIndex===e?this._transformDirty=!1:e>=0?(this._transformDirty=!0,this._cachedFrameIndex=e):this._transformDirty||this._parent._childrenTransformDirty?(this._transformDirty=!0,this._cachedFrameIndex=-1):this._cachedFrameIndex>=0?(this._transformDirty=!1,this._cachedFrameIndices[t]=this._cachedFrameIndex):(this._transformDirty=!0,this._cachedFrameIndex=-1)}else(this._transformDirty||this._parent._childrenTransformDirty)&&(t=-1,this._transformDirty=!0,this._cachedFrameIndex=-1);if(null!==this._display){if(this._visibleDirty&&(this._visibleDirty=!1,this._updateVisible()),this._blendModeDirty&&(this._blendModeDirty=!1,this._updateBlendMode()),this._colorDirty&&(this._colorDirty=!1,this._updateColor()),null!==this._deformVertices&&null!==this._deformVertices.verticesData&&this._display===this._meshDisplay){var i=null!==this._deformVertices.verticesData.weight,n=0!==this._parent._boneData.type;if((this._deformVertices.verticesDirty||i&&this._deformVertices.isBonesUpdate()||n&&this._parent._childrenTransformDirty)&&(this._deformVertices.verticesDirty=!1,this._updateMesh()),i||n)return}if(this._transformDirty){if(this._transformDirty=!1,this._cachedFrameIndex<0){var r=t>=0;this._updateGlobalTransformMatrix(r),r&&null!==this._cachedFrameIndices&&(this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global))}else this._isFromCache=!0,this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex);this._updateTransform()}}},i.prototype.updateTransformAndMatrix=function(){this._transformDirty&&(this._transformDirty=!1,this._updateGlobalTransformMatrix(!1))},i.prototype.replaceDisplayData=function(t,e){if(void 0===e&&(e=-1),e<0&&(e=this._displayIndex<0?0:this._displayIndex),this._displayDatas.length<=e){this._displayDatas.length=e+1;for(var i=0,n=this._displayDatas.length;i0&&(1===l||2===l?null!==s?(this.globalTransformMatrix.transformPoint(s.x,s.y,s),null!==a&&(a.x=s.x,a.y=s.y)):null!==a&&this.globalTransformMatrix.transformPoint(a.x,a.y,a):(null!==s&&this.globalTransformMatrix.transformPoint(s.x,s.y,s),null!==a&&this.globalTransformMatrix.transformPoint(a.x,a.y,a)),null!==o&&(this.globalTransformMatrix.transformPoint(Math.cos(o.x),Math.sin(o.x),i._helpPoint,!0),o.x=Math.atan2(i._helpPoint.y,i._helpPoint.x),this.globalTransformMatrix.transformPoint(Math.cos(o.y),Math.sin(o.y),i._helpPoint,!0),o.y=Math.atan2(i._helpPoint.y,i._helpPoint.x))),l},i.prototype.invalidUpdate=function(){this._displayDirty=!0,this._transformDirty=!0},Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible!==t&&(this._visible=t,this._updateVisible())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"displayIndex",{get:function(){return this._displayIndex},set:function(t){this._setDisplayIndex(t)&&this.update(-1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this._slotData.name},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"displayList",{get:function(){return this._displayList.concat()},set:function(e){var i=this._displayList.concat(),n=new Array;this._setDisplayList(e)&&this.update(-1);for(var r=0,s=i;rd)continue}for(;;H++){var V=p[H];if(!(F>V)){0===H?F/=V:F=(F-(z=p[H-1]))/(V-z);break}}if(H!==_){_=H;var N=6*H;for(T=c[N],S=c[N+1],w=c[N+2],E=c[N+3],M=c[N+4],D=c[N+5],b=2*(m=.03*(T-2*w+M))+(v=.006*(3*(w-M)-T+(B=c[N+6]))),A=2*(y=.03*(S-2*E+D))+(g=.006*(3*(E-D)-S+(I=c[N+7]))),x=.3*(w-T)+m+.16666667*v,C=.3*(E-S)+y+.16666667*g,O=Math.sqrt(x*x+C*C),R[0]=O,N=1;N<8;N++)x+=b,C+=A,b+=v,A+=g,O+=Math.sqrt(x*x+C*C),R[N]=O;x+=b,C+=A,O+=Math.sqrt(x*x+C*C),R[8]=O,x+=b+v,C+=A+g,O+=Math.sqrt(x*x+C*C),R[9]=O,L=0}for(F*=O;;L++){var k=R[L];if(!(F>k)){var z;0===L?F/=k:F=L+(F-(z=R[L-1]))/(k-z);break}}this.addCurvePosition(.1*F,T,S,w,E,M,D,B,I,a,j,i)}}else{var G=t.curveLengths;if(d=G[u-=l?1:2],n&&(f*=d),r)for(var U=0;Ud)continue}for(var W=0;;H++){var X=G[H];if(!(f>X)){if(0===H)W=f/X;else{var Y=G[H-1];W=(f-Y)/(X-Y)}break}}H!==_&&(_=H,l&&H===u?(this._computeVertices(h-4,4,0,c),this._computeVertices(0,4,4,c)):this._computeVertices(6*H+2,8,0,c)),this.addCurvePosition(W,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],a,j,i)}}},i.prototype.addCurvePosition=function(t,e,i,n,r,s,a,o,l,c,h,u){if(0===t)return c[h]=e,c[h+1]=i,void(c[h+2]=0);if(1===t)return c[h]=o,c[h+1]=l,void(c[h+2]=0);var _=1-t,f=_*_,d=t*t,p=f*_,m=f*t*3,y=_*d*3,v=t*d,g=p*e+m*n+y*s+v*o,b=p*i+m*r+y*a+v*l;c[h]=g,c[h+1]=b,c[h+2]=u?Math.atan2(b-(p*i+m*r+y*a),g-(p*e+m*n+y*s)):0},i.prototype.init=function(t,e){this._constraintData=t,this._armature=e;var i=t;this.pathOffset=i.pathDisplayData.vertices.offset,this.position=i.position,this.spacing=i.spacing,this.rotateOffset=i.rotateOffset,this.rotateMix=i.rotateMix,this.translateMix=i.translateMix,this._root=this._armature.getBone(i.root.name),this._target=this._armature.getBone(i.target.name),this._pathSlot=this._armature.getSlot(i.pathSlot.name);for(var n=0,r=i.bones.length;n0?t.Transform.DEG_RAD:-t.Transform.DEG_RAD));for(var M=this.rotateMix,D=this.translateMix,B=(y=0,3);y0){var V=P.a,N=P.b,k=P.c,z=P.d,G=void 0,U=void 0,j=void 0;if(G=_?T[B-1]:Math.atan2(O,R),G-=Math.atan2(N,V),C){U=Math.cos(G),j=Math.sin(G);var H=I._boneData.length;w+=(H*(U*V-j*N)-R)*M,E+=(H*(j*V+U*N)-O)*M}else G+=S;G>t.Transform.PI?G-=t.Transform.PI_D:G<-t.Transform.PI&&(G+=t.Transform.PI_D),G*=M,U=Math.cos(G),j=Math.sin(G),P.a=U*V-j*N,P.b=j*V+U*N,P.c=U*k-j*z,P.d=j*k+U*z}I.global.fromMatrix(P)}this.dirty=!1}}},i.prototype.invalidUpdate=function(){},i})(e);t.PathConstraint=n})(r||(r={})),(function(t){var e=(function(){function t(t){void 0===t&&(t=0),this.time=0,this.timeScale=1,this._systemTime=0,this._animatebles=[],this._clock=null,this.time=t,this._systemTime=.001*(new Date).getTime()}return t.prototype.advanceTime=function(t){t!=t&&(t=0);var e=.001*Date.now();if(t<0&&(t=e-this._systemTime),this._systemTime=e,1!==this.timeScale&&(t*=this.timeScale),0!==t){t<0?this.time-=t:this.time+=t;for(var i=0,n=0,r=this._animatebles.length;i0&&(this._animatebles[i-n]=s,this._animatebles[i]=null),s.advanceTime(t)):n++}if(n>0){for(r=this._animatebles.length;i=0&&(this._animatebles[e]=null,t.clock=null)},t.prototype.clear=function(){for(var t=0,e=this._animatebles;t0&&d._subFadeState>0)this._armature._dragonBones.bufferObject(d),this._animationStates.length=0,this._lastAnimationState=null;else{var i=d._animationData,n=i.cacheFrameRate;if(this._animationDirty&&n>0){this._animationDirty=!1;for(var r=0,s=this._armature.getBones();r0){var u=h[0];if(null!==u&&u.parent===this._armature.armatureData.defaultSkin){c._cachedFrameIndices=i.getSlotCachedFrameIndices(c.name);continue}}c._cachedFrameIndices=null}}d.advanceTime(t,n)}else if(e>1){for(var _=0,f=0;_0&&d._subFadeState>0?(f++,this._armature._dragonBones.bufferObject(d),this._animationDirty=!0,this._lastAnimationState===d&&(this._lastAnimationState=null)):(f>0&&(this._animationStates[_-f]=d),d.advanceTime(t,0)),_===e-1&&f>0&&(this._animationStates.length-=f,null===this._lastAnimationState&&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?(e.position<0?(e.position%=n.duration,e.position=n.duration-e.position):e.position===n.duration?e.position-=1e-6:e.position>n.duration&&(e.position%=n.duration),e.duration>0&&e.position+e.duration>n.duration&&(e.duration=n.duration-e.position),e.playTimes<0&&(e.playTimes=n.playTimes)):(e.playTimes=1,e.position=0,e.duration>0&&(e.duration=0)),0===e.duration&&(e.duration=-1),this._fadeOut(e);var o=t.BaseObject.borrowObject(t.AnimationState);if(o.init(this._armature,n,e),this._animationDirty=!0,this._armature._cacheFrameIndex=-1,this._animationStates.length>0){for(var l=!1,c=0,h=this._animationStates.length;cthis._animationStates[c].layer){l=!0,this._animationStates.splice(c,0,o);break}if(c!==h-1&&o.layer>this._animationStates[c+1].layer){l=!0,this._animationStates.splice(c+1,0,o);break}}l||this._animationStates.push(o)}else this._animationStates.push(o);for(var u=0,_=this._armature.getSlots();u<_.length;u++){var f=_[u].childArmature;null!==f&&f.inheritAnimation&&f.animation.hasAnimation(i)&&null===f.animation.getState(i)&&f.animation.fadeIn(i)}var d=!1;for(var p in n.animationTimelines){this._lockUpdate||(d=!0,this._lockUpdate=!0);var m=this.fadeIn(p,e.fadeInTime,1,o.layer,null,0);null!==m&&(m.resetToPose=!1,m._parent=o,m.stop())}return d&&(this._lockUpdate=!1),this._lockUpdate||(e.fadeInTime<=0&&this._armature.advanceTime(0),this._lastAnimationState=o),o},i.prototype.play=function(t,e){if(void 0===t&&(t=null),void 0===e&&(e=-1),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.playTimes=e,this._animationConfig.fadeInTime=0,this._animationConfig.animation=null!==t?t:"",null!==t&&t.length>0)this.playConfig(this._animationConfig);else if(null===this._lastAnimationState){var i=this._armature.armatureData.defaultAnimation;null!==i&&(this._animationConfig.animation=i.name,this.playConfig(this._animationConfig))}else this._lastAnimationState.isPlaying||this._lastAnimationState.isCompleted?(this._animationConfig.animation=this._lastAnimationState.name,this.playConfig(this._animationConfig)):this._lastAnimationState.play();return this._lastAnimationState},i.prototype.fadeIn=function(t,e,i,n,r,s){return void 0===e&&(e=-1),void 0===i&&(i=-1),void 0===n&&(n=0),void 0===r&&(r=null),void 0===s&&(s=3),this._animationConfig.clear(),this._animationConfig.fadeOutMode=s,this._animationConfig.playTimes=i,this._animationConfig.layer=n,this._animationConfig.fadeInTime=e,this._animationConfig.animation=t,this._animationConfig.group=null!==r?r:"",this.playConfig(this._animationConfig)},i.prototype.gotoAndPlayByTime=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=-1),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.playTimes=i,this._animationConfig.position=e,this._animationConfig.fadeInTime=0,this._animationConfig.animation=t,this.playConfig(this._animationConfig)},i.prototype.gotoAndPlayByFrame=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=-1),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.playTimes=i,this._animationConfig.fadeInTime=0,this._animationConfig.animation=t;var n=t in this._animations?this._animations[t]:null;return null!==n&&(this._animationConfig.position=n.duration*e/n.frameCount),this.playConfig(this._animationConfig)},i.prototype.gotoAndPlayByProgress=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=-1),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.playTimes=i,this._animationConfig.fadeInTime=0,this._animationConfig.animation=t;var n=t in this._animations?this._animations[t]:null;return null!==n&&(this._animationConfig.position=n.duration*(e>0?e:0)),this.playConfig(this._animationConfig)},i.prototype.gotoAndStopByTime=function(t,e){void 0===e&&(e=0);var i=this.gotoAndPlayByTime(t,e,1);return null!==i&&i.stop(),i},i.prototype.gotoAndStopByFrame=function(t,e){void 0===e&&(e=0);var i=this.gotoAndPlayByFrame(t,e,1);return null!==i&&i.stop(),i},i.prototype.gotoAndStopByProgress=function(t,e){void 0===e&&(e=0);var i=this.gotoAndPlayByProgress(t,e,1);return null!==i&&i.stop(),i},i.prototype.getState=function(t){for(var e=this._animationStates.length;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:!0,configurable:!0}),Object.defineProperty(i.prototype,"lastAnimationName",{get:function(){return null!==this._lastAnimationState?this._lastAnimationState.name:""},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationNames",{get:function(){return this._animationNames},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations},set:function(t){if(this._animations!==t){for(var e in this._animationNames.length=0,this._animations)delete this._animations[e];for(var e in t)this._animationNames.push(e),this._animations[e]=t[e]}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationConfig",{get:function(){return this._animationConfig.clear(),this._animationConfig},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lastAnimationState",{get:function(){return this._lastAnimationState},enumerable:!0,configurable:!0}),i.prototype.gotoAndPlay=function(t,e,i,n,r,s,a,o,l){void 0===e&&(e=-1),void 0===i&&(i=-1),void 0===n&&(n=-1),void 0===r&&(r=0),void 0===s&&(s=null),void 0===a&&(a=3),void 0===o&&(o=!0),void 0===l&&(l=!0),console.warn("Deprecated."),this._animationConfig.clear(),this._animationConfig.resetToPose=!0,this._animationConfig.fadeOutMode=a,this._animationConfig.playTimes=n,this._animationConfig.layer=r,this._animationConfig.fadeInTime=e,this._animationConfig.animation=t,this._animationConfig.group=null!==s?s:"";var c=this._animations[t];return c&&i>0&&(this._animationConfig.timeScale=c.duration/i),this.playConfig(this._animationConfig)},i.prototype.gotoAndStop=function(t,e){return void 0===e&&(e=0),console.warn("Deprecated."),this.gotoAndStopByTime(t,e)},Object.defineProperty(i.prototype,"animationList",{get:function(){return console.warn("Deprecated."),this._animationNames},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationDataList",{get:function(){console.warn("Deprecated.");for(var t=[],e=0,i=this._animationNames.length;e0;if(this._subFadeState<0){this._subFadeState=0;var r=n?t.EventObject.FADE_OUT:t.EventObject.FADE_IN;this._armature.eventDispatcher.hasDBEventListener(r)&&((i=t.BaseObject.borrowObject(t.EventObject)).type=r,i.armature=this._armature,i.animationState=this,this._armature._dragonBones.bufferEvent(i))}(e<0&&(e=-e),this._fadeTime+=e,this._fadeTime>=this.fadeTotalTime?(this._subFadeState=1,this._fadeProgress=n?0:1):this._fadeTime>0?this._fadeProgress=n?1-this._fadeTime/this.fadeTotalTime:this._fadeTime/this.fadeTotalTime:this._fadeProgress=n?1:0,this._subFadeState>0)&&(n||(this._playheadState|=1,this._fadeState=0),r=n?t.EventObject.FADE_OUT_COMPLETE:t.EventObject.FADE_IN_COMPLETE,this._armature.eventDispatcher.hasDBEventListener(r)&&((i=t.BaseObject.borrowObject(t.EventObject)).type=r,i.armature=this._armature,i.animationState=this,this._armature._dragonBones.bufferEvent(i)))},r.prototype.init=function(e,i,n){if(null===this._armature){if(this._armature=e,this._animationData=i,this.resetToPose=n.resetToPose,this.additiveBlending=n.additiveBlending,this.displayControl=n.displayControl,this.actionEnabled=n.actionEnabled,this.layer=n.layer,this.playTimes=n.playTimes,this.timeScale=n.timeScale,this.fadeTotalTime=n.fadeInTime,this.autoFadeOutTime=n.autoFadeOutTime,this.weight=n.weight,this.name=n.name.length>0?n.name:n.animation,this.group=n.group,n.pauseFadeIn?this._playheadState=2:this._playheadState=3,n.duration<0?(this._position=0,this._duration=this._animationData.duration,0!==n.position?this.timeScale>=0?this._time=n.position:this._time=n.position-this._duration:this._time=0):(this._position=n.position,this._duration=n.duration,this._time=0),this.timeScale<0&&0===this._time&&(this._time=-1e-6),this.fadeTotalTime<=0&&(this._fadeProgress=.999999),n.boneMask.length>0){this._boneMask.length=n.boneMask.length;for(var r=0,s=this._boneMask.length;r0,r=!0,s=!0,a=this._time;if(this._weightResult=this.weight*this._fadeProgress,null!==this._parent&&(this._weightResult*=this._parent._weightResult/this._parent._fadeProgress),this._actionTimeline.playState<=0&&this._actionTimeline.update(a),n){var o=2*i;this._actionTimeline.currentTime=Math.floor(this._actionTimeline.currentTime*o)/o}if(null!==this._zOrderTimeline&&this._zOrderTimeline.playState<=0&&this._zOrderTimeline.update(a),n){var l=Math.floor(this._actionTimeline.currentTime*i);this._armature._cacheFrameIndex===l?(r=!1,s=!1):(this._armature._cacheFrameIndex=l,this._animationData.cachedFrames[l]?s=!1:this._animationData.cachedFrames[l]=!0)}if(r){if(s)for(var c=0,h=this._boneTimelines.length;c0&&(this._subFadeState=0,this._poseTimelines.length>0)){for(var f=0,d=this._poseTimelines;f0&&this.autoFadeOutTime>=0&&this.fadeOut(this.autoFadeOutTime)}}},r.prototype.play=function(){this._playheadState=3},r.prototype.stop=function(){this._playheadState&=1},r.prototype.fadeOut=function(t,e){if(void 0===e&&(e=!0),t<0&&(t=0),e&&(this._playheadState&=2),this._fadeState>0){if(t>this.fadeTotalTime-this._fadeTime)return}else{this._fadeState=1,this._subFadeState=-1,(t<=0||this._fadeProgress<=0)&&(this._fadeProgress=1e-6);for(var i=0,n=this._boneTimelines;i1e-6?t/this._fadeProgress:0,this._fadeTime=this.fadeTotalTime*(1-this._fadeProgress)},r.prototype.containsBoneMask=function(t){return 0===this._boneMask.length||this._boneMask.indexOf(t)>=0},r.prototype.addBoneMask=function(t,e){void 0===e&&(e=!0);var i=this._armature.getBone(t);if(null!==i){if(this._boneMask.indexOf(t)<0&&this._boneMask.push(t),e)for(var n=0,r=this._armature.getBones();n=0&&this._boneMask.splice(i,1),e){var n=this._armature.getBone(t);if(null!==n){var r=this._armature.getBones();if(this._boneMask.length>0)for(var s=0,a=r;s=0&&n.contains(o)&&this._boneMask.splice(l,1)}else for(var c=0,h=r;c0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isFadeComplete",{get:function(){return 0===this._fadeState},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isPlaying",{get:function(){return 0!=(2&this._playheadState)&&this._actionTimeline.playState<=0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isCompleted",{get:function(){return this._actionTimeline.playState>0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"currentPlayTimes",{get:function(){return this._actionTimeline.currentPlayTimes},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"totalTime",{get:function(){return this._duration},enumerable:!0,configurable:!0}),Object.defineProperty(r.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),this._time!==t){this._time=t,this._actionTimeline.setCurrentTime(this._time),null!==this._zOrderTimeline&&(this._zOrderTimeline.playState=-1);for(var i=0,n=this._boneTimelines;i0))return 0;if(this.layer!==e){if(this.layerWeight>=this.leftWeight)return this.leftWeight=0,0;this.layer=e,this.leftWeight-=this.layerWeight,this.layerWeight=0}return t*=this.leftWeight,this.layerWeight+=t,this.blendWeight=t,2}return this.dirty=!0,this.layer=e,this.layerWeight=t,this.leftWeight=1,this.blendWeight=t,1},t.prototype.clear=function(){this.dirty=!1,this.layer=0,this.leftWeight=0,this.layerWeight=0,this.blendWeight=0},t})();t.BlendState=n})(r||(r={})),(function(t){var e=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype._onClear=function(){this.playState=-1,this.currentPlayTimes=-1,this.currentTime=-1,this._tweenState=0,this._frameRate=0,this._frameValueOffset=0,this._frameCount=0,this._frameOffset=0,this._frameIndex=-1,this._frameRateR=0,this._position=0,this._duration=0,this._timeScale=1,this._timeOffset=0,this._dragonBonesData=null,this._animationData=null,this._timelineData=null,this._armature=null,this._animationState=null,this._actionTimeline=null,this._frameArray=null,this._frameIntArray=null,this._frameFloatArray=null,this._timelineArray=null,this._frameIndices=null},e.prototype._setCurrentTime=function(t){var e=this.playState,i=this.currentPlayTimes,n=this.currentTime;if(null!==this._actionTimeline&&this._frameCount<=1)this.playState=this._actionTimeline.playState>=0?1:-1,this.currentPlayTimes=1,this.currentTime=this._actionTimeline.currentTime;else if(null===this._actionTimeline||1!==this._timeScale||0!==this._timeOffset){var r=this._animationState.playTimes,s=r*this._duration;t*=this._timeScale,0!==this._timeOffset&&(t+=this._timeOffset*this._animationData.duration),r>0&&(t>=s||t<=-s)?(this.playState<=0&&3===this._animationState._playheadState&&(this.playState=1),this.currentPlayTimes=r,this.currentTime=t<0?0:this._duration+1e-6):(0!==this.playState&&3===this._animationState._playheadState&&(this.playState=0),t<0?(t=-t,this.currentPlayTimes=Math.floor(t/this._duration),this.currentTime=this._duration-t%this._duration):(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;return(this.currentPlayTimes!==i||this.currentTime!==n)&&((e<0&&this.playState!==e||this.playState<=0&&this.currentPlayTimes!==i)&&(this._frameIndex=-1),!0)},e.prototype.init=function(t,e,i){this._armature=t,this._animationState=e,this._timelineData=i,this._actionTimeline=this._animationState._actionTimeline,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,null!==this._timelineData&&(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=.01*this._timelineArray[this._timelineData.offset+1])},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),i=this._frameIndices[this._timelineData.frameIndicesOffset+e];this._frameIndex!==i&&(this._frameIndex=i,this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+this._frameIndex],this._onArriveAtFrame())}else this._frameIndex<0&&(this._frameIndex=0,null!==this._timelineData&&(this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5]),this._onArriveAtFrame());0!==this._tweenState&&this._onUpdateFrame()}},e})(t.BaseObject);t.TimelineState=e;var i=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e._getEasingValue=function(t,e,i){var n=e;switch(t){case 3:n=Math.pow(e,2);break;case 4:n=1-Math.pow(1-e,2);break;case 5:n=.5*(1-Math.cos(e*Math.PI))}return(n-e)*i+e},e._getEasingCurveValue=function(t,e,i,n){if(t<=0)return 0;if(t>=1)return 1;var r=i+1,s=Math.floor(t*r),a=0===s?0:e[n+s-1];return 1e-4*(a+((s===r-1?1e4:e[n+s])-a)*(t*r-s))},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||0===this._animationState.playTimes||this._animationState.currentPlayTimes0?1/e:0}else this._tweenState=1},e.prototype._onUpdateFrame=function(){2===this._tweenState?(this._tweenProgress=(this.currentTime-this._framePosition)*this._frameDurationR,2===this._tweenType?this._tweenProgress=e._getEasingCurveValue(this._tweenProgress,this._frameArray,this._curveCount,this._frameOffset+3):1!==this._tweenType&&(this._tweenProgress=e._getEasingValue(this._tweenType,this._tweenProgress,this._tweenEasing))):this._tweenProgress=0},e})(e);t.TweenTimelineState=i;var n=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype._onClear=function(){t.prototype._onClear.call(this),this.bone=null,this.bonePose=null},e.prototype.blend=function(t){var e=this.bone._blendState.blendWeight,i=this.bone.animationPose,n=this.bonePose.result;2===t?(i.x+=n.x*e,i.y+=n.y*e,i.rotation+=n.rotation*e,i.skew+=n.skew*e,i.scaleX+=(n.scaleX-1)*e,i.scaleY+=(n.scaleY-1)*e):1!==e?(i.x=n.x*e,i.y=n.y*e,i.rotation=n.rotation*e,i.skew=n.skew*e,i.scaleX=(n.scaleX-1)*e+1,i.scaleY=(n.scaleY-1)*e+1):(i.x=n.x,i.y=n.y,i.rotation=n.rotation,i.skew=n.skew,i.scaleX=n.scaleX,i.scaleY=n.scaleY),0===this._animationState._fadeState&&0===this._animationState._subFadeState||(this.bone._transformDirty=!0)},e})(i);t.BoneTimelineState=n;var r=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype._onClear=function(){t.prototype._onClear.call(this),this.slot=null},e})(i);t.SlotTimelineState=r;var a=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype._onClear=function(){t.prototype._onClear.call(this),this.constraint=null},e})(i);t.ConstraintTimelineState=a})(r||(r={})),(function(t){var e=(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),i.toString=function(){return"[class dragonBones.ActionTimelineState]"},i.prototype._onCrossFrame=function(e){var i=this._armature.eventDispatcher;if(this._animationState.actionEnabled)for(var n=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+e],r=this._frameArray[n+1],s=this._animationData.parent.actions,a=0;a0&&s.hasDBEventListener(t.EventObject.COMPLETE)&&((c=t.BaseObject.borrowObject(t.EventObject)).type=t.EventObject.COMPLETE,c.armature=this._armature,c.animationState=this._animationState)),this._frameCount>1){var h=this._timelineData,u=Math.floor(this.currentTime*this._frameRate),_=this._frameIndices[h.frameIndicesOffset+u];if(this._frameIndex!==_){var f=this._frameIndex;if(this._frameIndex=_,null!==this._timelineArray)if(this._frameOffset=this._animationData.frameOffset+this._timelineArray[h.offset+5+this._frameIndex],o){if(f<0){var d=Math.floor(r*this._frameRate);f=this._frameIndices[h.frameIndicesOffset+d],this.currentPlayTimes===n&&f===_&&(f=-1)}for(;f>=0;){var p=this._animationData.frameOffset+this._timelineArray[h.offset+5+f],m=this._frameArray[p]/this._frameRate;if(this._position<=m&&m<=this._position+this._duration&&this._onCrossFrame(f),null!==l&&0===f&&(this._armature._dragonBones.bufferEvent(l),l=null),f>0?f--:f=this._frameCount-1,f===_)break}}else for(f<0&&(d=Math.floor(r*this._frameRate),f=this._frameIndices[h.frameIndicesOffset+d],p=this._animationData.frameOffset+this._timelineArray[h.offset+5+f],m=this._frameArray[p]/this._frameRate,this.currentPlayTimes===n&&(r<=m?f>0?f--:f=this._frameCount-1:f===_&&(f=-1)));f>=0&&(f=0&&(this._frameArray[this._frameOffset+1]>0?this._armature._sortZOrder(this._frameArray,this._frameOffset+2):this._armature._sortZOrder(null,0))},e.prototype._onUpdateFrame=function(){},e})(t.TimelineState);t.ZOrderTimelineState=i;var n=(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),i.toString=function(){return"[class dragonBones.BoneAllTimelineState]"},i.prototype._onArriveAtFrame=function(){if(e.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var t=this._animationData.frameFloatOffset+this._frameValueOffset+6*this._frameIndex,i=this._armature._armatureData.scale,n=this._frameFloatArray,r=this.bonePose.current,s=this.bonePose.delta;r.x=n[t++]*i,r.y=n[t++]*i,r.rotation=n[t++],r.skew=n[t++],r.scaleX=n[t++],r.scaleY=n[t++],2===this._tweenState?(this._frameIndex===this._frameCount-1&&(t=this._animationData.frameFloatOffset+this._frameValueOffset),s.x=n[t++]*i-r.x,s.y=n[t++]*i-r.y,s.rotation=n[t++]-r.rotation,s.skew=n[t++]-r.skew,s.scaleX=n[t++]-r.scaleX,s.scaleY=n[t++]-r.scaleY):(s.x=0,s.y=0,s.rotation=0,s.skew=0,s.scaleX=0,s.scaleY=0)}else r=this.bonePose.current,s=this.bonePose.delta,r.x=0,r.y=0,r.rotation=0,r.skew=0,r.scaleX=1,r.scaleY=1,s.x=0,s.y=0,s.rotation=0,s.skew=0,s.scaleX=0,s.scaleY=0},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.bonePose.current,i=this.bonePose.delta,n=this.bonePose.result;this.bone._transformDirty=!0,2!==this._tweenState&&(this._tweenState=0),n.x=t.x+i.x*this._tweenProgress,n.y=t.y+i.y*this._tweenProgress,n.rotation=t.rotation+i.rotation*this._tweenProgress,n.skew=t.skew+i.skew*this._tweenProgress,n.scaleX=t.scaleX+i.scaleX*this._tweenProgress,n.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)},i})(t.BoneTimelineState);t.BoneAllTimelineState=n;var r=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.toString=function(){return"[class dragonBones.BoneTranslateTimelineState]"},e.prototype._onArriveAtFrame=function(){if(t.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var e=this._animationData.frameFloatOffset+this._frameValueOffset+2*this._frameIndex,i=this._armature._armatureData.scale,n=this._frameFloatArray,r=this.bonePose.current,s=this.bonePose.delta;r.x=n[e++]*i,r.y=n[e++]*i,2===this._tweenState?(this._frameIndex===this._frameCount-1&&(e=this._animationData.frameFloatOffset+this._frameValueOffset),s.x=n[e++]*i-r.x,s.y=n[e++]*i-r.y):(s.x=0,s.y=0)}else r=this.bonePose.current,s=this.bonePose.delta,r.x=0,r.y=0,s.x=0,s.y=0},e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);var e=this.bonePose.current,i=this.bonePose.delta,n=this.bonePose.result;this.bone._transformDirty=!0,2!==this._tweenState&&(this._tweenState=0),n.x=e.x+i.x*this._tweenProgress,n.y=e.y+i.y*this._tweenProgress},e})(t.BoneTimelineState);t.BoneTranslateTimelineState=r;var a=(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),i.toString=function(){return"[class dragonBones.BoneRotateTimelineState]"},i.prototype._onArriveAtFrame=function(){if(e.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var i=this._animationData.frameFloatOffset+this._frameValueOffset+2*this._frameIndex,n=this._frameFloatArray,r=this.bonePose.current,s=this.bonePose.delta;r.rotation=n[i++],r.skew=n[i++],2===this._tweenState?(this._frameIndex===this._frameCount-1?(i=this._animationData.frameFloatOffset+this._frameValueOffset,s.rotation=t.Transform.normalizeRadian(n[i++]-r.rotation)):s.rotation=n[i++]-r.rotation,s.skew=n[i++]-r.skew):(s.rotation=0,s.skew=0)}else r=this.bonePose.current,s=this.bonePose.delta,r.rotation=0,r.skew=0,s.rotation=0,s.skew=0},i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.bonePose.current,i=this.bonePose.delta,n=this.bonePose.result;this.bone._transformDirty=!0,2!==this._tweenState&&(this._tweenState=0),n.rotation=t.rotation+i.rotation*this._tweenProgress,n.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)},i})(t.BoneTimelineState);t.BoneRotateTimelineState=a;var o=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.toString=function(){return"[class dragonBones.BoneScaleTimelineState]"},e.prototype._onArriveAtFrame=function(){if(t.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var e=this._animationData.frameFloatOffset+this._frameValueOffset+2*this._frameIndex,i=this._frameFloatArray,n=this.bonePose.current,r=this.bonePose.delta;n.scaleX=i[e++],n.scaleY=i[e++],2===this._tweenState?(this._frameIndex===this._frameCount-1&&(e=this._animationData.frameFloatOffset+this._frameValueOffset),r.scaleX=i[e++]-n.scaleX,r.scaleY=i[e++]-n.scaleY):(r.scaleX=0,r.scaleY=0)}else n=this.bonePose.current,r=this.bonePose.delta,n.scaleX=1,n.scaleY=1,r.scaleX=0,r.scaleY=0},e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);var e=this.bonePose.current,i=this.bonePose.delta,n=this.bonePose.result;this.bone._transformDirty=!0,2!==this._tweenState&&(this._tweenState=0),n.scaleX=e.scaleX+i.scaleX*this._tweenProgress,n.scaleY=e.scaleY+i.scaleY*this._tweenProgress},e})(t.BoneTimelineState);t.BoneScaleTimelineState=o;var l=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._current=[],e._delta=[],e._result=[],e}return s(e,t),e.toString=function(){return"[class dragonBones.SurfaceTimelineState]"},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.surface=null,this._frameFloatOffset=0,this._valueCount=0,this._deformCount=0,this._valueOffset=0,this._current.length=0,this._delta.length=0,this._result.length=0},e.prototype._onArriveAtFrame=function(){if(t.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*this._valueCount,i=this._armature._armatureData.scale,n=this._frameFloatArray;if(2===this._tweenState){var r=e+this._valueCount;this._frameIndex===this._frameCount-1&&(r=this._animationData.frameFloatOffset+this._frameValueOffset);for(var s=0;s=0){var t=null!==this._timelineData?this._frameArray[this._frameOffset+1]:this.slot._slotData.displayIndex;this.slot.displayIndex!==t&&this.slot._setDisplayIndex(t,!0)}},e})(t.SlotTimelineState);t.SlotDislayTimelineState=c;var h=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return 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],e}return s(e,t),e.toString=function(){return"[class dragonBones.SlotColorTimelineState]"},e.prototype._onClear=function(){t.prototype._onClear.call(this),this._dirty=!1},e.prototype._onArriveAtFrame=function(){if(t.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var e=this._dragonBonesData.intArray,i=this._frameIntArray,n=this._animationData.frameIntOffset+this._frameValueOffset+1*this._frameIndex,r=i[n];r<0&&(r+=65536),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++],2===this._tweenState&&((r=this._frameIndex===this._frameCount-1?i[this._animationData.frameIntOffset+this._frameValueOffset]:i[n+1])<0&&(r+=65536),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 s=this.slot._slotData.color;this._current[0]=100*s.alphaMultiplier,this._current[1]=100*s.redMultiplier,this._current[2]=100*s.greenMultiplier,this._current[3]=100*s.blueMultiplier,this._current[4]=s.alphaOffset,this._current[5]=s.redOffset,this._current[6]=s.greenOffset,this._current[7]=s.blueOffset}},e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this),this._dirty=!0,2!==this._tweenState&&(this._tweenState=0),this._result[0]=.01*(this._current[0]+this._delta[0]*this._tweenProgress),this._result[1]=.01*(this._current[1]+this._delta[1]*this._tweenProgress),this._result[2]=.01*(this._current[2]+this._delta[2]*this._tweenProgress),this._result[3]=.01*(this._current[3]+this._delta[3]*this._tweenProgress),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=!1},e.prototype.update=function(e){if(t.prototype.update.call(this,e),0!==this._tweenState||this._dirty){var i=this.slot._colorTransform;if(0!==this._animationState._fadeState||0!==this._animationState._subFadeState){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 n=Math.pow(this._animationState._fadeProgress,4);i.alphaMultiplier+=(this._result[0]-i.alphaMultiplier)*n,i.redMultiplier+=(this._result[1]-i.redMultiplier)*n,i.greenMultiplier+=(this._result[2]-i.greenMultiplier)*n,i.blueMultiplier+=(this._result[3]-i.blueMultiplier)*n,i.alphaOffset+=(this._result[4]-i.alphaOffset)*n,i.redOffset+=(this._result[5]-i.redOffset)*n,i.greenOffset+=(this._result[6]-i.greenOffset)*n,i.blueOffset+=(this._result[7]-i.blueOffset)*n,this.slot._colorDirty=!0}}else this._dirty&&(this._dirty=!1,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=!0))}},e})(t.SlotTimelineState);t.SlotColorTimelineState=h;var u=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._current=[],e._delta=[],e._result=[],e}return s(e,t),e.toString=function(){return"[class dragonBones.DeformTimelineState]"},e.prototype._onClear=function(){t.prototype._onClear.call(this),this.vertexOffset=0,this._dirty=!1,this._frameFloatOffset=0,this._valueCount=0,this._deformCount=0,this._valueOffset=0,this._current.length=0,this._delta.length=0,this._result.length=0},e.prototype._onArriveAtFrame=function(){if(t.prototype._onArriveAtFrame.call(this),null!==this._timelineData){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*this._valueCount,i=this._armature._armatureData.scale,n=this._frameFloatArray;if(2===this._tweenState){var r=e+this._valueCount;this._frameIndex===this._frameCount-1&&(r=this._animationData.frameFloatOffset+this._frameValueOffset);for(var s=0;s=0&&(this._floats[2]=this._floats[0]+this._floats[1]*this._tweenProgress),this._floats[5]=this._floats[3]+this._floats[4]*this._tweenProgress},e.prototype.blend=function(t){var e=this.animationState,i=e._blendState.blendWeight;2===t?(e.weight+=this._floats[5]*i,e.currentTime+=this._floats[2]*i):(e.weight=this._floats[5]*i,e.currentTime=this._floats[2]*i)},e})(t.TweenTimelineState);t.AnimationTimelineState=f})(r||(r={})),(function(t){var e=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.actionDataToInstance=function(t,i,n){0===t.type?i.type=e.FRAME_EVENT:i.type=10===t.type?e.FRAME_EVENT:e.SOUND_EVENT,i.name=t.name,i.armature=n,i.actionData=t,i.data=t.data,null!==t.bone&&(i.bone=n.getBone(t.bone.name)),null!==t.slot&&(i.slot=n.getSlot(t.slot.name))},e.toString=function(){return"[class dragonBones.EventObject]"},e.prototype._onClear=function(){this.time=0,this.type="",this.name="",this.armature=null,this.bone=null,this.slot=null,this.animationState=null,this.actionData=null,this.data=null},e.START="start",e.LOOP_COMPLETE="loopComplete",e.COMPLETE="complete",e.FADE_IN="fadeIn",e.FADE_IN_COMPLETE="fadeInComplete",e.FADE_OUT="fadeOut",e.FADE_OUT_COMPLETE="fadeOutComplete",e.FRAME_EVENT="frameEvent",e.SOUND_EVENT="soundEvent",e})(t.BaseObject);t.EventObject=e})(r||(r={})),(function(t){var e=(function(){function e(){}return e._getArmatureType=function(t){switch(t.toLowerCase()){case"stage":return 2;case"armature":return 0;case"movieclip":return 1;default:return 0}},e._getBoneType=function(t){switch(t.toLowerCase()){case"bone":return 0;case"surface":return 1;default:return 0}},e._getDisplayType=function(t){switch(t.toLowerCase()){case"image":return 0;case"mesh":return 2;case"armature":return 1;case"boundingbox":return 3;case"path":return 4;default:return 0}},e._getBoundingBoxType=function(t){switch(t.toLowerCase()){case"rectangle":return 0;case"ellipse":return 1;case"polygon":return 2;default:return 0}},e._getActionType=function(t){switch(t.toLowerCase()){case"play":return 0;case"frame":return 10;case"sound":return 11;default:return 0}},e._getBlendMode=function(t){switch(t.toLowerCase()){case"normal":return 0;case"add":return 1;case"alpha":return 2;case"darken":return 3;case"difference":return 4;case"erase":return 5;case"hardlight":return 6;case"invert":return 7;case"layer":return 8;case"lighten":return 9;case"multiply":return 10;case"overlay":return 11;case"screen":return 12;case"subtract":return 13;default:return 0}},e._getPositionMode=function(t){switch(t.toLocaleLowerCase()){case"percent":return 1;case"fixed":return 0;default:return 1}},e._getSpacingMode=function(t){switch(t.toLocaleLowerCase()){case"length":return 0;case"percent":return 2;case"fixed":return 1;default:return 0}},e._getRotateMode=function(t){switch(t.toLocaleLowerCase()){case"tangent":return 0;case"chain":return 1;case"chainscale":return 2;default:return 0}},e.parseDragonBonesData=function(e){return console.warn("Deprecated."),e instanceof ArrayBuffer?t.BinaryDataParser.getInstance().parseDragonBonesData(e):t.ObjectDataParser.getInstance().parseDragonBonesData(e)},e.parseTextureAtlasData=function(i,n){void 0===n&&(n=1),console.warn("\u5df2\u5e9f\u5f03");for(var r={},s=i[e.SUB_TEXTURE],a=0,o=s.length;a255)return encodeURI(r);return r}return String(r)}return n},n.prototype._getCurvePoint=function(t,e,i,n,r,s,a,o,l,c){var h=1-l,u=h*h,_=l*l,f=h*u,d=3*l*u,p=3*h*_,m=l*_;c.x=f*t+d*i+p*r+m*a,c.y=f*e+d*n+p*s+m*o},n.prototype._samplingEasingCurve=function(t,e){for(var i=t.length,n=-2,r=0,s=e.length;r=0&&n+61e-4;){var v=.5*(y+m);this._getCurvePoint(l,c,h,u,_,f,d,p,v,this._helpPoint),a-this._helpPoint.x>0?m=v:y=v}e[r]=this._helpPoint.y}},n.prototype._parseActionDataInFrame=function(e,i,n,r){t.DataParser.EVENT in e&&this._mergeActionFrame(e[t.DataParser.EVENT],i,10,n,r),t.DataParser.SOUND in e&&this._mergeActionFrame(e[t.DataParser.SOUND],i,11,n,r),t.DataParser.ACTION in e&&this._mergeActionFrame(e[t.DataParser.ACTION],i,0,n,r),t.DataParser.EVENTS in e&&this._mergeActionFrame(e[t.DataParser.EVENTS],i,10,n,r),t.DataParser.ACTIONS in e&&this._mergeActionFrame(e[t.DataParser.ACTIONS],i,0,n,r)},n.prototype._mergeActionFrame=function(e,n,r,s,a){for(var o=t.DragonBones.webAssembly?this._armature.actions.size():this._armature.actions.length,l=this._parseActionData(e,r,s,a),c=0,h=null,u=0,_=l;u<_.length;u++){var f=_[u];this._armature.addAction(f,!1)}0===this._actionFrames.length&&((h=new i).frameStart=0,this._actionFrames.push(h),h=null);for(var d=0,p=this._actionFrames;dn)break;c++}null===h&&((h=new i).frameStart=n,this._actionFrames.splice(c+1,0,h));for(var y=0;y0){var f=r.getBone(u);null!==f?_.parent=f:(u in this._cacheBones||(this._cacheBones[u]=[]),this._cacheBones[u].push(_))}if(_.name in this._cacheBones){for(var d=0,p=this._cacheBones[_.name];d0&&null!==i.parent?(s.root=i.parent,s.bone=i):(s.root=i,s.bone=null),s},n.prototype._parsePathConstraint=function(e){var i=this._armature.getSlot(n._getString(e,t.DataParser.TARGET,""));if(null===i)return null;var r=this._armature.defaultSkin;if(null===r)return null;var s=r.getDisplay(i.name,n._getString(e,t.DataParser.TARGET_DISPLAY,i.name));if(null===s||!(s instanceof t.PathDisplayData))return null;var a=e[t.DataParser.BONES];if(null===a||0===a.length)return null;var o=t.BaseObject.borrowObject(t.PathConstraintData);o.name=n._getString(e,t.DataParser.NAME,""),o.type=1,o.pathSlot=i,o.pathDisplayData=s,o.target=i.parent,o.positionMode=t.DataParser._getPositionMode(n._getString(e,t.DataParser.POSITION_MODE,"")),o.spacingMode=t.DataParser._getSpacingMode(n._getString(e,t.DataParser.SPACING_MODE,"")),o.rotateMode=t.DataParser._getRotateMode(n._getString(e,t.DataParser.ROTATE_MODE,"")),o.position=n._getNumber(e,t.DataParser.POSITION,0),o.spacing=n._getNumber(e,t.DataParser.SPACING,0),o.rotateOffset=n._getNumber(e,t.DataParser.ROTATE_OFFSET,0),o.rotateMix=n._getNumber(e,t.DataParser.ROTATE_MIX,1),o.translateMix=n._getNumber(e,t.DataParser.TRANSLATE_MIX,1);for(var l=0,c=a;l0?r:i,this._parsePivot(e,o);break;case 1:var l=a=t.BaseObject.borrowObject(t.ArmatureDisplayData);if(l.name=i,l.path=r.length>0?r:i,l.inheritAnimation=!0,t.DataParser.ACTIONS in e)for(var c=0,h=this._parseActionData(e[t.DataParser.ACTIONS],0,null,null);c0?r:i,p.vertices.data=this._data,t.DataParser.SHARE in e?(this._cacheRawMeshes.push(e),this._cacheMeshes.push(p)):this._parseMesh(e,p),t.DataParser.GLUE_WEIGHTS in e&&t.DataParser.GLUE_MESHES in e&&(this._cacheRawMeshes.push(e),this._cacheMeshes.push(p));break;case 3:var m=this._parseBoundingBox(e);if(null!==m){var y=a=t.BaseObject.borrowObject(t.BoundingBoxDisplayData);y.name=i,y.path=r.length>0?r:i,y.boundingBox=m}break;case 4:var v=e[t.DataParser.LENGTHS],g=a=t.BaseObject.borrowObject(t.PathDisplayData);g.closed=n._getBoolean(e,t.DataParser.CLOSED,!1),g.constantSpeed=n._getBoolean(e,t.DataParser.CONSTANT_SPEED,!1),g.name=i,g.path=r.length>0?r:i,g.vertices.data=this._data,g.curveLengths.length=v.length;for(var b=0,A=v.length;bi.width&&(i.width=l),ci.height&&(i.height=c))}i.width-=i.x,i.height-=i.y}else console.warn("Data error.\n Please reexport DragonBones Data to fixed the bug.");return i},n.prototype._parseAnimation=function(e){var i=t.BaseObject.borrowObject(t.AnimationData);if(i.frameCount=Math.max(n._getNumber(e,t.DataParser.DURATION,1),1),i.playTimes=n._getNumber(e,t.DataParser.PLAY_TIMES,1),i.duration=i.frameCount/this._armature.frameRate,i.fadeInTime=n._getNumber(e,t.DataParser.FADE_IN_TIME,0),i.scale=n._getNumber(e,t.DataParser.SCALE,1),i.name=n._getString(e,t.DataParser.NAME,t.DataParser.DEFAULT_NAME),0===i.name.length&&(i.name=t.DataParser.DEFAULT_NAME),i.frameIntOffset=this._frameIntArray.length,i.frameFloatOffset=this._frameFloatArray.length,i.frameOffset=this._frameArray.length,this._animation=i,t.DataParser.FRAME in e){var r=e[t.DataParser.FRAME],s=r.length;if(s>0)for(var a=0,o=0;a0&&(this._animation.actionTimeline=this._parseTimeline(null,this._actionFrames,"",0,!1,!1,0,this._parseActionFrame),this._actionFrames.length=0),this._animation=null,i},n.prototype._parseTimeline=function(e,r,s,a,o,l,c,h){if(null!==e&&s.length>0&&s in e&&(r=e[s]),null===r)return null;var u=r.length;if(0===u)return null;var _=this._frameIntArray.length,f=this._frameFloatArray.length,d=t.BaseObject.borrowObject(t.TimelineData),p=this._timelineArray.length;if(this._timelineArray.length+=5+u,null!==e?(this._timelineArray[p+0]=Math.round(100*n._getNumber(e,t.DataParser.SCALE,1)),this._timelineArray[p+1]=Math.round(100*n._getNumber(e,t.DataParser.OFFSET,0))):(this._timelineArray[p+0]=100,this._timelineArray[p+1]=0),this._timelineArray[p+2]=u,this._timelineArray[p+3]=c,this._timelineArray[p+4]=o?_-this._animation.frameIntOffset:l?f-this._animation.frameFloatOffset:0,this._timeline=d,d.type=a,d.offset=p,1===u)d.frameIndicesOffset=-1,this._timelineArray[p+5+0]=h.call(this,r[0],0,0)-this._animation.frameOffset;else{var m=this._animation.frameCount+1,y=this._data.frameIndices,v=0;t.DragonBones.webAssembly?(v=y.size(),y.resize(v+m,0)):(v=y.length,y.length+=m),d.frameIndicesOffset=v;for(var g=0,b=0,A=0,x=0;g0)if(t.DataParser.CURVE in e){var a=r+1;this._helpArray.length=a,this._samplingEasingCurve(e[t.DataParser.CURVE],this._helpArray),this._frameArray.length+=2+this._helpArray.length,this._frameArray[s+1]=2,this._frameArray[s+2]=a;for(var o=0;o0){for(var a=this._armature.sortedSlots.length,o=new Array(a-s.length/2),l=new Array(a),c=0;c0?s>=this._prevRotation:s<=this._prevRotation)&&(this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1),s=this._prevRotation+s-this._prevRotation+t.Transform.PI_D*this._prevClockwise)),this._prevClockwise=n._getNumber(e,t.DataParser.TWEEN_ROTATE,0),this._prevRotation=s;var a=this._parseTweenFrame(e,i,r),o=this._frameFloatArray.length;return this._frameFloatArray.length+=6,this._frameFloatArray[o++]=this._helpTransform.x,this._frameFloatArray[o++]=this._helpTransform.y,this._frameFloatArray[o++]=s,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),a},n.prototype._parseBoneTranslateFrame=function(e,i,r){var s=this._parseTweenFrame(e,i,r),a=this._frameFloatArray.length;return this._frameFloatArray.length+=2,this._frameFloatArray[a++]=n._getNumber(e,t.DataParser.X,0),this._frameFloatArray[a++]=n._getNumber(e,t.DataParser.Y,0),s},n.prototype._parseBoneRotateFrame=function(e,i,r){var s=n._getNumber(e,t.DataParser.ROTATE,0)*t.Transform.DEG_RAD;0!==i&&(0===this._prevClockwise?s=this._prevRotation+t.Transform.normalizeRadian(s-this._prevRotation):((this._prevClockwise>0?s>=this._prevRotation:s<=this._prevRotation)&&(this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1),s=this._prevRotation+s-this._prevRotation+t.Transform.PI_D*this._prevClockwise)),this._prevClockwise=n._getNumber(e,t.DataParser.CLOCK_WISE,0),this._prevRotation=s;var a=this._parseTweenFrame(e,i,r),o=this._frameFloatArray.length;return this._frameFloatArray.length+=2,this._frameFloatArray[o++]=s,this._frameFloatArray[o++]=n._getNumber(e,t.DataParser.SKEW,0)*t.Transform.DEG_RAD,a},n.prototype._parseBoneScaleFrame=function(e,i,r){var s=this._parseTweenFrame(e,i,r),a=this._frameFloatArray.length;return this._frameFloatArray.length+=2,this._frameFloatArray[a++]=n._getNumber(e,t.DataParser.X,1),this._frameFloatArray[a++]=n._getNumber(e,t.DataParser.Y,1),s},n.prototype._parseSurfaceFrame=function(e,i,r){var s=this._frameFloatArray.length,a=this._parseTweenFrame(e,i,r),o=e[t.DataParser.VERTICES],l=n._getNumber(e,t.DataParser.OFFSET,0),c=this._surface.vertices.length/2,h=0,u=0;this._frameFloatArray.length+=2*c;for(var _=0;_<2*c;_+=2)h=_=o.length?0:o[_-l],u=_+1=o.length?0:o[_+1-l],this._frameFloatArray[s+_]=h,this._frameFloatArray[s+_+1]=u;if(0===i){var f=this._frameIntArray.length;this._frameIntArray.length+=5,this._frameIntArray[f+0]=0,this._frameIntArray[f+1]=this._frameFloatArray.length-s,this._frameIntArray[f+2]=this._frameFloatArray.length-s,this._frameIntArray[f+3]=0,this._frameIntArray[f+4]=s-this._animation.frameFloatOffset,this._timelineArray[this._timeline.offset+3]=f-this._animation.frameIntOffset}return a},n.prototype._parseSlotDisplayFrame=function(e,i,r){var s=this._parseFrame(e,i,r);return this._frameArray.length+=1,t.DataParser.VALUE in e?this._frameArray[s+1]=n._getNumber(e,t.DataParser.VALUE,0):this._frameArray[s+1]=n._getNumber(e,t.DataParser.DISPLAY_INDEX,0),this._parseActionDataInFrame(e,i,this._slot.parent,this._slot),s},n.prototype._parseSlotColorFrame=function(e,i,n){var r=this._parseTweenFrame(e,i,n),s=-1;if(t.DataParser.VALUE in e||t.DataParser.COLOR in e){var a=t.DataParser.VALUE in e?e[t.DataParser.VALUE]:e[t.DataParser.COLOR];for(var o in a){this._parseColorTransform(a,this._helpColorTransform),s=this._intArray.length,this._intArray.length+=8,this._intArray[s++]=Math.round(100*this._helpColorTransform.alphaMultiplier),this._intArray[s++]=Math.round(100*this._helpColorTransform.redMultiplier),this._intArray[s++]=Math.round(100*this._helpColorTransform.greenMultiplier),this._intArray[s++]=Math.round(100*this._helpColorTransform.blueMultiplier),this._intArray[s++]=Math.round(this._helpColorTransform.alphaOffset),this._intArray[s++]=Math.round(this._helpColorTransform.redOffset),this._intArray[s++]=Math.round(this._helpColorTransform.greenOffset),this._intArray[s++]=Math.round(this._helpColorTransform.blueOffset),s-=8;break}}s<0&&(this._defaultColorOffset<0&&(this._defaultColorOffset=s=this._intArray.length,this._intArray.length+=8,this._intArray[s++]=100,this._intArray[s++]=100,this._intArray[s++]=100,this._intArray[s++]=100,this._intArray[s++]=0,this._intArray[s++]=0,this._intArray[s++]=0,this._intArray[s++]=0),s=this._defaultColorOffset);var l=this._frameIntArray.length;return this._frameIntArray.length+=1,this._frameIntArray[l]=s,r},n.prototype._parseSlotFFDFrame=function(e,i,r){var s=this._frameFloatArray.length,a=this._parseTweenFrame(e,i,r),o=t.DataParser.VERTICES in e?e[t.DataParser.VERTICES]:null,l=n._getNumber(e,t.DataParser.OFFSET,0),c=this._intArray[this._mesh.vertices.offset+0],h=this._mesh.parent.name+"_"+this._slot.name+"_"+this._mesh.name,u=this._mesh.vertices.weight,_=0,f=0,d=0,p=0;if(null!==u){var m=this._weightSlotPose[h];this._helpMatrixA.copyFromArray(m,0),this._frameFloatArray.length+=2*u.count,d=u.offset+2+u.bones.length}else this._frameFloatArray.length+=2*c;for(var y=0;y<2*c;y+=2)if(null===o?(_=0,f=0):(_=y=o.length?0:o[y-l],f=y+1=o.length?0:o[y+1-l]),null!==u){var v=this._weightBonePoses[h],g=this._intArray[d++];this._helpMatrixA.transformPoint(_,f,this._helpPoint,!0),_=this._helpPoint.x,f=this._helpPoint.y;for(var b=0;b=0||t.DataParser.DATA_VERSIONS.indexOf(s)>=0){var a=t.BaseObject.borrowObject(t.DragonBonesData);if(a.version=r,a.name=n._getString(e,t.DataParser.NAME,""),a.frameRate=n._getNumber(e,t.DataParser.FRAME_RATE,24),0===a.frameRate&&(a.frameRate=24),t.DataParser.ARMATURE in e){this._data=a,this._parseArray(e);for(var o=0,l=e[t.DataParser.ARMATURE];o0&&(a.stage=a.getArmature(a.armatureNames[0])),this._data=null}return t.DataParser.TEXTURE_ATLAS in e&&(this._rawTextureAtlases=e[t.DataParser.TEXTURE_ATLAS]),a}return console.assert(!1,"Nonsupport data version: "+r+"\nPlease convert DragonBones data to support version.\nRead more: https://github.com/DragonBones/Tools/"),null},n.prototype.parseTextureAtlasData=function(e,i,r){if(void 0===r&&(r=1),console.assert(void 0!==e),null===e){if(null===this._rawTextureAtlases||0===this._rawTextureAtlases.length)return!1;var s=this._rawTextureAtlases[this._rawTextureAtlasIndex++];return this.parseTextureAtlasData(s,i,r),this._rawTextureAtlasIndex>=this._rawTextureAtlases.length&&(this._rawTextureAtlasIndex=0,this._rawTextureAtlases=null),!0}if(i.width=n._getNumber(e,t.DataParser.WIDTH,0),i.height=n._getNumber(e,t.DataParser.HEIGHT,0),i.scale=1===r?1/n._getNumber(e,t.DataParser.SCALE,1):r,i.name=n._getString(e,t.DataParser.NAME,""),i.imagePath=n._getString(e,t.DataParser.IMAGE_PATH,""),t.DataParser.SUB_TEXTURE in e)for(var a=e[t.DataParser.SUB_TEXTURE],o=0,l=a.length;o0&&_>0&&(h.frame=t.TextureData.createRectangle(),h.frame.x=n._getNumber(c,t.DataParser.FRAME_X,0),h.frame.y=n._getNumber(c,t.DataParser.FRAME_Y,0),h.frame.width=u,h.frame.height=_),i.addTexture(h)}return!0},n.getInstance=function(){return null===n._objectDataParserInstance&&(n._objectDataParserInstance=new n),n._objectDataParserInstance},n._objectDataParserInstance=null,n})(t.DataParser);t.ObjectDataParser=e;var i=function(){this.frameStart=0,this.actions=[]};t.ActionFrame=i})(r||(r={})),(function(t){var e=(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return s(i,e),i.prototype._inRange=function(t,e,i){return e<=t&&t<=i},i.prototype._decodeUTF8=function(t){for(var e,i=0,n="",r=0,s=0,a=0,o=0;t.length>i;){var l=t[i++];if(-1===l)e=0!==s?65533:-1;else if(0===s)this._inRange(l,0,127)?e=l:(this._inRange(l,194,223)?(s=1,o=128,r=l-192):this._inRange(l,224,239)?(s=2,o=2048,r=l-224):this._inRange(l,240,244)&&(s=3,o=65536,r=l-240),r*=Math.pow(64,s),e=null);else if(this._inRange(l,128,191))if(a+=1,r+=(l-128)*Math.pow(64,s-a),a!==s)e=null;else{var c=r,h=o;r=0,s=0,a=0,o=0,e=this._inRange(c,h,1114111)&&!this._inRange(c,55296,57343)?c:l}else r=0,s=0,a=0,o=0,i--,e=l;null!==e&&-1!==e&&(e<=65535?e>0&&(n+=String.fromCharCode(e)):(e-=65536,n+=String.fromCharCode(55296+(e>>10&1023)),n+=String.fromCharCode(56320+(1023&e))))}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,n){void 0===n&&(n=null);var r=null!==n?n:t.BaseObject.borrowObject(t.TimelineData);r.type=e,r.offset=i,this._timeline=r;var s=this._timelineArrayBuffer[r.offset+2];if(1===s)r.frameIndicesOffset=-1;else{var a=0,o=this._animation.frameCount+1,l=this._data.frameIndices;t.DragonBones.webAssembly?(a=l.size(),l.resize(a+o,0)):(a=l.length,l.length+=o),r.frameIndicesOffset=a;for(var c=0,h=0,u=0,_=0;c=0){var r=t.BaseObject.borrowObject(t.WeightData),s=this._intArrayBuffer[i.offset+0],a=this._intArrayBuffer[n+0];r.offset=n;for(var o=0;o0&&e in this._dragonBonesDataMap&&(a=(s=this._dragonBonesDataMap[e]).getArmature(i)),null===a&&(0===e.length||this.autoSearch))for(var o in this._dragonBonesDataMap)if(s=this._dragonBonesDataMap[o],(0===e.length||s.autoSearch)&&null!==(a=s.getArmature(i))){e=o;break}if(null!==a){if(t.dataName=e,t.textureAtlasName=r,t.data=s,t.armature=a,t.skin=null,n.length>0&&(t.skin=a.getSkin(n),null===t.skin&&this.autoSearch))for(var o in this._dragonBonesDataMap){var l=this._dragonBonesDataMap[o].getArmature(n);if(null!==l){t.skin=l.defaultSkin;break}}return null===t.skin&&(t.skin=a.defaultSkin),!0}return!1},e.prototype._buildBones=function(e,i){for(var n=0,r=e.armature.sortedBones;n0&&(o.texture=this._getTextureData(e.textureAtlasName,i.path)),null===o.texture&&(o.texture=this._getTextureData(s,i.path)),a=null!==n&&2===n.type&&this._isSupportMesh()?r.meshDisplay:r.rawDisplay;break;case 2:var l=i;null!==e&&e.textureAtlasName.length>0&&(l.texture=this._getTextureData(e.textureAtlasName,l.path)),null===l.texture&&(l.texture=this._getTextureData(s,l.path)),a=this._isSupportMesh()?r.meshDisplay:r.rawDisplay;break;case 1:var c=i,h=this._buildChildArmature(e,r,i);if(null!==h){if(h.inheritAnimation=c.inheritAnimation,!h.inheritAnimation){var u=c.actions.length>0?c.actions:h.armatureData.defaultActions;if(u.length>0)for(var _=0,f=u;_=0)){var h=i.getDisplays(c.name);if(h||(null!==a&&i!==a&&(h=a.getDisplays(c.name)),h)){var u=t.DragonBones.webAssembly?h.size():h.length,_=c.displayList;_.length=u;for(var f=0,d=u;f>>0)+(E<<16)+(w<<8)+S}var H=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=n.prototype;return s.updateRenderData=function(){},s.realTimeTraverse=function(t,e,i){for(var n,s,a,o,l,c,h,u,m,S,w=t._slots,E=0,M=w.length;E>2,c=u._indices,A=c.length,S=f.request(b,A),v=S.indiceOffset,y=S.byteOffset>>2,g=S.vertexOffset,n=f._vData,s=f._iData,a=f._uintVData,B=m[0],I=m[4],P=m[12],R=m[1],O=m[5],L=m[13];for(var D=0,F=l.length;D>2,n=f._vData,r=f._iData,s=f._uintVData;for(var H=v,W=v+A;H=N&&(j(V=F[M++],1),N=V.vfOffset),s[K]=T}}}},s.fillBuffers=function(t,e){t.node._renderFlag|=V.FLAG_UPDATE_RENDER_DATA;var i=t._armature;if(i){_=!0,h=t.premultipliedAlpha,d=t.node,f=e._meshBuffer,p=e,m=t,D=0;var n=d._color;a=n.r/255,o=n.g/255,l=n.b/255,c=n.a/255,4294967295!==n._val&&(D|=1);var r=void 0;if(m.enableBatch&&(r=d._worldMatrix,_=!1,D|=16),t.isAnimationCached())this.cacheTraverse(t._curFrame,r);else{this.realTimeTraverse(i,r,1);var s=t._debugDraw;if(t.debugBones&&s){s.clear(),s.lineWidth=5,s.strokeColor=k,s.fillColor=z;for(var u=i.getBones(),y=0,v=u.length;y":0}),u=cc.Enum({REALTIME:0,SHARED_CACHE:1,PRIVATE_CACHE:2});sp.Skeleton=cc.Class({name:"sp.Skeleton",extends:n,editor:!1,statics:{AnimationCacheMode:u},properties:{paused:{default:!1,visible:!1},skeletonData:{default:null,type:sp.SkeletonData,notify:function(){this.defaultSkin="",this.defaultAnimation="",this._updateSkeletonData()},tooltip:!1},defaultSkin:{default:"",visible:!1},defaultAnimation:{default:"",visible:!1},animation:{get:function(){if(this.isAnimationCached())return this._animationName;var t=this.getCurrent(0);return t&&t.animation.name||""},set:function(t){this.defaultAnimation=t,t?this.setAnimation(0,t,this.loop):this.isAnimationCached()||(this.clearTrack(0),this.setToSetupPose())},visible:!1},_defaultSkinIndex:{get:function(){if(this.skeletonData){var t=this.skeletonData.getSkinsEnum();if(t)if(""===this.defaultSkin){if(t.hasOwnProperty(0))return this._defaultSkinIndex=0,0}else{var e=t[this.defaultSkin];if(void 0!==e)return e}}return 0},set:function(t){var e;if(this.skeletonData&&(e=this.skeletonData.getSkinsEnum()),!e)return cc.errorID("",this.name);var i=e[t];void 0!==i?(this.defaultSkin=i,this.setSkin(this.defaultSkin)):cc.errorID(7501,this.name)},type:c,visible:!0,animatable:!1,displayName:"Default Skin",tooltip:!1},_animationIndex:{get:function(){var t=this.animation;if(this.skeletonData&&t){var e=this.skeletonData.getAnimsEnum();if(e){var i=e[t];if(void 0!==i)return i}}return 0},set:function(t){if(0!==t){var e;if(this.skeletonData&&(e=this.skeletonData.getAnimsEnum()),!e)return cc.errorID(7502,this.name);var i=e[t];void 0!==i?this.animation=i:cc.errorID(7503,this.name)}else this.animation=""},type:h,visible:!0,animatable:!1,displayName:"Animation",tooltip:!1},_preCacheMode:-1,_cacheMode:u.REALTIME,_defaultCacheMode:{default:0,type:u,notify:function(){this.setAnimationCacheMode(this._defaultCacheMode)},editorOnly:!0,visible:!0,animatable:!1,displayName:"Animation Cache Mode",tooltip:!1},loop:{default:!0,tooltip:!1},premultipliedAlpha:{default:!0,tooltip:!1},timeScale:{default:1,tooltip:!1},debugSlots:{default:!1,editorOnly:!0,tooltip:!1,notify:function(){this._updateDebugDraw()}},debugBones:{default:!1,editorOnly:!0,tooltip:!1,notify:function(){this._updateDebugDraw()}},debugMesh:{default:!1,editorOnly:!0,tooltip:!1,notify:function(){this._updateDebugDraw()}},useTint:{default:!1,tooltip:!1,notify:function(){this._updateUseTint()}},enableBatch:{default:!1,notify:function(){this._updateBatch()},tooltip:!1},_accTime:0,_playCount:0,_frameCache:null,_curFrame:null,_skeletonCache:null,_animationName:"",_animationQueue:[],_headAniInfo:null,_playTimes:0,_isAniComplete:!0},ctor:function(){this._effectDelegate=null,this._skeleton=null,this._rootBone=null,this._listener=null,this._materialCache={},this._debugRenderer=null,this._startSlotIndex=-1,this._endSlotIndex=-1,this._startEntry={animation:{name:""},trackIndex:0},this._endEntry={animation:{name:""},trackIndex:0},this.attachUtil=new l},_getDefaultMaterial:function(){return cc.Material.getBuiltinMaterial("2d-spine")},_updateMaterial:function(){var t=this.useTint||this.isAnimationCached()&&!0,e=this.getMaterial(0);if(e){e.define("USE_TINT",t),e.define("CC_USE_MODEL",!this.enableBatch);var i=this.premultipliedAlpha?cc.gfx.BLEND_ONE:cc.gfx.BLEND_SRC_ALPHA,n=cc.gfx.BLEND_ONE_MINUS_SRC_ALPHA;e.setBlend(!0,cc.gfx.BLEND_FUNC_ADD,i,i,cc.gfx.BLEND_FUNC_ADD,n,n)}this._materialCache={}},disableRender:function(){this._super(),this.node._renderFlag&=~a},markForRender:function(t){this._super(t),t?this.node._renderFlag|=a:this.node._renderFlag&=~a},_updateUseTint:function(){var t=this.getMaterial(0);if(t){var e=this.useTint||this.isAnimationCached()&&!0;t.define("USE_TINT",e)}this._materialCache={}},_updateBatch:function(){var t=this.getMaterial(0);t&&t.define("CC_USE_MODEL",!this.enableBatch),this._materialCache={}},_validateRender:function(){var t=this.skeletonData;t&&t.isTexturesLoaded()?this._super():this.disableRender()},setSkeletonData:function(t){if(null!=t.width&&null!=t.height&&this.node.setContentSize(t.width,t.height),this._cacheMode===u.SHARED_CACHE?this._skeletonCache=o.sharedCache:this._cacheMode===u.PRIVATE_CACHE&&(this._skeletonCache=new o,this._skeletonCache.enablePrivateMode()),this.isAnimationCached()){(this.debugBones||this.debugSlots)&&cc.warn("Debug bones or slots is invalid in cached mode");var e=this._skeletonCache.getSkeletonCache(this.skeletonData._uuid,t);this._skeleton=e.skeleton,this._clipper=e.clipper,this._rootBone=this._skeleton.getRootBone()}else this._skeleton=new r.Skeleton(t),this._clipper=new r.SkeletonClipping,this._rootBone=this._skeleton.getRootBone();this.markForRender(!0)},setSlotsRange:function(t,e){this.isAnimationCached()?cc.warn("Slots visible range can not be modified in cached mode."):(this._startSlotIndex=t,this._endSlotIndex=e)},setAnimationStateData:function(t){if(this.isAnimationCached())cc.warn("'setAnimationStateData' interface can not be invoked in cached mode.");else{var e=new r.AnimationState(t);this._listener&&(this._state&&this._state.removeListener(this._listener),e.addListener(this._listener)),this._state=e}},__preload:function(){this._super();for(var t=this.node.children,e=0,i=t.length;ethis._headAniInfo.delay){var n=this._headAniInfo;this._headAniInfo=null,this.setAnimation(0,n.animationName,n.loop)}return}this._updateCache(t)}else this._updateRealtime(t)},_emitCacheCompleteEvent:function(){this._listener&&(this._endEntry.animation.name=this._animationName,this._listener.complete&&this._listener.complete(this._endEntry),this._listener.end&&this._listener.end(this._endEntry))},_updateCache:function(t){var e=this._frameCache;if(e.isInited()){var i=e.frames,n=o.FrameTime;0==this._accTime&&0==this._playCount&&(this._startEntry.animation.name=this._animationName,this._listener&&this._listener.start&&this._listener.start(this._startEntry)),this._accTime+=t;var r=Math.floor(this._accTime/n);if(e.isCompleted||e.updateToFrame(r),e.isCompleted&&r>=i.length){if(this._playCount++,this._playTimes>0&&this._playCount>=this._playTimes)return this._curFrame=i[i.length-1],this._accTime=0,this._playCount=0,this._isAniComplete=!0,void this._emitCacheCompleteEvent();this._accTime=0,r=0,this._emitCacheCompleteEvent()}this._curFrame=i[r]}},_updateRealtime:function(t){var e=this._skeleton,i=this._state;e&&(e.update(t),i&&(i.update(t),i.apply(e)))},setVertexEffectDelegate:function(t){this._effectDelegate=t},updateWorldTransform:function(){this.isAnimationCached()&&this._skeleton&&this._skeleton.updateWorldTransform()},setToSetupPose:function(){this._skeleton&&this._skeleton.setToSetupPose()},setBonesToSetupPose:function(){this._skeleton&&this._skeleton.setBonesToSetupPose()},setSlotsToSetupPose:function(){this._skeleton&&this._skeleton.setSlotsToSetupPose()},updateAnimationCache:function(t){if(this.isAnimationCached()){var e=this.skeletonData._uuid;this._skeletonCache&&this._skeletonCache.updateAnimationCache(e,t)}},invalidAnimationCache:function(){this.isAnimationCached()&&this._skeletonCache&&this._skeletonCache.invalidAnimationCache(this.skeletonData._uuid)},findBone:function(t){return this._skeleton?this._skeleton.findBone(t):null},findSlot:function(t){return this._skeleton?this._skeleton.findSlot(t):null},setSkin:function(t){this._skeleton&&(this._skeleton.setSkinByName(t),this._skeleton.setSlotsToSetupPose()),this.invalidAnimationCache()},getAttachment:function(t,e){return this._skeleton?this._skeleton.getAttachmentByName(t,e):null},setAttachment:function(t,e){this._skeleton&&this._skeleton.setAttachment(t,e),this.invalidAnimationCache()},getTextureAtlas:function(t){return t.region},setMix:function(t,e,i){this._state&&this._state.data.setMix(t,e,i)},setAnimation:function(t,e,i){if(this._playTimes=i?0:1,this._animationName=e,this.isAnimationCached()){if(0!==t&&cc.warn("Track index can not greater than 0 in cached mode."),!this._skeletonCache)return null;var n=this._skeletonCache.getAnimationCache(this.skeletonData._uuid,e);n||(n=this._skeletonCache.initAnimationCache(this.skeletonData._uuid,e)),n&&(this._isAniComplete=!1,this._accTime=0,this._playCount=0,this._frameCache=n,this.attachUtil._hasAttachedNode()&&this._frameCache.enableCacheAttachedInfo(),this._frameCache.updateToFrame(0),this._curFrame=this._frameCache.frames[0])}else if(this._skeleton){var r=this._skeleton.data.findAnimation(e);if(!r)return cc.logID(7509,e),null;var s=this._state.setAnimationWith(t,r,i);return this._state.apply(this._skeleton),s}return null},addAnimation:function(t,e,i,n){if(n=n||0,this.isAnimationCached())0!==t&&cc.warn("Track index can not greater than 0 in cached mode."),this._animationQueue.push({animationName:e,loop:i,delay:n});else if(this._skeleton){var r=this._skeleton.data.findAnimation(e);return r?this._state.addAnimationWith(t,r,i,n):(cc.logID(7510,e),null)}return null},findAnimation:function(t){return this._skeleton?this._skeleton.data.findAnimation(t):null},getCurrent:function(t){if(this.isAnimationCached())cc.warn("'getCurrent' interface can not be invoked in cached mode.");else if(this._state)return this._state.getCurrent(t);return null},clearTracks:function(){this.isAnimationCached()?cc.warn("'clearTracks' interface can not be invoked in cached mode."):this._state&&this._state.clearTracks()},clearTrack:function(t){this.isAnimationCached()?cc.warn("'clearTrack' interface can not be invoked in cached mode."):this._state&&this._state.clearTrack(t)},setStartListener:function(t){this._ensureListener(),this._listener.start=t},setInterruptListener:function(t){this._ensureListener(),this._listener.interrupt=t},setEndListener:function(t){this._ensureListener(),this._listener.end=t},setDisposeListener:function(t){this._ensureListener(),this._listener.dispose=t},setCompleteListener:function(t){this._ensureListener(),this._listener.complete=t},setEventListener:function(t){this._ensureListener(),this._listener.event=t},setTrackStartListener:function(t,e){i.getListeners(t).start=e},setTrackInterruptListener:function(t,e){i.getListeners(t).interrupt=e},setTrackEndListener:function(t,e){i.getListeners(t).end=e},setTrackDisposeListener:function(t,e){i.getListeners(t).dispose=e},setTrackCompleteListener:function(t,e){i.getListeners(t).complete=function(t){var i=Math.floor(t.trackTime/t.animationEnd);e(t,i)}},setTrackEventListener:function(t,e){i.getListeners(t).event=e},getState:function(){return this._state},_updateAnimEnum:!1,_updateSkinEnum:!1,_ensureListener:function(){this._listener||(this._listener=new i,this._state&&this._state.addListener(this._listener))},_updateSkeletonData:function(){if(this.skeletonData){var t=this.skeletonData.getRuntimeData();if(t){try{this.setSkeletonData(t),this.isAnimationCached()||this.setAnimationStateData(new r.AnimationStateData(this._skeleton.data)),this.defaultSkin&&this.setSkin(this.defaultSkin)}catch(e){cc.warn(e)}this.attachUtil.init(this),this.attachUtil._associateAttachedNode(),this._preCacheMode=this._cacheMode,this.animation=this.defaultAnimation}else this.disableRender()}else this.disableRender()},_refreshInspector:function(){this._updateAnimEnum(),this._updateSkinEnum(),Editor.Utils.refreshSelectedInspector("node",this.node.uuid)},_updateDebugDraw:function(){if(this.debugBones||this.debugSlots){if(!this._debugRenderer){var t=new cc.PrivateNode;t.name="DEBUG_DRAW_NODE";var e=t.addComponent(s);e.lineWidth=1,e.strokeColor=cc.color(255,0,0,255),this._debugRenderer=e}this._debugRenderer.node.parent=this.node,this.isAnimationCached()&&cc.warn("Debug bones or slots is invalid in cached mode")}else this._debugRenderer&&(this._debugRenderer.node.parent=null)}}),e.exports=sp.Skeleton}),{"../../cocos2d/core/components/CCRenderComponent":159,"../../cocos2d/core/graphics/graphics":201,"../../cocos2d/core/renderer/render-flow":271,"./AttachUtil":424,"./lib/spine":427,"./skeleton-cache":428,"./track-entry-listeners":432}],426:[(function(t){"use strict";var e="undefined"==typeof window?global:window;e.spine=t("./lib/spine"),e.sp={},sp._timeScale=1,Object.defineProperty(sp,"timeScale",{get:function(){return this._timeScale},set:function(t){this._timeScale=t},configurable:!0}),sp.ATTACHMENT_TYPE={REGION:0,BOUNDING_BOX:1,MESH:2,SKINNED_MESH:3},sp.AnimationEventType=cc.Enum({START:0,INTERRUPT:1,END:2,DISPOSE:3,COMPLETE:4,EVENT:5}),sp.spine=e.spine,t("./skeleton-texture"),t("./skeleton-data"),t("./vertex-effect-delegate"),t("./Skeleton"),t("./spine-assembler")}),{"./Skeleton":425,"./lib/spine":427,"./skeleton-data":429,"./skeleton-texture":430,"./spine-assembler":431,"./vertex-effect-delegate":433}],427:[(function(t,e){"use strict";var i,n,r,s=(i=function(t,e){return(i=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])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});(function(t){var e,i,n,r=(function(){function t(t,e,i){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var n=0;n0&&(e%=this.duration));for(var l=this.timelines,c=0,h=l.length;c>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.linearSearch=function(t,e,i){for(var n=0,r=t.length-i;n<=r;n+=i)if(t[n]>e)return n;return-1},t})();t.Animation=r,(function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"})(e=t.MixBlend||(t.MixBlend={})),(function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"})(i=t.MixDirection||(t.MixDirection={})),(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(n=t.TimelineType||(t.TimelineType={}));var a=(function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var a=.03*(2*-i+r),o=.03*(2*-n+s),l=.006*(3*(i-r)+1),c=.006*(3*(n-s)+1),h=2*a+l,u=2*o+c,_=.3*i+a+.16666667*l,f=.3*n+o+.16666667*c,d=t*e.BEZIER_SIZE,p=this.curves;p[d++]=e.BEZIER;for(var m=_,y=f,v=d+e.BEZIER_SIZE-1;d=n){var h=void 0,u=void 0;return s==l?(h=0,u=0):(h=r[s-2],u=r[s-1]),u+(r[s+1]-u)*(n-h)/(o-h)}var _=r[s-1];return _+(1-_)*(n-o)/(1-o)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e})();t.CurveTimeline=a;var o=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=i},a.prototype.apply=function(t,i,n,s,o,l){var c=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=c[c.length-a.ENTRIES]){var _=c[c.length+a.PREV_ROTATION];switch(l){case e.setup:h.rotation=h.data.rotation+_*o;break;case e.first:case e.replace:_+=h.data.rotation-h.rotation,_-=360*(16384-(16384.499999999996-_/360|0));case e.add:h.rotation+=_*o}}else{var f=r.binarySearch(c,n,a.ENTRIES),d=c[f+a.PREV_ROTATION],p=c[f],m=this.getCurvePercent((f>>1)-1,1-(n-p)/(c[f+a.PREV_TIME]-p)),y=c[f+a.ROTATION]-d;switch(y=d+(y-360*(16384-(16384.499999999996-y/360|0)))*m,l){case e.setup:h.rotation=h.data.rotation+(y-360*(16384-(16384.499999999996-y/360|0)))*o;break;case e.first:case e.replace:y+=h.data.rotation-h.rotation;case e.add:h.rotation+=(y-360*(16384-(16384.499999999996-y/360|0)))*o}}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a})(a);t.RotateTimeline=o;var l=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=i,this.frames[t+a.Y]=n},a.prototype.apply=function(t,i,n,s,o,l){var c=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=c[c.length-a.ENTRIES])u=c[c.length+a.PREV_X],_=c[c.length+a.PREV_Y];else{var f=r.binarySearch(c,n,a.ENTRIES);u=c[f+a.PREV_X],_=c[f+a.PREV_Y];var d=c[f],p=this.getCurvePercent(f/a.ENTRIES-1,1-(n-d)/(c[f+a.PREV_TIME]-d));u+=(c[f+a.X]-u)*p,_+=(c[f+a.Y]-_)*p}switch(l){case e.setup:h.x=h.data.x+u*o,h.y=h.data.y+_*o;break;case e.first:case e.replace:h.x+=(h.data.x+u-h.x)*o,h.y+=(h.data.y+_-h.y)*o;break;case e.add:h.x+=u*o,h.y+=_*o}}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_X=-2,a.PREV_Y=-1,a.X=1,a.Y=2,a})(a);t.TranslateTimeline=l;var c=(function(a){function o(t){return a.call(this,t)||this}return s(o,a),o.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},o.prototype.apply=function(n,s,a,l,c,h,u){var _=this.frames,f=n.bones[this.boneIndex];if(f.active)if(a<_[0])switch(h){case e.setup:return f.scaleX=f.data.scaleX,void(f.scaleY=f.data.scaleY);case e.first:f.scaleX+=(f.data.scaleX-f.scaleX)*c,f.scaleY+=(f.data.scaleY-f.scaleY)*c}else{var d=0,p=0;if(a>=_[_.length-o.ENTRIES])d=_[_.length+o.PREV_X]*f.data.scaleX,p=_[_.length+o.PREV_Y]*f.data.scaleY;else{var m=r.binarySearch(_,a,o.ENTRIES);d=_[m+o.PREV_X],p=_[m+o.PREV_Y];var y=_[m],v=this.getCurvePercent(m/o.ENTRIES-1,1-(a-y)/(_[m+o.PREV_TIME]-y));d=(d+(_[m+o.X]-d)*v)*f.data.scaleX,p=(p+(_[m+o.Y]-p)*v)*f.data.scaleY}if(1==c)h==e.add?(f.scaleX+=d-f.data.scaleX,f.scaleY+=p-f.data.scaleY):(f.scaleX=d,f.scaleY=p);else{var g=0,b=0;if(u==i.mixOut)switch(h){case e.setup:g=f.data.scaleX,b=f.data.scaleY,f.scaleX=g+(Math.abs(d)*t.MathUtils.signum(g)-g)*c,f.scaleY=b+(Math.abs(p)*t.MathUtils.signum(b)-b)*c;break;case e.first:case e.replace:g=f.scaleX,b=f.scaleY,f.scaleX=g+(Math.abs(d)*t.MathUtils.signum(g)-g)*c,f.scaleY=b+(Math.abs(p)*t.MathUtils.signum(b)-b)*c;break;case e.add:g=f.scaleX,b=f.scaleY,f.scaleX=g+(Math.abs(d)*t.MathUtils.signum(g)-f.data.scaleX)*c,f.scaleY=b+(Math.abs(p)*t.MathUtils.signum(b)-f.data.scaleY)*c}else switch(h){case e.setup:g=Math.abs(f.data.scaleX)*t.MathUtils.signum(d),b=Math.abs(f.data.scaleY)*t.MathUtils.signum(p),f.scaleX=g+(d-g)*c,f.scaleY=b+(p-b)*c;break;case e.first:case e.replace:g=Math.abs(f.scaleX)*t.MathUtils.signum(d),b=Math.abs(f.scaleY)*t.MathUtils.signum(p),f.scaleX=g+(d-g)*c,f.scaleY=b+(p-b)*c;break;case e.add:g=t.MathUtils.signum(d),b=t.MathUtils.signum(p),f.scaleX=Math.abs(f.scaleX)*g+(d-Math.abs(f.data.scaleX)*g)*c,f.scaleY=Math.abs(f.scaleY)*b+(p-Math.abs(f.data.scaleY)*b)*c}}}},o})(l);t.ScaleTimeline=c;var h=(function(t){function i(e){return t.call(this,e)||this}return s(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,s,a,o,l){var c=this.frames,h=t.bones[this.boneIndex];if(h.active)if(s=c[c.length-i.ENTRIES])u=c[c.length+i.PREV_X],_=c[c.length+i.PREV_Y];else{var f=r.binarySearch(c,s,i.ENTRIES);u=c[f+i.PREV_X],_=c[f+i.PREV_Y];var d=c[f],p=this.getCurvePercent(f/i.ENTRIES-1,1-(s-d)/(c[f+i.PREV_TIME]-d));u+=(c[f+i.X]-u)*p,_+=(c[f+i.Y]-_)*p}switch(l){case e.setup:h.shearX=h.data.shearX+u*o,h.shearY=h.data.shearY+_*o;break;case e.first:case e.replace:h.shearX+=(h.data.shearX+u-h.shearX)*o,h.shearY+=(h.data.shearY+_-h.shearY)*o;break;case e.add:h.shearX+=u*o,h.shearY+=_*o}}},i})(l);t.ShearTimeline=h;var u=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,this.frames[t+a.B]=r,this.frames[t+a.A]=s},a.prototype.apply=function(t,i,n,s,o,l){var c=t.slots[this.slotIndex];if(c.bone.active){var h=this.frames;if(n=h[h.length-a.ENTRIES]){var y=h.length;f=h[y+a.PREV_R],d=h[y+a.PREV_G],p=h[y+a.PREV_B],m=h[y+a.PREV_A]}else{var v=r.binarySearch(h,n,a.ENTRIES);f=h[v+a.PREV_R],d=h[v+a.PREV_G],p=h[v+a.PREV_B],m=h[v+a.PREV_A];var g=h[v],b=this.getCurvePercent(v/a.ENTRIES-1,1-(n-g)/(h[v+a.PREV_TIME]-g));f+=(h[v+a.R]-f)*b,d+=(h[v+a.G]-d)*b,p+=(h[v+a.B]-p)*b,m+=(h[v+a.A]-m)*b}1==o?c.color.set(f,d,p,m):(u=c.color,l==e.setup&&u.setFromColor(c.data.color),u.add((f-u.r)*o,(d-u.g)*o,(p-u.b)*o,(m-u.a)*o))}}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_R=-4,a.PREV_G=-3,a.PREV_B=-2,a.PREV_A=-1,a.R=1,a.G=2,a.B=3,a.A=4,a})(a);t.ColorTimeline=u;var _=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,i,n,r,s,o,l,c){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=i,this.frames[t+a.G]=n,this.frames[t+a.B]=r,this.frames[t+a.A]=s,this.frames[t+a.R2]=o,this.frames[t+a.G2]=l,this.frames[t+a.B2]=c},a.prototype.apply=function(t,i,n,s,o,l){var c=t.slots[this.slotIndex];if(c.bone.active){var h=this.frames;if(n=h[h.length-a.ENTRIES]){var x=h.length;p=h[x+a.PREV_R],m=h[x+a.PREV_G],y=h[x+a.PREV_B],v=h[x+a.PREV_A],g=h[x+a.PREV_R2],b=h[x+a.PREV_G2],A=h[x+a.PREV_B2]}else{var C=r.binarySearch(h,n,a.ENTRIES);p=h[C+a.PREV_R],m=h[C+a.PREV_G],y=h[C+a.PREV_B],v=h[C+a.PREV_A],g=h[C+a.PREV_R2],b=h[C+a.PREV_G2],A=h[C+a.PREV_B2];var T=h[C],S=this.getCurvePercent(C/a.ENTRIES-1,1-(n-T)/(h[C+a.PREV_TIME]-T));p+=(h[C+a.R]-p)*S,m+=(h[C+a.G]-m)*S,y+=(h[C+a.B]-y)*S,v+=(h[C+a.A]-v)*S,g+=(h[C+a.R2]-g)*S,b+=(h[C+a.G2]-b)*S,A+=(h[C+a.B2]-A)*S}1==o?(c.color.set(p,m,y,v),c.darkColor.set(g,b,A,1)):(u=c.color,_=c.darkColor,l==e.setup&&(u.setFromColor(c.data.color),_.setFromColor(c.data.darkColor)),u.add((p-u.r)*o,(m-u.g)*o,(y-u.b)*o,(v-u.a)*o),_.add((g-_.r)*o,(b-_.g)*o,(A-_.b)*o,0))}}},a.ENTRIES=8,a.PREV_TIME=-8,a.PREV_R=-7,a.PREV_G=-6,a.PREV_B=-5,a.PREV_A=-4,a.PREV_R2=-3,a.PREV_G2=-2,a.PREV_B2=-1,a.R=1,a.G=2,a.B=3,a.A=4,a.R2=5,a.G2=6,a.B2=7,a})(a);t.TwoColorTimeline=_;var f=(function(){function s(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return s.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},s.prototype.getFrameCount=function(){return this.frames.length},s.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},s.prototype.apply=function(t,n,s,a,o,l,c){var h=t.slots[this.slotIndex];if(h.bone.active)if(c!=i.mixOut||l!=e.setup){var u=this.frames;if(s=u[u.length-1]?u.length-1:r.binarySearch(u,s,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else{var p=h.data.attachmentName;h.setAttachment(null==p?null:t.getAttachment(this.slotIndex,p))}},s})();t.AttachmentTimeline=f;var d=null,p=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==d&&(d=t.Utils.newFloatArray(64)),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},a.prototype.apply=function(i,n,s,a,o,l){var c=i.slots[this.slotIndex];if(c.bone.active){var h=c.getAttachment();if(h instanceof t.VertexAttachment&&h.deformAttachment==this.attachment){var u=c.deform;0==u.length&&(l=e.setup);var _=this.frameVertices,f=_[0].length,d=this.frames;if(s=d[d.length-1]){var b=_[d.length-1];if(1==o)if(l==e.add)if(null==(p=h).bones){y=p.vertices;for(var A=0;Ai)this.apply(t,e,Number.MAX_VALUE,n,s,a,o),e=-1;else if(e>=l[c-1])return;if(!(i0&&l[h-1]==u;)h--;for(;h=l[h];h++)n.push(this.events[h])}}},e})();t.EventTimeline=m;var y=(function(){function s(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return s.prototype.getPropertyId=function(){return n.drawOrder<<24},s.prototype.getFrameCount=function(){return this.frames.length},s.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},s.prototype.apply=function(n,s,a,o,l,c,h){var u=n.drawOrder,_=n.slots;if(h!=i.mixOut||c!=e.setup){var f=this.frames;if(a=f[f.length-1]?f.length-1:r.binarySearch(f,a)-1;var p=this.drawOrders[d];if(null==p)t.Utils.arrayCopy(_,0,u,0,_.length);else for(var m=0,y=p.length;m=u[u.length-o.ENTRIES])c==e.setup?(_.mix=_.data.mix+(u[u.length+o.PREV_MIX]-_.data.mix)*l,_.softness=_.data.softness+(u[u.length+o.PREV_SOFTNESS]-_.data.softness)*l,h==i.mixOut?(_.bendDirection=_.data.bendDirection,_.compress=_.data.compress,_.stretch=_.data.stretch):(_.bendDirection=u[u.length+o.PREV_BEND_DIRECTION],_.compress=0!=u[u.length+o.PREV_COMPRESS],_.stretch=0!=u[u.length+o.PREV_STRETCH])):(_.mix+=(u[u.length+o.PREV_MIX]-_.mix)*l,_.softness+=(u[u.length+o.PREV_SOFTNESS]-_.softness)*l,h==i.mixIn&&(_.bendDirection=u[u.length+o.PREV_BEND_DIRECTION],_.compress=0!=u[u.length+o.PREV_COMPRESS],_.stretch=0!=u[u.length+o.PREV_STRETCH]));else{var f=r.binarySearch(u,s,o.ENTRIES),d=u[f+o.PREV_MIX],p=u[f+o.PREV_SOFTNESS],m=u[f],y=this.getCurvePercent(f/o.ENTRIES-1,1-(s-m)/(u[f+o.PREV_TIME]-m));c==e.setup?(_.mix=_.data.mix+(d+(u[f+o.MIX]-d)*y-_.data.mix)*l,_.softness=_.data.softness+(p+(u[f+o.SOFTNESS]-p)*y-_.data.softness)*l,h==i.mixOut?(_.bendDirection=_.data.bendDirection,_.compress=_.data.compress,_.stretch=_.data.stretch):(_.bendDirection=u[f+o.PREV_BEND_DIRECTION],_.compress=0!=u[f+o.PREV_COMPRESS],_.stretch=0!=u[f+o.PREV_STRETCH])):(_.mix+=(d+(u[f+o.MIX]-d)*y-_.mix)*l,_.softness+=(p+(u[f+o.SOFTNESS]-p)*y-_.softness)*l,h==i.mixIn&&(_.bendDirection=u[f+o.PREV_BEND_DIRECTION],_.compress=0!=u[f+o.PREV_COMPRESS],_.stretch=0!=u[f+o.PREV_STRETCH]))}},o.ENTRIES=6,o.PREV_TIME=-6,o.PREV_MIX=-5,o.PREV_SOFTNESS=-4,o.PREV_BEND_DIRECTION=-3,o.PREV_COMPRESS=-2,o.PREV_STRETCH=-1,o.MIX=1,o.SOFTNESS=2,o.BEND_DIRECTION=3,o.COMPRESS=4,o.STRETCH=5,o})(a);t.IkConstraintTimeline=v;var g=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,i,n,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n,this.frames[t+a.SCALE]=r,this.frames[t+a.SHEAR]=s},a.prototype.apply=function(t,i,n,s,o,l){var c=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=c[c.length-a.ENTRIES]){var m=c.length;_=c[m+a.PREV_ROTATE],f=c[m+a.PREV_TRANSLATE],d=c[m+a.PREV_SCALE],p=c[m+a.PREV_SHEAR]}else{var y=r.binarySearch(c,n,a.ENTRIES);_=c[y+a.PREV_ROTATE],f=c[y+a.PREV_TRANSLATE],d=c[y+a.PREV_SCALE],p=c[y+a.PREV_SHEAR];var v=c[y],g=this.getCurvePercent(y/a.ENTRIES-1,1-(n-v)/(c[y+a.PREV_TIME]-v));_+=(c[y+a.ROTATE]-_)*g,f+=(c[y+a.TRANSLATE]-f)*g,d+=(c[y+a.SCALE]-d)*g,p+=(c[y+a.SHEAR]-p)*g}l==e.setup?(u=h.data,h.rotateMix=u.rotateMix+(_-u.rotateMix)*o,h.translateMix=u.translateMix+(f-u.translateMix)*o,h.scaleMix=u.scaleMix+(d-u.scaleMix)*o,h.shearMix=u.shearMix+(p-u.shearMix)*o):(h.rotateMix+=(_-h.rotateMix)*o,h.translateMix+=(f-h.translateMix)*o,h.scaleMix+=(d-h.scaleMix)*o,h.shearMix+=(p-h.shearMix)*o)}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_ROTATE=-4,a.PREV_TRANSLATE=-3,a.PREV_SCALE=-2,a.PREV_SHEAR=-1,a.ROTATE=1,a.TRANSLATE=2,a.SCALE=3,a.SHEAR=4,a})(a);t.TransformConstraintTimeline=g;var b=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=i},a.prototype.apply=function(t,i,n,s,o,l){var c=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=c[c.length-a.ENTRIES])u=c[c.length+a.PREV_VALUE];else{var _=r.binarySearch(c,n,a.ENTRIES);u=c[_+a.PREV_VALUE];var f=c[_],d=this.getCurvePercent(_/a.ENTRIES-1,1-(n-f)/(c[_+a.PREV_TIME]-f));u+=(c[_+a.VALUE]-u)*d}l==e.setup?h.position=h.data.position+(u-h.data.position)*o:h.position+=(u-h.position)*o}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_VALUE=-1,a.VALUE=1,a})(a);t.PathConstraintPositionTimeline=b;var A=(function(t){function i(e){return t.call(this,e)||this}return s(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,s,a,o,l){var c=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(s=c[c.length-i.ENTRIES])u=c[c.length+i.PREV_VALUE];else{var _=r.binarySearch(c,s,i.ENTRIES);u=c[_+i.PREV_VALUE];var f=c[_],d=this.getCurvePercent(_/i.ENTRIES-1,1-(s-f)/(c[_+i.PREV_TIME]-f));u+=(c[_+i.VALUE]-u)*d}l==e.setup?h.spacing=h.data.spacing+(u-h.data.spacing)*o:h.spacing+=(u-h.spacing)*o}},i})(b);t.PathConstraintSpacingTimeline=A;var x=(function(i){function a(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*a.ENTRIES),n}return s(a,i),a.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,i,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=i,this.frames[t+a.TRANSLATE]=n},a.prototype.apply=function(t,i,n,s,o,l){var c=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=c[c.length-a.ENTRIES])u=c[c.length+a.PREV_ROTATE],_=c[c.length+a.PREV_TRANSLATE];else{var f=r.binarySearch(c,n,a.ENTRIES);u=c[f+a.PREV_ROTATE],_=c[f+a.PREV_TRANSLATE];var d=c[f],p=this.getCurvePercent(f/a.ENTRIES-1,1-(n-d)/(c[f+a.PREV_TIME]-d));u+=(c[f+a.ROTATE]-u)*p,_+=(c[f+a.TRANSLATE]-_)*p}l==e.setup?(h.rotateMix=h.data.rotateMix+(u-h.data.rotateMix)*o,h.translateMix=h.data.translateMix+(_-h.data.translateMix)*o):(h.rotateMix+=(u-h.rotateMix)*o,h.translateMix+=(_-h.translateMix)*o)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_ROTATE=-2,a.PREV_TRANSLATE=-1,a.ROTATE=1,a.TRANSLATE=2,a})(a);t.PathConstraintMixTimeline=x})(r||(r={})),(function(t){var e=(function(){function e(e){this.tracks=new Array,this.timeScale=1,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool(function(){return new i}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){if(r.delay-=s,r.delay>0)continue;s=-r.delay,r.delay=0}var a=r.next;if(null!=a){var o=r.trackLast-a.delay;if(o>=0){for(a.delay=0,a.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*a.timeScale,r.trackTime+=s,this.setCurrent(i,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[i]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var l=r.mixingFrom;for(r.mixingFrom=null,null!=l&&(l.mixingTo=null);null!=l;)this.queue.end(l),l=l.mixingFrom}r.trackTime+=s}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,null!=i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=this.events,r=this.tracks,s=!1,a=0,o=r.length;a0)){s=!0;var c=0==a?t.MixBlend.first:l.mixBlend,h=l.alpha;null!=l.mixingFrom?h*=this.applyMixingFrom(l,i,c):l.trackTime>=l.trackEnd&&null==l.next&&(h=0);var u=l.animationLast,_=l.getAnimationTime(),f=l.animation.timelines.length,d=l.animation.timelines;if(0==a&&1==h||c==t.MixBlend.add)for(var p=0;p1&&(a=1),r!=t.MixBlend.first&&(r=s.mixBlend));var o=a0&&this.queueEvents(s,u),this.events.length=0,s.nextAnimationLast=u,s.nextTrackLast=s.trackTime,a},e.prototype.applyRotateTimeline=function(e,i,n,r,s,a,o,l){if(l&&(a[o]=0),1!=r){var c=e,h=c.frames,u=i.bones[c.boneIndex];if(u.active){var _=0,f=0;if(n=h[h.length-t.RotateTimeline.ENTRIES])f=u.data.rotation+h[h.length+t.RotateTimeline.PREV_ROTATION];else{var d=t.Animation.binarySearch(h,n,t.RotateTimeline.ENTRIES),p=h[d+t.RotateTimeline.PREV_ROTATION],m=h[d],y=c.getCurvePercent((d>>1)-1,1-(n-m)/(h[d+t.RotateTimeline.PREV_TIME]-m));f=h[d+t.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*y+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0))}var v=0,g=f-_;if(0==(g-=360*(16384-(16384.499999999996-g/360|0))))v=a[o];else{var b=0,A=0;l?(b=0,A=g):(b=a[o],A=a[o+1]);var x=g>0,C=b>=0;t.MathUtils.signum(A)!=t.MathUtils.signum(g)&&Math.abs(A)<=90&&(Math.abs(b)>180&&(b+=360*t.MathUtils.signum(b)),C=x),v=g+b-b%360,C!=x&&(v+=360*t.MathUtils.signum(b)),a[o]=v}a[o+1]=g,_+=v*r,u.rotation=_-360*(16384-(16384.499999999996-_/360|0))}}else e.apply(i,0,n,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,a=this.events,o=0,l=a.length;on||this.queue.event(t,c)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var i=e;;){var n=i.mixingFrom;if(null==n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,i){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(i&&this.queue.interrupt(n),e.mixingFrom=n,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s=this.trackEntry(t,e,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var a=r.animationEnd-r.animationStart;0!=a?(r.loop?n+=a*(1+(r.trackTime/a|0)):n+=Math.max(a,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i=0;e--)for(var n=this.tracks[e];null!=n;)this.computeNotLast(n),n=n.mixingFrom},e.prototype.computeHold=function(i){var n=i.mixingTo,r=i.animation.timelines,s=i.animation.timelines.length,a=t.Utils.setArraySize(i.timelineMode,s);i.timelineHoldMix.length=0;var o=t.Utils.setArraySize(i.timelineHoldMix,s),l=this.propertyIDs;if(null!=n&&n.holdPrevious)for(var c=0;c0){a[c]=e.HOLD_MIX,o[c]=_;continue t}break}a[c]=e.HOLD}else a[c]=e.SUBSEQUENT}},e.prototype.computeNotLast=function(i){for(var n=i.animation.timelines,r=i.animation.timelines.length,s=i.timelineMode,a=this.propertyIDs,o=0;o=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD=2,e.HOLD_MIX=3,e.NOT_LAST=4,e})();t.AnimationState=e;var i=(function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e})();t.TrackEntry=i;var n,r=(function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,i=0;i=0?i.substring(0,i.lastIndexOf("/")):"";i=this.pathPrefix+i,this.toLoad++,e.downloadText(i,(function(e){var o={count:0},l=new Array;try{new t.TextureAtlas(e,function(e){l.push(a+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)})}catch(f){var c=f;return s.errors[i]="Couldn't load texture atlas "+i+": "+c.message,r&&r(i,"Couldn't load texture atlas "+i+": "+c.message),s.toLoad--,void s.loaded++}for(var h=function(c){var h=!1;s.loadTexture(c,(function(c){if(o.count++,o.count==l.length)if(h)s.errors[i]="Couldn't load texture atlas page "+c+"} of atlas "+i,r&&r(i,"Couldn't load texture atlas page "+c+" of atlas "+i),s.toLoad--,s.loaded++;else try{var u=new t.TextureAtlas(e,function(t){return s.get(a+"/"+t)});s.assets[i]=u,n&&n(i,u),s.toLoad--,s.loaded++}catch(f){var _=f;s.errors[i]="Couldn't load texture atlas "+i+": "+_.message,r&&r(i,"Couldn't load texture atlas "+i+": "+_.message),s.toLoad--,s.loaded++}}),(function(t){h=!0,o.count++,o.count==l.length&&(s.errors[i]="Couldn't load texture atlas page "+t+"} of atlas "+i,r&&r(i,"Couldn't load texture atlas page "+t+" of atlas "+i),s.toLoad--,s.loaded++)}))},u=0,_=l;u<_.length;u++)h(_[u])}),(function(t,e){s.errors[i]="Couldn't load texture atlas "+i+": status "+status+", "+e,r&&r(i,"Couldn't load texture atlas "+i+": status "+status+", "+e),s.toLoad--,s.loaded++}))},e.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},e.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},e.prototype.removeAll=function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}},e.prototype.isLoadingComplete=function(){return 0==this.toLoad},e.prototype.getToLoad=function(){return this.toLoad},e.prototype.getLoaded=function(){return this.loaded},e.prototype.dispose=function(){this.removeAll()},e.prototype.hasErrors=function(){return Object.keys(this.errors).length>0},e.prototype.getErrors=function(){return this.errors},e})();t.AssetManager=e})(r||(r={})),(function(t){var e=(function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)return null;r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)return null;r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e})();t.AtlasAttachmentLoader=e})(r||(r={})),(function(t){(function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"})(t.BlendMode||(t.BlendMode={}))})(r||(r={})),(function(t){var e=(function(){function e(t,e,i){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,i,n,r,s,a,o){this.ax=e,this.ay=i,this.arotation=n,this.ascaleX=r,this.ascaleY=s,this.ashearX=a,this.ashearY=o,this.appliedValid=!0;var l=this.parent;if(null==l){var c=this.skeleton,h=n+90+o,u=c.scaleX,_=c.scaleY;return this.a=t.MathUtils.cosDeg(n+a)*r*u,this.b=t.MathUtils.cosDeg(h)*s*u,this.c=t.MathUtils.sinDeg(n+a)*r*_,this.d=t.MathUtils.sinDeg(h)*s*_,this.worldX=e*u+c.x,void(this.worldY=i*_+c.y)}var f=l.a,d=l.b,p=l.c,m=l.d;switch(this.worldX=f*e+d*i+l.worldX,this.worldY=p*e+m*i+l.worldY,this.data.transformMode){case t.TransformMode.Normal:h=n+90+o;var y=t.MathUtils.cosDeg(n+a)*r,v=t.MathUtils.cosDeg(h)*s,g=t.MathUtils.sinDeg(n+a)*r,b=t.MathUtils.sinDeg(h)*s;return this.a=f*y+d*g,this.b=f*v+d*b,this.c=p*y+m*g,void(this.d=p*v+m*b);case t.TransformMode.OnlyTranslation:h=n+90+o,this.a=t.MathUtils.cosDeg(n+a)*r,this.b=t.MathUtils.cosDeg(h)*s,this.c=t.MathUtils.sinDeg(n+a)*r,this.d=t.MathUtils.sinDeg(h)*s;break;case t.TransformMode.NoRotationOrReflection:var A=0;(T=f*f+p*p)>1e-4?(d=p*(T=Math.abs(f*m-d*p)/T),m=f*T,A=Math.atan2(p,f)*t.MathUtils.radDeg):(f=0,p=0,A=90-Math.atan2(m,d)*t.MathUtils.radDeg);var x=n+a-A,C=n+o-A+90;y=t.MathUtils.cosDeg(x)*r,v=t.MathUtils.cosDeg(C)*s,g=t.MathUtils.sinDeg(x)*r,b=t.MathUtils.sinDeg(C)*s,this.a=f*y-d*g,this.b=f*v-d*b,this.c=p*y+m*g,this.d=p*v+m*b;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var T,S=t.MathUtils.cosDeg(n),w=t.MathUtils.sinDeg(n),E=(f*S+d*w)/this.skeleton.scaleX,M=(p*S+m*w)/this.skeleton.scaleY;(T=Math.sqrt(E*E+M*M))>1e-5&&(T=1/T),E*=T,M*=T,T=Math.sqrt(E*E+M*M),this.data.transformMode==t.TransformMode.NoScale&&f*m-d*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(T=-T);var D=Math.PI/2+Math.atan2(M,E),B=Math.cos(D)*T,I=Math.sin(D)*T;y=t.MathUtils.cosDeg(a)*r,v=t.MathUtils.cosDeg(90+o)*s,g=t.MathUtils.sinDeg(a)*r,b=t.MathUtils.sinDeg(90+o)*s,this.a=E*y+B*g,this.b=E*v+B*b,this.c=M*y+I*g,this.d=M*v+I*b}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var i=e.a,n=e.b,r=e.c,s=e.d,a=1/(i*s-n*r),o=this.worldX-e.worldX,l=this.worldY-e.worldY;this.ax=o*s*a-l*n*a,this.ay=l*i*a-o*r*a;var c=a*s,h=a*i,u=a*n,_=a*r,f=c*this.a-u*this.c,d=c*this.b-u*this.d,p=h*this.c-_*this.a,m=h*this.d-_*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+p*p),this.ascaleX>1e-4){var y=f*m-d*p;this.ascaleY=y/this.ascaleX,this.ashearY=Math.atan2(f*d+p*m,y)*t.MathUtils.radDeg,this.arotation=Math.atan2(p,f)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,d)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*i*s,t.y=o*e*s-a*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,a=t.MathUtils.cosDeg(e),o=t.MathUtils.sinDeg(e);this.a=a*i-o*r,this.b=a*n-o*s,this.c=o*i+a*r,this.d=o*n+a*s,this.appliedValid=!1},e})();t.Bone=e})(r||(r={})),(function(t){var e;t.BoneData=function(i,n,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,i<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=i,this.name=n,this.parent=r},(function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"})(e=t.TransformMode||(t.TransformMode={}))})(r||(r={})),(function(t){t.ConstraintData=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i}})(r||(r={})),(function(t){t.Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}})(r||(r={})),(function(t){t.EventData=function(t){this.name=t}})(r||(r={})),(function(t){var e=(function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var i=0;i180?d-=360:d<-180&&(d+=360);var p=e.ascaleX,m=e.ascaleY;if(r||s){var y=e.data.length*p,v=Math.sqrt(_*_+f*f);if(r&&vy&&y>1e-4){var g=(v/y-1)*o+1;p*=g,a&&(m*=g)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*o,p,m,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,a,o,l){if(0!=l){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var c=e.ax,h=e.ay,u=e.ascaleX,_=u,f=e.ascaleY,d=i.ascaleX,p=0,m=0,y=0;u<0?(u=-u,p=180,y=-1):(p=0,y=1),f<0&&(f=-f,y=-y),d<0?(d=-d,m=180):m=0;var v=i.ax,g=0,b=0,A=0,x=e.a,C=e.b,T=e.c,S=e.d,w=Math.abs(u-f)<=1e-4;w?(b=x*v+C*(g=i.ay)+e.worldX,A=T*v+S*g+e.worldY):(g=0,b=x*v+e.worldX,A=T*v+e.worldY);var E=e.parent;x=E.a,C=E.b,T=E.c;var M,D,B=1/(x*(S=E.d)-C*T),I=b-E.worldX,P=A-E.worldY,R=(I*S-P*C)*B-c,O=(P*x-I*T)*B-h,L=Math.sqrt(R*R+O*O),F=i.data.length*d;if(L<1e-4)return this.apply1(e,n,r,!1,a,!1,l),void i.updateWorldTransformWith(v,g,0,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY);var V=((I=n-E.worldX)*S-(P=r-E.worldY)*C)*B-c,N=(P*x-I*T)*B-h,k=V*V+N*N;if(0!=o){o*=u*(d+1)/2;var z=Math.sqrt(k),G=z-L-F*u+o;if(G>0){var U=Math.min(1,G/(2*o))-1;k=(V-=(U=(G-o*(1-U*U))/z)*V)*V+(N-=U*N)*N}}t:if(w){var j=(k-L*L-(F*=u)*F)/(2*L*F);j<-1?j=-1:j>1&&(j=1,a&&(_*=(Math.sqrt(k)/(L+F)-1)*l+1)),D=Math.acos(j)*s,x=L+F*j,C=F*Math.sin(D),M=Math.atan2(N*x-V*C,V*x+N*C)}else{var H=(x=u*F)*x,W=(C=f*F)*C,X=Math.atan2(N,V),Y=-2*W*L,q=W-H;if((S=Y*Y-4*q*(T=W*L*L+H*k-H*W))>=0){var J=Math.sqrt(S);Y<0&&(J=-J);var Z=(J=-(Y+J)/2)/q,K=T/J,Q=Math.abs(Z)=-1&&T<=1&&(T=Math.acos(T),(S=(I=x*Math.cos(T)+L)*I+(P=C*Math.sin(T))*P)st&&(nt=T,st=S,rt=I,at=P)),k<=(et+st)/2?(M=X-Math.atan2(it*s,tt),D=$*s):(M=X-Math.atan2(at*s,rt),D=nt*s)}var ot=Math.atan2(g,v)*y,lt=e.arotation;(M=(M-ot)*t.MathUtils.radDeg+p-lt)>180?M-=360:M<-180&&(M+=360),e.updateWorldTransformWith(c,h,lt+M*l,_,e.ascaleY,0,0),lt=i.arotation,(D=((D+ot)*t.MathUtils.radDeg-i.ashearX)*y+m-lt)>180?D-=360:D<-180&&(D+=360),i.updateWorldTransformWith(v,g,lt+D*l,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e})();t.IkConstraint=e})(r||(r={})),(function(t){var e=(function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.bendDirection=1,i.compress=!1,i.stretch=!1,i.uniform=!1,i.mix=1,i.softness=0,i}return s(e,t),e})(t.ConstraintData);t.IkConstraintData=e})(r||(r={})),(function(t){var e=(function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var i=0,n=t.bones.length;i0;if(r>0||s){var a=this.data,o=a.spacingMode==t.SpacingMode.Percent,l=a.rotateMode,c=l==t.RotateMode.Tangent,h=l==t.RotateMode.ChainScale,u=this.bones.length,_=c?u:u+1,f=this.bones,d=t.Utils.setArraySize(this.spaces,_),p=null,m=this.spacing;if(h||!o){h&&(p=t.Utils.setArraySize(this.lengths,u));for(var y=a.spacingMode==t.SpacingMode.Length,v=0,g=_-1;v0?t.MathUtils.degRad:-t.MathUtils.degRad),v=0;for(var B=3;vt.MathUtils.PI?z-=t.MathUtils.PI2:z<-t.MathUtils.PI&&(z+=t.MathUtils.PI2),z*=n,G=Math.cos(z),U=Math.sin(z),I.a=G*F-U*N,I.b=G*V-U*k,I.c=U*F+G*N,I.d=U*V+G*k}I.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,a){var o=this.target,l=this.position,c=this.spaces,h=t.Utils.setArraySize(this.positions,3*n+2),u=null,_=i.closed,f=i.worldVerticesLength,d=f/6,p=e.NONE;if(!i.constantSpeed){var m=i.lengths,y=m[d-=_?1:2];if(s&&(l*=y),a)for(var v=1;vy){p!=e.AFTER&&(p=e.AFTER,i.computeWorldVertices(o,f-6,4,u,0,2)),this.addAfterPosition(A-y,u,0,h,g);continue}}for(;;b++){var x=m[b];if(!(A>x)){0==b?A/=x:A=(A-(J=m[b-1]))/(x-J);break}}b!=p&&(p=b,_&&b==d?(i.computeWorldVertices(o,f-4,4,u,0,2),i.computeWorldVertices(o,0,4,u,4,2)):i.computeWorldVertices(o,6*b+2,8,u,0,2)),this.addCurvePosition(A,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],h,g,r||v>0&&0==W)}return h}_?(f+=2,u=t.Utils.setArraySize(this.world,f),i.computeWorldVertices(o,2,f-4,u,0,2),i.computeWorldVertices(o,0,2,u,f-4,2),u[f-2]=u[0],u[f-1]=u[1]):(d--,f-=4,u=t.Utils.setArraySize(this.world,f),i.computeWorldVertices(o,2,f,u,0,2));for(var C=t.Utils.setArraySize(this.curves,d),T=0,S=u[0],w=u[1],E=0,M=0,D=0,B=0,I=0,P=0,R=0,O=0,L=0,F=0,V=0,N=0,k=0,z=0,G=(v=0,2);vT){this.addAfterPosition(A-T,u,f-4,h,g);continue}}for(;;b++){var X=C[b];if(!(A>X)){0==b?A/=X:A=(A-(J=C[b-1]))/(X-J);break}}if(b!=p){p=b;var Y=6*b;for(S=u[Y],w=u[Y+1],E=u[Y+2],M=u[Y+3],D=u[Y+4],B=u[Y+5],V=2*(R=.03*(S-2*E+D))+(L=.006*(3*(E-D)-S+(I=u[Y+6]))),N=2*(O=.03*(w-2*M+B))+(F=.006*(3*(M-B)-w+(P=u[Y+7]))),k=.3*(E-S)+R+.16666667*L,z=.3*(M-w)+O+.16666667*F,j=Math.sqrt(k*k+z*z),U[0]=j,Y=1;Y<8;Y++)k+=V,z+=N,V+=L,N+=F,j+=Math.sqrt(k*k+z*z),U[Y]=j;k+=V,z+=N,j+=Math.sqrt(k*k+z*z),U[8]=j,k+=V+L,z+=N+F,j+=Math.sqrt(k*k+z*z),U[9]=j,H=0}for(A*=j;;H++){var q=U[H];if(!(A>q)){var J;0==H?A/=q:A=H+(A-(J=U[H-1]))/(q-J);break}}this.addCurvePosition(.1*A,S,w,E,M,D,B,I,P,h,g,r||v>0&&0==W)}return h},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],a=e[i+1],o=e[i+2]-s,l=e[i+3]-a,c=Math.atan2(l,o);n[r]=s+t*Math.cos(c),n[r+1]=a+t*Math.sin(c),n[r+2]=c},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],a=e[i+3],o=s-e[i],l=a-e[i+1],c=Math.atan2(l,o);n[r]=s+t*Math.cos(c),n[r+1]=a+t*Math.sin(c),n[r+2]=c},e.prototype.addCurvePosition=function(t,e,i,n,r,s,a,o,l,c,h,u){if(0==t||isNaN(t))return c[h]=e,c[h+1]=i,void(c[h+2]=Math.atan2(r-i,n-e));var _=t*t,f=_*t,d=1-t,p=d*d,m=p*d,y=d*t,v=3*y,g=d*v,b=v*t,A=e*m+n*g+s*b+o*f,x=i*m+r*g+a*b+l*f;c[h]=A,c[h+1]=x,u&&(c[h+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(x-(i*p+r*y*2+a*_),A-(e*p+n*y*2+s*_)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e})();t.PathConstraint=e})(r||(r={})),(function(t){var e=(function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i}return s(e,t),e})(t.ConstraintData);t.PathConstraintData=e,(function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"})(t.PositionMode||(t.PositionMode={})),(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(t.SpacingMode||(t.SpacingMode={})),(function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"})(t.RotateMode||(t.RotateMode={}))})(r||(r={})),(function(t){var e=(function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t})(),i=(function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,i,n){var r=this.clientAssets[t];return null==r&&(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i)){var r=new Image;r.src=i,r.crossOrigin="anonymous",r.onload=function(){n.rawAssets[i]=r},r.onerror=function(){n.errors[i]="Couldn't load image "+i}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t})();t.SharedAssetManager=i})(r||(r={})),(function(t){var e=(function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var i=0;i1){var s=n[n.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),n[n.length-1].sorted=!0}},e.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),e.active){var i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,a=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){b=new t.DrawOrderTimeline(F);var V=r.slots.length;for(h=0;h=0;f--)k[f]=-1;var z=t.Utils.newArray(V-N,0),G=0,U=0;for(f=0;f=0;f--)-1==k[f]&&(k[f]=z[--U]);b.setFrame(h,v,k)}s.push(b),o=Math.max(o,b.frames[F-1])}var j=i.readInt(!0);if(j>0){for(b=new t.EventTimeline(j),h=0;h>>1^-(1&i)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(n),i++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t})(),n=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},r=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}})(r||(r={})),(function(t){var e=(function(){function e(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool(function(){return t.Utils.newFloatArray(16)})}return e.prototype.update=function(e,i){if(null==e)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,s=this.polygonPool,a=e.slots,o=a.length;n.length=0,s.freeAll(r),r.length=0;for(var l=0;l=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=a&&i>=a||e>=o&&n>=o)return!1;var l=(n-e)/(i-t),c=l*(r-t)+e;if(c>s&&cs&&cr&&hr&&ht.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n=i||c=i){var h=n[o];h+(i-l)/(c-l)*(n[s]-h)=h&&g<=f||g>=f&&g<=h)&&(g>=e&&g<=n||g>=n&&g<=e)){var b=(c*y-l*p)/v;if((b>=u&&b<=d||b>=d&&b<=u)&&(b>=i&&b<=r||b>=r&&b<=i))return!0}h=f,u=d}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e})();t.SkeletonBounds=e})(r||(r={})),(function(t){var e=(function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,0,r,s,0,2);var a=this.clippingPolygon;e.makeClockwise(a);for(var o=this.clippingPolygons=this.triangulator.decompose(a,this.triangulator.triangulate(a)),l=0,c=o.length;l>1,X=this.clipOutput,Y=t.Utils.setArraySize(d,N+W*v),q=0;q=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(n),h.push(r),h.push(s),h.push(t),h.push(e),o.length=0;for(var u=a,_=a.length-4,f=0;;f+=2){for(var d=u[f],p=u[f+1],m=u[f+2],y=u[f+3],v=d-m,g=p-y,b=h,A=h.length-2,x=o.length,C=0;C0;if(v*(S-y)-g*(T-m)>0){if(M){o.push(w),o.push(E);continue}var D=(I=E-S)*(m-d)-(P=w-T)*(y-p);if(Math.abs(D)>1e-6){var B=(P*(p-S)-I*(d-T))/D;o.push(d+(m-d)*B),o.push(p+(y-p)*B)}else o.push(d),o.push(p)}else if(M){var I,P;D=(I=E-S)*(m-d)-(P=w-T)*(y-p),Math.abs(D)>1e-6?(B=(P*(p-S)-I*(d-T))/D,o.push(d+(m-d)*B),o.push(p+(y-p)*B)):(o.push(d),o.push(p)),o.push(w),o.push(E)}c=!0}if(x==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),f==_)break;var R=o;(o=h).length=0,h=R}if(l!=o){l.length=0,f=0;for(var O=o.length-2;f>1;o=0;_--)-1==X[_]&&(X[_]=q[--Z])}b.setFrame(u++,this.getValue(W,"time",0),X)}s.push(b),a=Math.max(a,b.frames[b.getFrameCount()-1])}if(e.events){for(b=new t.EventTimeline(e.events.length),u=0,_=0;_=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},i.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n}})(r||(r={})),(function(t){var e,i,n=(function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t})();t.Texture=n,(function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"})(e=t.TextureFilter||(t.TextureFilter={})),(function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"})(i=t.TextureWrap||(t.TextureWrap={}));t.TextureRegion=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0};var r=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.setFilters=function(){},e.prototype.setWraps=function(){},e.prototype.dispose=function(){},e})(n);t.FakeTexture=r})(r||(r={})),(function(t){var e=(function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,s){if(null==s)throw new Error("textureLoader cannot be null.");for(var a=new i(e),o=new Array(4),l=null;;){var c=a.readLine();if(null==c)break;if(0==(c=c.trim()).length)l=null;else if(l){var h=new r;h.name=c,h.page=l;var u=a.readValue();"true"==u.toLocaleLowerCase()?h.degrees=90:"false"==u.toLocaleLowerCase()?h.degrees=0:h.degrees=parseFloat(u),h.rotate=90==h.degrees,a.readTuple(o);var _=parseInt(o[0]),f=parseInt(o[1]);a.readTuple(o);var d=parseInt(o[0]),p=parseInt(o[1]);h.u=_/l.width,h.v=f/l.height,h.rotate?(h.u2=(_+p)/l.width,h.v2=(f+d)/l.height):(h.u2=(_+d)/l.width,h.v2=(f+p)/l.height),h.x=_,h.y=f,h.width=Math.abs(d),h.height=Math.abs(p),4==a.readTuple(o)&&4==a.readTuple(o)&&a.readTuple(o),h.originalWidth=parseInt(o[0]),h.originalHeight=parseInt(o[1]),a.readTuple(o),h.offsetX=parseInt(o[0]),h.offsetY=parseInt(o[1]),h.index=parseInt(a.readValue()),h.texture=l.texture,this.regions.push(h)}else{(l=new n).name=c,2==a.readTuple(o)&&(l.width=parseInt(o[0]),l.height=parseInt(o[1]),a.readTuple(o)),a.readTuple(o),l.minFilter=t.Texture.filterFromString(o[0]),l.magFilter=t.Texture.filterFromString(o[1]);var m=a.readValue();l.uWrap=t.TextureWrap.ClampToEdge,l.vWrap=t.TextureWrap.ClampToEdge,"x"==m?l.uWrap=t.TextureWrap.Repeat:"y"==m?l.vWrap=t.TextureWrap.Repeat:"xy"==m&&(l.uWrap=l.vWrap=t.TextureWrap.Repeat),l.texture=s(c),l.texture.setFilters(l.minFilter,l.magFilter),l.texture.setWraps(l.uWrap,l.vWrap),l.width=l.texture.getImage().width,l.height=l.texture.getImage().height,this.pages.push(l)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),i=e.indexOf(":");if(-1==i)throw new Error("Invalid line: "+e);for(var n=0,r=i+1;n<3;n++){var s=e.indexOf(",",r);if(-1==s)break;t[n]=e.substr(r,s-r).trim(),r=s+1}return t[n]=e.substring(r).trim(),n+1},t})(),n=function(){};t.TextureAtlasPage=n;var r=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e})(t.TextureRegion);t.TextureAtlasRegion=r})(r||(r={})),(function(t){var e=(function(){function e(e,i){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==i)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*h,_=this.data.offsetShearY*h,f=this.bones,d=0,p=f.length;dt.MathUtils.PI?E-=t.MathUtils.PI2:E<-t.MathUtils.PI&&(E+=t.MathUtils.PI2),E*=e;var x=Math.cos(E),C=Math.sin(E);m.a=x*v-C*b,m.b=x*g-C*A,m.c=C*v+x*b,m.d=C*g+x*A,y=!0}if(0!=i){var T=this.temp;s.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),m.worldX+=(T.x-m.worldX)*i,m.worldY+=(T.y-m.worldY)*i,y=!0}if(n>0){var S=Math.sqrt(m.a*m.a+m.c*m.c),w=Math.sqrt(a*a+l*l);S>1e-5&&(S=(S+(w-S+this.data.offsetScaleX)*n)/S),m.a*=S,m.c*=S,S=Math.sqrt(m.b*m.b+m.d*m.d),w=Math.sqrt(o*o+c*c),S>1e-5&&(S=(S+(w-S+this.data.offsetScaleY)*n)/S),m.b*=S,m.d*=S,y=!0}if(r>0){g=m.b,A=m.d;var E,M=Math.atan2(A,g);(E=Math.atan2(c,o)-Math.atan2(l,a)-(M-Math.atan2(m.c,m.a)))>t.MathUtils.PI?E-=t.MathUtils.PI2:E<-t.MathUtils.PI&&(E+=t.MathUtils.PI2),E=M+(E+_)*r,S=Math.sqrt(g*g+A*A),m.b=Math.cos(E)*S,m.d=Math.sin(E)*S,y=!0}y&&(m.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,i=this.translateMix,n=this.scaleMix,r=this.shearMix,s=this.target,a=s.a,o=s.b,l=s.c,c=s.d,h=a*c-o*l>0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*h,_=this.data.offsetShearY*h,f=this.bones,d=0,p=f.length;dt.MathUtils.PI?m-=t.MathUtils.PI2:m<-t.MathUtils.PI&&(m+=t.MathUtils.PI2),m*=e;var C=Math.cos(m),T=Math.sin(m);y.a=C*g-T*A,y.b=C*b-T*x,y.c=T*g+C*A,y.d=T*b+C*x,v=!0}if(0!=i){var S=this.temp;s.localToWorld(S.set(this.data.offsetX,this.data.offsetY)),y.worldX+=S.x*i,y.worldY+=S.y*i,v=!0}if(n>0){var w=(Math.sqrt(a*a+l*l)-1+this.data.offsetScaleX)*n+1;y.a*=w,y.c*=w,w=(Math.sqrt(o*o+c*c)-1+this.data.offsetScaleY)*n+1,y.b*=w,y.d*=w,v=!0}if(r>0)(m=Math.atan2(c,o)-Math.atan2(l,a))>t.MathUtils.PI?m-=t.MathUtils.PI2:m<-t.MathUtils.PI&&(m+=t.MathUtils.PI2),b=y.b,x=y.d,m=Math.atan2(x,b)+(m-t.MathUtils.PI/2+_)*r,w=Math.sqrt(b*b+x*x),y.b=Math.cos(m)*w,y.d=Math.sin(m)*w,v=!0;v&&(y.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a1e-5&&(f=(f+(r.ascaleX-f+this.data.offsetScaleX)*i)/f),d>1e-5&&(d=(d+(r.ascaleY-d+this.data.offsetScaleY)*i)/d));var p=l.ashearY;0!=n&&(h=r.ashearY-p+this.data.offsetShearY,h-=360*(16384-(16384.499999999996-h/360|0)),l.shearY+=h*n),l.updateWorldTransformWith(u,_,c,f,d,l.ashearX,p)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a1e-5&&(_*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),f>1e-5&&(f*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var d=l.ashearY;0!=n&&(d+=(r.ashearY+this.data.offsetShearY)*n),l.updateWorldTransformWith(h,u,c,_,f,l.ashearX,d)}},e})();t.TransformConstraint=e})(r||(r={})),(function(t){var e=(function(t){function e(e){var i=t.call(this,e,0,!1)||this;return i.bones=new Array,i.rotateMix=0,i.translateMix=0,i.scaleMix=0,i.shearMix=0,i.offsetRotation=0,i.offsetX=0,i.offsetY=0,i.offsetScaleX=0,i.offsetScaleY=0,i.offsetShearY=0,i.relative=!1,i.local=!1,i}return s(e,t),e})(t.ConstraintData);t.TransformConstraintData=e})(r||(r={})),(function(t){var e=(function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool(function(){return new Array}),this.polygonIndicesPool=new t.Pool(function(){return new Array})}return e.prototype.triangulate=function(t){var i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var c=n-1,h=(s=0,1);;){t:if(!a[s]){for(var u=r[c]<<1,_=r[s]<<1,f=r[h]<<1,d=i[u],p=i[u+1],m=i[_],y=i[_+1],v=i[f],g=i[f+1],b=(h+1)%n;b!=c;b=(b+1)%n)if(a[b]){var A=r[b]<<1,x=i[A],C=i[A+1];if(e.positiveArea(v,g,d,p,x,C)&&e.positiveArea(d,p,m,y,x,C)&&e.positiveArea(m,y,v,g,x,C))break t}break}if(0==h){do{if(!a[s])break;s--}while(s>0);break}c=s,s=h,h=(h+1)%n}l.push(r[(n+s-1)%n]),l.push(r[s]),l.push(r[(s+1)%n]),r.splice(s,1),a.splice(s,1);var T=(--n+s-1)%n,S=s==n?0:s;a[T]=e.isConcave(T,n,i,r),a[S]=e.isConcave(S,n,i,r)}return 3==n&&(l.push(r[2]),l.push(r[0]),l.push(r[1])),l},e.prototype.decompose=function(t,i){var n=t,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var s=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(s),s.length=0;var a=this.polygonIndicesPool.obtain();a.length=0;var o=this.polygonPool.obtain();o.length=0;for(var l=-1,c=0,h=0,u=i.length;h0?(r.push(o),s.push(a)):(this.polygonPool.free(o),this.polygonIndicesPool.free(a)),(o=this.polygonPool.obtain()).length=0,o.push(p),o.push(m),o.push(y),o.push(v),o.push(g),o.push(b),(a=this.polygonIndicesPool.obtain()).length=0,a.push(_),a.push(f),a.push(d),c=e.winding(p,m,y,v,g,b),l=_)}for(o.length>0&&(r.push(o),s.push(a)),h=0,u=r.length;h=0;h--)0==(o=r[h]).length&&(r.splice(h,1),this.polygonPool.free(o),a=s[h],s.splice(h,1),this.polygonIndicesPool.free(a));return r},e.isConcave=function(t,e,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,a=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[a],i[a+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var a=i-t,o=n-e;return r*o-s*a+a*e-t*o>=0?1:-1},e})();t.Triangulator=e})(r||(r={})),(function(t){var e=(function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return null!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t})();t.IntSet=e;var i=(function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.r=t,this.g=e,this.b=i,this.a=n}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t})();t.Color=i;var n=(function(){function t(){}return t.clamp=function(t,e,i){return ti?i:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t})();t.MathUtils=n;var r=(function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t})();t.Interpolation=r;var a=(function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}return s(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e})(r);t.Pow=a;var o=(function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e})(a);t.PowOut=o;var l=(function(){function t(){}return t.arrayCopy=function(t,e,i,n,r){for(var s=e,a=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t})();t.TimeKeeper=_;var f=(function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,l=this.vertices,c=this.bones;if(null!=c){for(var h=0,u=0,_=0;_0&&(l=o);for(var b,A=(b=t.bone).worldX,x=b.worldY,C=b.a,T=b.b,S=b.c,w=b.d,E=e,M=r;M0&&(s[b-1].vfOffset=d),s.length=b,a.length=_;var o=g-1;if(o>=0)if(v>0){var l=r[o];l.indexCount=v,l.vfCount=6*y,l.vertexCount=y,r.length=g}else r.length=g-1;if(0!=r.length){var c=n.vertices,C=n.uintVert;(!c||c.length>>0)+(S.b<<16)+(S.g<<8)+S.r,o=(w.a<<24>>>0)+(w.b<<16)+(w.g<<8)+w.r,A!==a||x!==o){var p=this._tempColors;A=a,x=o,b>0&&(p[b-1].vfOffset=d),p[b++]={fr:S.r,fg:S.g,fb:S.b,fa:S.a,dr:w.r,dg:w.g,db:w.b,da:w.a,vfOffset:0}}if(c.isClipping()){c.clipTriangles(h,C,u,T,h,S,w,!0,6,f,d,d+2);var m=c.clippedVertices,y=c.clippedTriangles;T=y.length,C=m.length/12*6;for(var v=0,g=f,E=y.length;v=0&&(v>0?((x=M[A]).indexCount=v,x.vertexCount=y,x.vfCount=6*y):g--),M[g]={tex:b,blendMode:S,indexCount:0,vertexCount:0,vfCount:0},g++,v=0,y=0),o?(a=E,C=24,T=6,i.computeWorldVertices(w.bone,h,d,6)):l&&(a=i.triangles,C=6*(i.worldVerticesLength>>1),T=a.length,i.computeWorldVertices(w,0,i.worldVerticesLength,h,d,6)),0!=C&&0!=T){for(var N=0,k=f,z=a.length;N0){for(var H=f,W=f+T;H=n&&(t&&t.call(e,!0),t=null)},a=0;a0)&&this.textureNames&&this.textureNames.length>0)return t||cc.errorID(7507,this.name),null;var e=this._getAtlas(t);if(!e)return null;var i=new sp.spine.AtlasAttachmentLoader(e),n=null,r=null;return this.skeletonJson?(r=new sp.spine.SkeletonJson(i),n=this.skeletonJson):(r=new sp.spine.SkeletonBinary(i),n=new Uint8Array(this._nativeAsset)),r.scale=this.scale,this._skeletonCache=r.readSkeletonData(n),e.dispose(),this._skeletonCache},getSkinsEnum:!1,getAnimsEnum:!1,_getTexture:function(t){for(var e=this.textureNames,i=0;i>>0)+(nt<<16)+(it<<8)+et,st=t.dr*Q,at=t.dg*$,ot=t.db*tt,y=((r?255:0)<<24>>>0)+(ot<<16)+(at<<8)+st}function Ct(t){return(t.a<<24>>>0)+(t.b<<16)+(t.g<<8)+t.r}var Tt=(function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var A=n.prototype;return A.updateRenderData=function(t){if(!t.isAnimationCached()){var e=t._skeleton;e&&e.updateWorldTransform()}},A.fillVertices=function(t,e,i,n,a){var o,c=ct._vData,h=ct._iData,u=ct._uintVData;if(L.a=i.a*e.a*t.a*p*255,s=r?L.a:255,k=_*e.r*t.r*s,z=f*e.g*t.g*s,G=d*e.b*t.b*s,L.r=k*i.r,L.g=z*i.g,L.b=G*i.b,null==a.darkColor?F.set(0,0,0,1):(F.r=a.darkColor.r*k,F.g=a.darkColor.g*z,F.b=a.darkColor.b*G),F.a=r?255:0,n.isClipping()){var v=c.subarray(mt+2);n.clipTriangles(c.subarray(mt),dt,h.subarray(gt),vt,v,L,F,l,g);var A=new Float32Array(n.clippedVertices),x=n.clippedTriangles;if(vt=x.length,dt=A.length/b*g,o=ct.request(dt/g,vt),gt=o.indiceOffset,yt=o.vertexOffset,mt=o.byteOffset>>2,c=ct._vData,h=ct._iData,u=ct._uintVData,h.set(x,gt),ft)for(var C=0,T=A.length,S=mt;C>>0)+(A[w+4]<<16)+(A[w+3]<<8)+A[w+2],u[M+4]=m,l&&(y=(A[w+11]<<24>>>0)+(A[w+10]<<16)+(A[w+9]<<8)+A[w+8],u[M+5]=y)}else if(ft)for(var D=mt,B=mt+dt;D=0&&a==y.data.index&&(U=!0),U)if(o>=0&&o==y.data.index&&(U=!1),dt=0,vt=0,n=y.getAttachment())if(d=n instanceof C.RegionAttachment,p=n instanceof C.MeshAttachment,n instanceof C.ClippingAttachment)S.clipStart(y,n);else if(d||p)if(w=At(n.region.texture._texture,y.data.blendMode)){if((j||w.getHash()!==ht.material.getHash())&&(j=!1,ht._flush(),ht.node=ut,ht.material=w),d){if(f=B,dt=4*g,vt=6,m=ct.request(4,6),gt=m.indiceOffset,yt=m.vertexOffset,mt=m.byteOffset>>2,e=ct._vData,i=ct._iData,n.computeWorldVertices(y.bone,e,mt,g),T&&c){T.strokeColor=I,T.moveTo(e[mt],e[mt+1]);for(var D=mt+g,L=mt+dt;D>1)*g,vt=f.length,m=ct.request(dt/g,vt),gt=m.indiceOffset,yt=m.vertexOffset,mt=m.byteOffset>>2,e=ct._vData,i=ct._iData,n.computeWorldVertices(y,0,n.worldVerticesLength,e,mt,g),T&&u)){T.strokeColor=O;for(var F=0,V=f.length;F0){for(var tt=gt,et=gt+vt;tt>2,n=ct._vData,r=ct._iData,s=ct._uintVData;for(var S=gt,w=gt+vt;S=A&&(xt(b=g[v++]),A=b.vfOffset),s[R]=m,s[R+1]=y}}}}},A.fillBuffers=function(t,e){var i=t.node;if(i._renderFlag|=T.FLAG_UPDATE_RENDER_DATA,t._skeleton){var n=i._color;_=n.r/255,f=n.g/255,d=n.b/255,p=n.a/255,l=t.useTint||t.isAnimationCached(),v=l?E:w,g=l?6:5,ut=t.node,ct=e.getBuffer("spine",v),ht=e,lt=t,j=!0,r=t.premultipliedAlpha,s=1,D=0,_t=!1,ft=t._effectDelegate&&t._effectDelegate._vertexEffect,(4294967295!==n._val||r)&&(_t=!0),l&&(D|=1);var a=void 0;lt.enableBatch&&(a=ut._worldMatrix,j=!1,D|=16),t.isAnimationCached()?this.cacheTraverse(a):(ft&&ft.begin(t._skeleton),this.realTimeTraverse(a),ft&&ft.end()),e.worldMatDirty++,t.attachUtil._syncAttachedNode(),ut=void 0,ct=void 0,ht=void 0,lt=void 0,ft=null}},A.postFillBuffers=function(t,e){e.worldMatDirty--},n})(A.default);i.default=Tt,A.default.register(x,Tt),e.exports=i.default}),{"../../cocos2d/core/renderer/assembler":267,"../../cocos2d/core/renderer/render-flow":271,"../../cocos2d/core/renderer/webgl/vertex-format":312,"./Skeleton":425,"./lib/spine":427}],432:[(function(t,e){"use strict";var i=function(){this.start=null,this.end=null,this.complete=null,this.event=null,this.interrupt=null,this.dispose=null};i.getListeners=function(t){return t.listener||(t.listener=new i),t.listener},e.exports=i}),{}],433:[(function(t,e){"use strict";var i=t("./lib/spine");sp.VertexEffectDelegate=cc.Class({name:"sp.VertexEffectDelegate",ctor:function(){this._vertexEffect=null,this._interpolation=null,this._effectType="none"},clear:function(){this._vertexEffect=null,this._interpolation=null,this._effectType="none"},initJitter:function(t,e){return this._effectType="jitter",this._vertexEffect=new i.JitterEffect(t,e),this._vertexEffect},initSwirlWithPow:function(t,e){return this._interpolation=new i.Pow(e),this._vertexEffect=new i.SwirlEffect(t,this._interpolation),this._vertexEffect},initSwirlWithPowOut:function(t,e){return this._interpolation=new i.PowOut(e),this._vertexEffect=new i.SwirlEffect(t,this._interpolation),this._vertexEffect},getJitterVertexEffect:function(){return this._vertexEffect},getSwirlVertexEffect:function(){return this._vertexEffect},getVertexEffect:function(){return this._vertexEffect},getEffectType:function(){return this._effectType}}),e.exports=sp.VertexEffectDelegate}),{"./lib/spine":427}],434:[(function(t,e,i){"use strict";var n;n=function(t){function e(t,e){return void 0!==t?t:e}var i=1e37,n=1e-5,r=n*n,s=3.14159265359,a=2,o=8,l=.008,c=2/180*s,h=2*l,u=-1,_=(function(){function t(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.major=0,this.minor=0,this.revision=0,this.major=t,this.minor=e,this.revision=i}return t.prototype.toString=function(){return this.major+"."+this.minor+"."+this.revision},t})(),f=new _(2,3,2);function d(t,e){for(var i=[],n=0;ni?i:t}var b=isFinite;function A(t){return t*t}function x(t){return 1/Math.sqrt(t)}var C,T=Math.sqrt,S=Math.pow,w=Math.cos,E=Math.sin,M=Math.acos,D=Math.asin,B=Math.atan2,I=(function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.Clone=function(){return new t(this.x,this.y)},t.prototype.SetZero=function(){return this.x=0,this.y=0,this},t.prototype.Set=function(t,e){return this.x=t,this.y=e,this},t.prototype.Copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.SelfAdd=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.SelfAddXY=function(t,e){return this.x+=t,this.y+=e,this},t.prototype.SelfSub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.SelfSubXY=function(t,e){return this.x-=t,this.y-=e,this},t.prototype.SelfMul=function(t){return this.x*=t,this.y*=t,this},t.prototype.SelfMulAdd=function(t,e){return this.x+=t*e.x,this.y+=t*e.y,this},t.prototype.SelfMulSub=function(t,e){return this.x-=t*e.x,this.y-=t*e.y,this},t.prototype.Dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.Cross=function(t){return this.x*t.y-this.y*t.x},t.prototype.Length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},t.prototype.LengthSquared=function(){var t=this.x,e=this.y;return t*t+e*e},t.prototype.Normalize=function(){var t=this.Length();if(t>=n){var e=1/t;this.x*=e,this.y*=e}return t},t.prototype.SelfNormalize=function(){var t=this.Length();if(t>=n){var e=1/t;this.x*=e,this.y*=e}return this},t.prototype.SelfRotate=function(t){var e=Math.cos(t),i=Math.sin(t),n=this.x;return this.x=e*n-i*this.y,this.y=i*n+e*this.y,this},t.prototype.IsValid=function(){return isFinite(this.x)&&isFinite(this.y)},t.prototype.SelfCrossVS=function(t){var e=this.x;return this.x=t*this.y,this.y=-t*e,this},t.prototype.SelfCrossSV=function(t){var e=this.x;return this.x=-t*this.y,this.y=t*e,this},t.prototype.SelfMinV=function(t){return this.x=y(this.x,t.x),this.y=y(this.y,t.y),this},t.prototype.SelfMaxV=function(t){return this.x=v(this.x,t.x),this.y=v(this.y,t.y),this},t.prototype.SelfAbs=function(){return this.x=m(this.x),this.y=m(this.y),this},t.prototype.SelfNeg=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.SelfSkew=function(){var t=this.x;return this.x=-this.y,this.y=t,this},t.MakeArray=function(e){return d(e,(function(){return new t}))},t.AbsV=function(t,e){return e.x=m(t.x),e.y=m(t.y),e},t.MinV=function(t,e,i){return i.x=y(t.x,e.x),i.y=y(t.y,e.y),i},t.MaxV=function(t,e,i){return i.x=v(t.x,e.x),i.y=v(t.y,e.y),i},t.ClampV=function(t,e,i,n){return n.x=g(t.x,e.x,i.x),n.y=g(t.y,e.y,i.y),n},t.RotateV=function(t,e,i){var n=t.x,r=t.y,s=Math.cos(e),a=Math.sin(e);return i.x=s*n-a*r,i.y=a*n+s*r,i},t.DotVV=function(t,e){return t.x*e.x+t.y*e.y},t.CrossVV=function(t,e){return t.x*e.y-t.y*e.x},t.CrossVS=function(t,e,i){var n=t.x;return i.x=e*t.y,i.y=-e*n,i},t.CrossVOne=function(t,e){var i=t.x;return e.x=t.y,e.y=-i,e},t.CrossSV=function(t,e,i){var n=e.x;return i.x=-t*e.y,i.y=t*n,i},t.CrossOneV=function(t,e){var i=t.x;return e.x=-t.y,e.y=i,e},t.AddVV=function(t,e,i){return i.x=t.x+e.x,i.y=t.y+e.y,i},t.SubVV=function(t,e,i){return i.x=t.x-e.x,i.y=t.y-e.y,i},t.MulSV=function(t,e,i){return i.x=e.x*t,i.y=e.y*t,i},t.MulVS=function(t,e,i){return i.x=t.x*e,i.y=t.y*e,i},t.AddVMulSV=function(t,e,i,n){return n.x=t.x+e*i.x,n.y=t.y+e*i.y,n},t.SubVMulSV=function(t,e,i,n){return n.x=t.x-e*i.x,n.y=t.y-e*i.y,n},t.AddVCrossSV=function(t,e,i,n){var r=i.x;return n.x=t.x-e*i.y,n.y=t.y+e*r,n},t.MidVV=function(t,e,i){return i.x=.5*(t.x+e.x),i.y=.5*(t.y+e.y),i},t.ExtVV=function(t,e,i){return i.x=.5*(e.x-t.x),i.y=.5*(e.y-t.y),i},t.IsEqualToV=function(t,e){return t.x===e.x&&t.y===e.y},t.DistanceVV=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},t.DistanceSquaredVV=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n},t.NegV=function(t,e){return e.x=-t.x,e.y=-t.y,e},t.ZERO=new t(0,0),t.UNITX=new t(1,0),t.UNITY=new t(0,1),t.s_t0=new t,t.s_t1=new t,t.s_t2=new t,t.s_t3=new t,t})(),P=new I(0,0),R=(function(){function t(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this.z=i}return t.prototype.Clone=function(){return new t(this.x,this.y,this.z)},t.prototype.SetZero=function(){return this.x=0,this.y=0,this.z=0,this},t.prototype.SetXYZ=function(t,e,i){return this.x=t,this.y=e,this.z=i,this},t.prototype.Copy=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},t.prototype.SelfNeg=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},t.prototype.SelfAdd=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},t.prototype.SelfAddXYZ=function(t,e,i){return this.x+=t,this.y+=e,this.z+=i,this},t.prototype.SelfSub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},t.prototype.SelfSubXYZ=function(t,e,i){return this.x-=t,this.y-=e,this.z-=i,this},t.prototype.SelfMul=function(t){return this.x*=t,this.y*=t,this.z*=t,this},t.DotV3V3=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},t.CrossV3V3=function(t,e,i){var n=t.x,r=t.y,s=t.z,a=e.x,o=e.y,l=e.z;return i.x=r*l-s*o,i.y=s*a-n*l,i.z=n*o-r*a,i},t.ZERO=new t(0,0,0),t.s_t0=new t,t})(),O=(function(){function t(){this.ex=new I(1,0),this.ey=new I(0,1)}return t.prototype.Clone=function(){return(new t).Copy(this)},t.FromVV=function(e,i){return(new t).SetVV(e,i)},t.FromSSSS=function(e,i,n,r){return(new t).SetSSSS(e,i,n,r)},t.FromAngle=function(e){return(new t).SetAngle(e)},t.prototype.SetSSSS=function(t,e,i,n){return this.ex.Set(t,i),this.ey.Set(e,n),this},t.prototype.SetVV=function(t,e){return this.ex.Copy(t),this.ey.Copy(e),this},t.prototype.SetAngle=function(t){var e=Math.cos(t),i=Math.sin(t);return this.ex.Set(e,i),this.ey.Set(-i,e),this},t.prototype.Copy=function(t){return this.ex.Copy(t.ex),this.ey.Copy(t.ey),this},t.prototype.SetIdentity=function(){return this.ex.Set(1,0),this.ey.Set(0,1),this},t.prototype.SetZero=function(){return this.ex.SetZero(),this.ey.SetZero(),this},t.prototype.GetAngle=function(){return Math.atan2(this.ex.y,this.ex.x)},t.prototype.GetInverse=function(t){var e=this.ex.x,i=this.ey.x,n=this.ex.y,r=this.ey.y,s=e*r-i*n;return 0!==s&&(s=1/s),t.ex.x=s*r,t.ey.x=-s*i,t.ex.y=-s*n,t.ey.y=s*e,t},t.prototype.Solve=function(t,e,i){var n=this.ex.x,r=this.ey.x,s=this.ex.y,a=this.ey.y,o=n*a-r*s;return 0!==o&&(o=1/o),i.x=o*(a*t-r*e),i.y=o*(n*e-s*t),i},t.prototype.SelfAbs=function(){return this.ex.SelfAbs(),this.ey.SelfAbs(),this},t.prototype.SelfInv=function(){return this.GetInverse(this),this},t.prototype.SelfAddM=function(t){return this.ex.SelfAdd(t.ex),this.ey.SelfAdd(t.ey),this},t.prototype.SelfSubM=function(t){return this.ex.SelfSub(t.ex),this.ey.SelfSub(t.ey),this},t.AbsM=function(t,e){var i=t.ex,n=t.ey;return e.ex.x=m(i.x),e.ex.y=m(i.y),e.ey.x=m(n.x),e.ey.y=m(n.y),e},t.MulMV=function(t,e,i){var n=t.ex,r=t.ey,s=e.x,a=e.y;return i.x=n.x*s+r.x*a,i.y=n.y*s+r.y*a,i},t.MulTMV=function(t,e,i){var n=t.ex,r=t.ey,s=e.x,a=e.y;return i.x=n.x*s+n.y*a,i.y=r.x*s+r.y*a,i},t.AddMM=function(t,e,i){var n=t.ex,r=t.ey,s=e.ex,a=e.ey;return i.ex.x=n.x+s.x,i.ex.y=n.y+s.y,i.ey.x=r.x+a.x,i.ey.y=r.y+a.y,i},t.MulMM=function(t,e,i){var n=t.ex.x,r=t.ex.y,s=t.ey.x,a=t.ey.y,o=e.ex.x,l=e.ex.y,c=e.ey.x,h=e.ey.y;return i.ex.x=n*o+s*l,i.ex.y=r*o+a*l,i.ey.x=n*c+s*h,i.ey.y=r*c+a*h,i},t.MulTMM=function(t,e,i){var n=t.ex.x,r=t.ex.y,s=t.ey.x,a=t.ey.y,o=e.ex.x,l=e.ex.y,c=e.ey.x,h=e.ey.y;return i.ex.x=n*o+r*l,i.ex.y=s*o+a*l,i.ey.x=n*c+r*h,i.ey.y=s*c+a*h,i},t.IDENTITY=new t,t})(),L=(function(){function t(){this.ex=new R(1,0,0),this.ey=new R(0,1,0),this.ez=new R(0,0,1)}return t.prototype.Clone=function(){return(new t).Copy(this)},t.prototype.SetVVV=function(t,e,i){return this.ex.Copy(t),this.ey.Copy(e),this.ez.Copy(i),this},t.prototype.Copy=function(t){return this.ex.Copy(t.ex),this.ey.Copy(t.ey),this.ez.Copy(t.ez),this},t.prototype.SetIdentity=function(){return this.ex.SetXYZ(1,0,0),this.ey.SetXYZ(0,1,0),this.ez.SetXYZ(0,0,1),this},t.prototype.SetZero=function(){return this.ex.SetZero(),this.ey.SetZero(),this.ez.SetZero(),this},t.prototype.SelfAddM=function(t){return this.ex.SelfAdd(t.ex),this.ey.SelfAdd(t.ey),this.ez.SelfAdd(t.ez),this},t.prototype.Solve33=function(t,e,i,n){var r=this.ex.x,s=this.ex.y,a=this.ex.z,o=this.ey.x,l=this.ey.y,c=this.ey.z,h=this.ez.x,u=this.ez.y,_=this.ez.z,f=r*(l*_-c*u)+s*(c*h-o*_)+a*(o*u-l*h);return 0!==f&&(f=1/f),n.x=f*(t*(l*_-c*u)+e*(c*h-o*_)+i*(o*u-l*h)),n.y=f*(r*(e*_-i*u)+s*(i*h-t*_)+a*(t*u-e*h)),n.z=f*(r*(l*i-c*e)+s*(c*t-o*i)+a*(o*e-l*t)),n},t.prototype.Solve22=function(t,e,i){var n=this.ex.x,r=this.ey.x,s=this.ex.y,a=this.ey.y,o=n*a-r*s;return 0!==o&&(o=1/o),i.x=o*(a*t-r*e),i.y=o*(n*e-s*t),i},t.prototype.GetInverse22=function(t){var e=this.ex.x,i=this.ey.x,n=this.ex.y,r=this.ey.y,s=e*r-i*n;0!==s&&(s=1/s),t.ex.x=s*r,t.ey.x=-s*i,t.ex.z=0,t.ex.y=-s*n,t.ey.y=s*e,t.ey.z=0,t.ez.x=0,t.ez.y=0,t.ez.z=0},t.prototype.GetSymInverse33=function(t){var e=R.DotV3V3(this.ex,R.CrossV3V3(this.ey,this.ez,R.s_t0));0!==e&&(e=1/e);var i=this.ex.x,n=this.ey.x,r=this.ez.x,s=this.ey.y,a=this.ez.y,o=this.ez.z;t.ex.x=e*(s*o-a*a),t.ex.y=e*(r*a-n*o),t.ex.z=e*(n*a-r*s),t.ey.x=t.ex.y,t.ey.y=e*(i*o-r*r),t.ey.z=e*(r*n-i*a),t.ez.x=t.ex.z,t.ez.y=t.ey.z,t.ez.z=e*(i*s-n*n)},t.MulM33V3=function(t,e,i){var n=e.x,r=e.y,s=e.z;return i.x=t.ex.x*n+t.ey.x*r+t.ez.x*s,i.y=t.ex.y*n+t.ey.y*r+t.ez.y*s,i.z=t.ex.z*n+t.ey.z*r+t.ez.z*s,i},t.MulM33XYZ=function(t,e,i,n,r){return r.x=t.ex.x*e+t.ey.x*i+t.ez.x*n,r.y=t.ex.y*e+t.ey.y*i+t.ez.y*n,r.z=t.ex.z*e+t.ey.z*i+t.ez.z*n,r},t.MulM33V2=function(t,e,i){var n=e.x,r=e.y;return i.x=t.ex.x*n+t.ey.x*r,i.y=t.ex.y*n+t.ey.y*r,i},t.MulM33XY=function(t,e,i,n){return n.x=t.ex.x*e+t.ey.x*i,n.y=t.ex.y*e+t.ey.y*i,n},t.IDENTITY=new t,t})(),F=(function(){function t(t){void 0===t&&(t=0),this.s=0,this.c=1,t&&(this.s=Math.sin(t),this.c=Math.cos(t))}return t.prototype.Clone=function(){return(new t).Copy(this)},t.prototype.Copy=function(t){return this.s=t.s,this.c=t.c,this},t.prototype.SetAngle=function(t){return this.s=Math.sin(t),this.c=Math.cos(t),this},t.prototype.SetIdentity=function(){return this.s=0,this.c=1,this},t.prototype.GetAngle=function(){return Math.atan2(this.s,this.c)},t.prototype.GetXAxis=function(t){return t.x=this.c,t.y=this.s,t},t.prototype.GetYAxis=function(t){return t.x=-this.s,t.y=this.c,t},t.MulRR=function(t,e,i){var n=t.c,r=t.s,s=e.c,a=e.s;return i.s=r*s+n*a,i.c=n*s-r*a,i},t.MulTRR=function(t,e,i){var n=t.c,r=t.s,s=e.c,a=e.s;return i.s=n*a-r*s,i.c=n*s+r*a,i},t.MulRV=function(t,e,i){var n=t.c,r=t.s,s=e.x,a=e.y;return i.x=n*s-r*a,i.y=r*s+n*a,i},t.MulTRV=function(t,e,i){var n=t.c,r=t.s,s=e.x,a=e.y;return i.x=n*s+r*a,i.y=-r*s+n*a,i},t.IDENTITY=new t,t})(),V=(function(){function t(){this.p=new I,this.q=new F}return t.prototype.Clone=function(){return(new t).Copy(this)},t.prototype.Copy=function(t){return this.p.Copy(t.p),this.q.Copy(t.q),this},t.prototype.SetIdentity=function(){return this.p.SetZero(),this.q.SetIdentity(),this},t.prototype.SetPositionRotation=function(t,e){return this.p.Copy(t),this.q.Copy(e),this},t.prototype.SetPositionAngle=function(t,e){return this.p.Copy(t),this.q.SetAngle(e),this},t.prototype.SetPosition=function(t){return this.p.Copy(t),this},t.prototype.SetPositionXY=function(t,e){return this.p.Set(t,e),this},t.prototype.SetRotation=function(t){return this.q.Copy(t),this},t.prototype.SetRotationAngle=function(t){return this.q.SetAngle(t),this},t.prototype.GetPosition=function(){return this.p},t.prototype.GetRotation=function(){return this.q},t.prototype.GetRotationAngle=function(){return this.q.GetAngle()},t.prototype.GetAngle=function(){return this.q.GetAngle()},t.MulXV=function(t,e,i){var n=t.q.c,r=t.q.s,s=e.x,a=e.y;return i.x=n*s-r*a+t.p.x,i.y=r*s+n*a+t.p.y,i},t.MulTXV=function(t,e,i){var n=t.q.c,r=t.q.s,s=e.x-t.p.x,a=e.y-t.p.y;return i.x=n*s+r*a,i.y=-r*s+n*a,i},t.MulXX=function(t,e,i){return F.MulRR(t.q,e.q,i.q),I.AddVV(F.MulRV(t.q,e.p,i.p),t.p,i.p),i},t.MulTXX=function(t,e,i){return F.MulTRR(t.q,e.q,i.q),F.MulTRV(t.q,I.SubVV(e.p,t.p,i.p),i.p),i},t.IDENTITY=new t,t})(),N=(function(){function t(){this.localCenter=new I,this.c0=new I,this.c=new I,this.a0=0,this.a=0,this.alpha0=0}return t.prototype.Clone=function(){return(new t).Copy(this)},t.prototype.Copy=function(t){return this.localCenter.Copy(t.localCenter),this.c0.Copy(t.c0),this.c.Copy(t.c),this.a0=t.a0,this.a=t.a,this.alpha0=t.alpha0,this},t.prototype.GetTransform=function(t,e){var i=1-e;t.p.x=i*this.c0.x+e*this.c.x,t.p.y=i*this.c0.y+e*this.c.y;var n=i*this.a0+e*this.a;return t.q.SetAngle(n),t.p.SelfSub(F.MulRV(t.q,this.localCenter,I.s_t0)),t},t.prototype.Advance=function(t){var e=(t-this.alpha0)/(1-this.alpha0),i=1-e;this.c0.x=i*this.c0.x+e*this.c.x,this.c0.y=i*this.c0.y+e*this.c.y,this.a0=i*this.a0+e*this.a,this.alpha0=t},t.prototype.Normalize=function(){var t=6.28318530718*Math.floor(this.a0/6.28318530718);this.a0-=t,this.a-=t},t})(),k=(function(){function t(t,e,i,n){void 0===t&&(t=.5),void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===n&&(n=1),this.r=t,this.g=e,this.b=i,this.a=n}return t.prototype.Clone=function(){return(new t).Copy(this)},t.prototype.Copy=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.IsEqual=function(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a},t.prototype.IsZero=function(){return 0===this.r&&0===this.g&&0===this.b&&0===this.a},t.prototype.Set=function(t,e,i,n){void 0===n&&(n=this.a),this.SetRGBA(t,e,i,n)},t.prototype.SetByteRGB=function(t,e,i){return this.r=t/255,this.g=e/255,this.b=i/255,this},t.prototype.SetByteRGBA=function(t,e,i,n){return this.r=t/255,this.g=e/255,this.b=i/255,this.a=n/255,this},t.prototype.SetRGB=function(t,e,i){return this.r=t,this.g=e,this.b=i,this},t.prototype.SetRGBA=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,this},t.prototype.SelfAdd=function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this.a+=t.a,this},t.prototype.Add=function(t,e){return e.r=this.r+t.r,e.g=this.g+t.g,e.b=this.b+t.b,e.a=this.a+t.a,e},t.prototype.SelfSub=function(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this.a-=t.a,this},t.prototype.Sub=function(t,e){return e.r=this.r-t.r,e.g=this.g-t.g,e.b=this.b-t.b,e.a=this.a-t.a,e},t.prototype.SelfMul=function(t){return this.r*=t,this.g*=t,this.b*=t,this.a*=t,this},t.prototype.Mul=function(t,e){return e.r=this.r*t,e.g=this.g*t,e.b=this.b*t,e.a=this.a*t,e},t.prototype.Mix=function(e,i){t.MixColors(this,e,i)},t.MixColors=function(t,e,i){var n=i*(e.r-t.r),r=i*(e.g-t.g),s=i*(e.b-t.b),a=i*(e.a-t.a);t.r+=n,t.g+=r,t.b+=s,t.a+=a,e.r-=n,e.g-=r,e.b-=s,e.a-=a},t.prototype.MakeStyleString=function(e){return void 0===e&&(e=this.a),t.MakeStyleString(this.r,this.g,this.b,e)},t.MakeStyleString=function(t,e,i,n){return void 0===n&&(n=1),t*=255,e*=255,i*=255,n<1?"rgba("+t+","+e+","+i+","+n+")":"rgb("+t+","+e+","+i+")"},t.ZERO=new t(0,0,0,0),t.RED=new t(1,0,0),t.GREEN=new t(0,1,0),t.BLUE=new t(0,0,1),t})();(C=t.b2DrawFlags||(t.b2DrawFlags={}))[C.e_none=0]="e_none",C[C.e_shapeBit=1]="e_shapeBit",C[C.e_jointBit=2]="e_jointBit",C[C.e_aabbBit=4]="e_aabbBit",C[C.e_pairBit=8]="e_pairBit",C[C.e_centerOfMassBit=16]="e_centerOfMassBit",C[C.e_particleBit=32]="e_particleBit",C[C.e_controllerBit=64]="e_controllerBit",C[C.e_all=63]="e_all";var z=(function(){function t(){this.m_drawFlags=0}return t.prototype.SetFlags=function(t){this.m_drawFlags=t},t.prototype.GetFlags=function(){return this.m_drawFlags},t.prototype.AppendFlags=function(t){this.m_drawFlags|=t},t.prototype.ClearFlags=function(t){this.m_drawFlags&=~t},t})(),G=(function(){function t(){this.m_start=Date.now()}return t.prototype.Reset=function(){return this.m_start=Date.now(),this},t.prototype.GetMilliseconds=function(){return Date.now()-this.m_start},t})(),U=(function(){function t(){this.m_count=0,this.m_min_count=0,this.m_max_count=0}return t.prototype.GetCount=function(){return this.m_count},t.prototype.GetMinCount=function(){return this.m_min_count},t.prototype.GetMaxCount=function(){return this.m_max_count},t.prototype.ResetCount=function(){var t=this.m_count;return this.m_count=0,t},t.prototype.ResetMinCount=function(){this.m_min_count=0},t.prototype.ResetMaxCount=function(){this.m_max_count=0},t.prototype.Increment=function(){this.m_count++,this.m_max_countthis.m_count&&(this.m_min_count=this.m_count)},t})(),j=(function(){function t(t){this.m_stack=[],this.m_count=0,this.m_stack=d(t,(function(){return null})),this.m_count=0}return t.prototype.Reset=function(){return this.m_count=0,this},t.prototype.Push=function(t){this.m_stack[this.m_count]=t,this.m_count++},t.prototype.Pop=function(){this.m_count--;var t=this.m_stack[this.m_count];if(this.m_stack[this.m_count]=null,null===t)throw new Error;return t},t.prototype.GetCount=function(){return this.m_count},t})(),H=(function(){function t(){this.m_buffer=I.MakeArray(2),this.m_vertices=this.m_buffer,this.m_count=0,this.m_radius=0}return t.prototype.Copy=function(t){return t.m_vertices===t.m_buffer?(this.m_vertices=this.m_buffer,this.m_buffer[0].Copy(t.m_buffer[0]),this.m_buffer[1].Copy(t.m_buffer[1])):this.m_vertices=t.m_vertices,this.m_count=t.m_count,this.m_radius=t.m_radius,this},t.prototype.Reset=function(){return this.m_vertices=this.m_buffer,this.m_count=0,this.m_radius=0,this},t.prototype.SetShape=function(t,e){t.SetupDistanceProxy(this,e)},t.prototype.SetVerticesRadius=function(t,e,i){this.m_vertices=t,this.m_count=e,this.m_radius=i},t.prototype.GetSupport=function(t){for(var e=0,i=I.DotVV(this.m_vertices[0],t),n=1;ni&&(e=n,i=r)}return e},t.prototype.GetSupportVertex=function(t){for(var e=0,i=I.DotVV(this.m_vertices[0],t),n=1;ni&&(e=n,i=r)}return this.m_vertices[e]},t.prototype.GetVertexCount=function(){return this.m_count},t.prototype.GetVertex=function(t){return this.m_vertices[t]},t})(),W=(function(){function t(){this.metric=0,this.count=0,this.indexA=[0,0,0],this.indexB=[0,0,0]}return t.prototype.Reset=function(){return this.metric=0,this.count=0,this},t})(),X=(function(){function t(){this.proxyA=new H,this.proxyB=new H,this.transformA=new V,this.transformB=new V,this.useRadii=!1}return t.prototype.Reset=function(){return this.proxyA.Reset(),this.proxyB.Reset(),this.transformA.SetIdentity(),this.transformB.SetIdentity(),this.useRadii=!1,this},t})(),Y=(function(){function t(){this.pointA=new I,this.pointB=new I,this.distance=0,this.iterations=0}return t.prototype.Reset=function(){return this.pointA.SetZero(),this.pointB.SetZero(),this.distance=0,this.iterations=0,this},t})();t.b2_gjkCalls=0,t.b2_gjkIters=0,t.b2_gjkMaxIters=0;var q=(function(){function t(){this.wA=new I,this.wB=new I,this.w=new I,this.a=0,this.indexA=0,this.indexB=0}return t.prototype.Copy=function(t){return this.wA.Copy(t.wA),this.wB.Copy(t.wB),this.w.Copy(t.w),this.a=t.a,this.indexA=t.indexA,this.indexB=t.indexB,this},t})(),J=(function(){function t(){this.m_v1=new q,this.m_v2=new q,this.m_v3=new q,this.m_vertices=[],this.m_count=0,this.m_vertices[0]=this.m_v1,this.m_vertices[1]=this.m_v2,this.m_vertices[2]=this.m_v3}return t.prototype.ReadCache=function(t,e,i,r,s){this.m_count=t.count;for(var a=this.m_vertices,o=0;o1){var h=t.metric,u=this.GetMetric();(u<.5*h||2*h0?I.CrossOneV(e,t):I.CrossVOne(e,t);default:return t.SetZero()}},t.prototype.GetClosestPoint=function(t){switch(this.m_count){case 0:return t.SetZero();case 1:return t.Copy(this.m_v1.w);case 2:return t.Set(this.m_v1.a*this.m_v1.w.x+this.m_v2.a*this.m_v2.w.x,this.m_v1.a*this.m_v1.w.y+this.m_v2.a*this.m_v2.w.y);case 3:default:return t.SetZero()}},t.prototype.GetWitnessPoints=function(t,e){switch(this.m_count){case 0:break;case 1:t.Copy(this.m_v1.wA),e.Copy(this.m_v1.wB);break;case 2:t.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x,t.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y,e.x=this.m_v1.a*this.m_v1.wB.x+this.m_v2.a*this.m_v2.wB.x,e.y=this.m_v1.a*this.m_v1.wB.y+this.m_v2.a*this.m_v2.wB.y;break;case 3:e.x=t.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x+this.m_v3.a*this.m_v3.wA.x,e.y=t.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y+this.m_v3.a*this.m_v3.wA.y}},t.prototype.GetMetric=function(){switch(this.m_count){case 0:case 1:return 0;case 2:return I.DistanceVV(this.m_v1.w,this.m_v2.w);case 3:return I.CrossVV(I.SubVV(this.m_v2.w,this.m_v1.w,I.s_t0),I.SubVV(this.m_v3.w,this.m_v1.w,I.s_t1));default:return 0}},t.prototype.Solve2=function(){var e=this.m_v1.w,i=this.m_v2.w,n=I.SubVV(i,e,t.s_e12),r=-I.DotVV(e,n);if(r<=0)return this.m_v1.a=1,void(this.m_count=1);var s=I.DotVV(i,n);if(s<=0)return this.m_v2.a=1,this.m_count=1,void this.m_v1.Copy(this.m_v2);var a=1/(s+r);this.m_v1.a=s*a,this.m_v2.a=r*a,this.m_count=2},t.prototype.Solve3=function(){var e=this.m_v1.w,i=this.m_v2.w,n=this.m_v3.w,r=I.SubVV(i,e,t.s_e12),s=I.DotVV(e,r),a=I.DotVV(i,r),o=-s,l=I.SubVV(n,e,t.s_e13),c=I.DotVV(e,l),h=I.DotVV(n,l),u=-c,_=I.SubVV(n,i,t.s_e23),f=I.DotVV(i,_),d=I.DotVV(n,_),p=-f,m=I.CrossVV(r,l),y=m*I.CrossVV(i,n),v=m*I.CrossVV(n,e),g=m*I.CrossVV(e,i);if(o<=0&&u<=0)return this.m_v1.a=1,void(this.m_count=1);if(a>0&&o>0&&g<=0){var b=1/(a+o);return this.m_v1.a=a*b,this.m_v2.a=o*b,void(this.m_count=2)}if(h>0&&u>0&&v<=0){var A=1/(h+u);return this.m_v1.a=h*A,this.m_v3.a=u*A,this.m_count=2,void this.m_v2.Copy(this.m_v3)}if(a<=0&&p<=0)return this.m_v2.a=1,this.m_count=1,void this.m_v1.Copy(this.m_v2);if(h<=0&&d<=0)return this.m_v3.a=1,this.m_count=1,void this.m_v1.Copy(this.m_v3);if(d>0&&p>0&&y<=0){var x=1/(d+p);return this.m_v2.a=d*x,this.m_v3.a=p*x,this.m_count=2,void this.m_v1.Copy(this.m_v3)}var C=1/(y+v+g);this.m_v1.a=y*C,this.m_v2.a=v*C,this.m_v3.a=g*C,this.m_count=3},t.s_e12=new I,t.s_e13=new I,t.s_e23=new I,t})(),Z=new J,K=[0,0,0],Q=[0,0,0],$=new I,tt=new I,et=new I,it=new I,nt=new I;function rt(e,i,s){++t.b2_gjkCalls;var a=s.proxyA,o=s.proxyB,l=s.transformA,c=s.transformB,h=Z;h.ReadCache(i,a,l,o,c);for(var u=h.m_vertices,_=K,f=Q,d=0,p=0;p<20;){d=h.m_count;for(var m=0;mA+x&&e.distance>n){e.distance-=A+x;var C=I.SubVV(e.pointB,e.pointA,et);C.Normalize(),e.pointA.SelfMulAdd(A,C),e.pointB.SelfMulSub(x,C)}else{var T=I.MidVV(e.pointA,e.pointB,$);e.pointA.Copy(T),e.pointB.Copy(T),e.distance=0}}}var st,at=new I,ot=new J,lt=new I,ct=new I,ht=new I,ut=new I,_t=new I,ft=new I;(st=t.b2ContactFeatureType||(t.b2ContactFeatureType={}))[st.e_vertex=0]="e_vertex",st[st.e_face=1]="e_face";var dt,pt=(function(){function t(){this._key=0,this._key_invalid=!1,this._indexA=0,this._indexB=0,this._typeA=0,this._typeB=0}return Object.defineProperty(t.prototype,"key",{get:function(){return this._key_invalid&&(this._key_invalid=!1,this._key=this._indexA|this._indexB<<8|this._typeA<<16|this._typeB<<24),this._key},set:function(t){this._key=t,this._key_invalid=!1,this._indexA=255&this._key,this._indexB=this._key>>8&255,this._typeA=this._key>>16&255,this._typeB=this._key>>24&255},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indexA",{get:function(){return this._indexA},set:function(t){this._indexA=t,this._key_invalid=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indexB",{get:function(){return this._indexB},set:function(t){this._indexB=t,this._key_invalid=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeA",{get:function(){return this._typeA},set:function(t){this._typeA=t,this._key_invalid=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeB",{get:function(){return this._typeB},set:function(t){this._typeB=t,this._key_invalid=!0},enumerable:!0,configurable:!0}),t})(),mt=(function(){function t(){this.cf=new pt}return t.prototype.Copy=function(t){return this.key=t.key,this},t.prototype.Clone=function(){return(new t).Copy(this)},Object.defineProperty(t.prototype,"key",{get:function(){return this.cf.key},set:function(t){this.cf.key=t},enumerable:!0,configurable:!0}),t})(),yt=(function(){function t(){this.localPoint=new I,this.normalImpulse=0,this.tangentImpulse=0,this.id=new mt}return t.MakeArray=function(e){return d(e,(function(){return new t}))},t.prototype.Reset=function(){this.localPoint.SetZero(),this.normalImpulse=0,this.tangentImpulse=0,this.id.key=0},t.prototype.Copy=function(t){return this.localPoint.Copy(t.localPoint),this.normalImpulse=t.normalImpulse,this.tangentImpulse=t.tangentImpulse,this.id.Copy(t.id),this},t})();(dt=t.b2ManifoldType||(t.b2ManifoldType={}))[dt.e_unknown=-1]="e_unknown",dt[dt.e_circles=0]="e_circles",dt[dt.e_faceA=1]="e_faceA",dt[dt.e_faceB=2]="e_faceB";var vt,gt=(function(){function e(){this.points=yt.MakeArray(a),this.localNormal=new I,this.localPoint=new I,this.type=t.b2ManifoldType.e_unknown,this.pointCount=0}return e.prototype.Reset=function(){for(var e=0;er&&I.SubVV(c,l,this.normal).SelfNormalize();var h=I.AddVMulSV(l,s,this.normal,e.Initialize_s_cA),u=I.SubVMulSV(c,o,this.normal,e.Initialize_s_cB);I.MidVV(h,u,this.points[0]),this.separations[0]=I.DotVV(I.SubVV(u,h,I.s_t0),this.normal);break;case t.b2ManifoldType.e_faceA:F.MulRV(n.q,i.localNormal,this.normal);for(var _=V.MulXV(n,i.localPoint,e.Initialize_s_planePoint),f=0;f=0&&e>=0;return i&&this.lowerBound.IsValid()&&this.upperBound.IsValid()},t.prototype.GetCenter=function(){return I.MidVV(this.lowerBound,this.upperBound,this.m_cache_center)},t.prototype.GetExtents=function(){return I.ExtVV(this.lowerBound,this.upperBound,this.m_cache_extent)},t.prototype.GetPerimeter=function(){return 2*(this.upperBound.x-this.lowerBound.x+(this.upperBound.y-this.lowerBound.y))},t.prototype.Combine1=function(t){return this.lowerBound.x=y(this.lowerBound.x,t.lowerBound.x),this.lowerBound.y=y(this.lowerBound.y,t.lowerBound.y),this.upperBound.x=v(this.upperBound.x,t.upperBound.x),this.upperBound.y=v(this.upperBound.y,t.upperBound.y),this},t.prototype.Combine2=function(t,e){return this.lowerBound.x=y(t.lowerBound.x,e.lowerBound.x),this.lowerBound.y=y(t.lowerBound.y,e.lowerBound.y),this.upperBound.x=v(t.upperBound.x,e.upperBound.x),this.upperBound.y=v(t.upperBound.y,e.upperBound.y),this},t.Combine=function(t,e,i){return i.Combine2(t,e),i},t.prototype.Contains=function(t){var e=!0;return(e=(e=(e=e&&this.lowerBound.x<=t.lowerBound.x)&&this.lowerBound.y<=t.lowerBound.y)&&t.upperBound.x<=this.upperBound.x)&&t.upperBound.y<=this.upperBound.y},t.prototype.RayCast=function(t,e){var r,s,a=-i,o=i,l=e.p1.x,c=e.p1.y,h=e.p2.x-e.p1.x,u=e.p2.y-e.p1.y,_=m(h),f=m(u),d=t.normal;if(_(s=(this.upperBound.x-l)*p)){var g=r;r=s,s=g,v=1}if(r>a&&(d.x=v,d.y=0,a=r),a>(o=y(o,s)))return!1}if(f(s=(this.upperBound.y-c)*p)&&(g=r,r=s,s=g,v=1),r>a&&(d.x=0,d.y=v,a=r),a>(o=y(o,s)))return!1;return!(a<0||e.maxFraction0||i>0||n>0||r>0)},t})();function St(t,e){var i=e.lowerBound.x-t.upperBound.x,n=e.lowerBound.y-t.upperBound.y,r=t.lowerBound.x-e.upperBound.x,s=t.lowerBound.y-e.upperBound.y;return!(i>0||n>0||r>0||s>0)}function wt(e,i,n,r,s){var a=0,o=i[0],l=i[1],c=I.DotVV(n,o.v)-r,h=I.DotVV(n,l.v)-r;if(c<=0&&e[a++].Copy(o),h<=0&&e[a++].Copy(l),c*h<0){var u=c/(c-h),_=e[a].v;_.x=o.v.x+u*(l.v.x-o.v.x),_.y=o.v.y+u*(l.v.y-o.v.y);var f=e[a].id;f.cf.indexA=s,f.cf.indexB=o.id.cf.indexB,f.cf.typeA=t.b2ContactFeatureType.e_vertex,f.cf.typeB=t.b2ContactFeatureType.e_face,++a}return a}var Et=new X,Mt=new W,Dt=new Y;function Bt(t,e,i,r,s,a){var o=Et.Reset();o.proxyA.SetShape(t,e),o.proxyB.SetShape(i,r),o.transformA.Copy(s),o.transformB.Copy(a),o.useRadii=!0;var l=Mt.Reset();l.count=0;var c=Dt.Reset();return rt(c,l,o),c.distance<10*n}function It(t){if(null===t)throw new Error;return t}var Pt=(function(){function t(t){void 0===t&&(t=0),this.m_id=0,this.aabb=new Tt,this.parent=null,this.child1=null,this.child2=null,this.height=0,this.m_id=t}return t.prototype.IsLeaf=function(){return null===this.child1},t})(),Rt=(function(){function t(){this.m_root=null,this.m_freeList=null,this.m_path=0,this.m_insertionCount=0,this.m_stack=new j(256)}return t.prototype.Query=function(t,e){if(null!==this.m_root){var i=this.m_stack.Reset();for(i.Push(this.m_root);i.GetCount()>0;){var n=i.Pop();if(n.aabb.TestOverlap(t))if(n.IsLeaf()){if(!e(n))return}else i.Push(It(n.child1)),i.Push(It(n.child2))}}},t.prototype.QueryPoint=function(t,e){if(null!==this.m_root){var i=this.m_stack.Reset();for(i.Push(this.m_root);i.GetCount()>0;){var n=i.Pop();if(n.aabb.TestContain(t))if(n.IsLeaf()){if(!e(n))return}else i.Push(It(n.child1)),i.Push(It(n.child2))}}},t.prototype.RayCast=function(e,i){if(null!==this.m_root){var n=e.p1,r=e.p2,s=I.SubVV(r,n,t.s_r);s.Normalize();var a=I.CrossOneV(s,t.s_v),o=I.AbsV(a,t.s_abs_v),l=e.maxFraction,c=t.s_segmentAABB,h=n.x+l*(r.x-n.x),u=n.y+l*(r.y-n.y);c.lowerBound.x=y(n.x,h),c.lowerBound.y=y(n.y,u),c.upperBound.x=v(n.x,h),c.upperBound.y=v(n.y,u);var _=this.m_stack.Reset();for(_.Push(this.m_root);_.GetCount()>0;){var f=_.Pop();if(St(f.aabb,c)){var d=f.aabb.GetCenter(),p=f.aabb.GetExtents();if(!(m(I.DotVV(a,I.SubVV(n,d,I.s_t0)))-I.DotVV(o,p)>0))if(f.IsLeaf()){var g=t.s_subInput;g.p1.Copy(e.p1),g.p2.Copy(e.p2),g.maxFraction=l;var b=i(g,f);if(0===b)return;b>0&&(l=b,h=n.x+l*(r.x-n.x),u=n.y+l*(r.y-n.y),c.lowerBound.x=y(n.x,h),c.lowerBound.y=y(n.y,u),c.upperBound.x=v(n.x,h),c.upperBound.y=v(n.y,u))}else _.Push(It(f.child1)),_.Push(It(f.child2))}}}},t.prototype.AllocateNode=function(){if(this.m_freeList){var e=this.m_freeList;return this.m_freeList=e.parent,e.parent=null,e.child1=null,e.child2=null,e.height=0,delete e.userData,e}return new Pt(t.s_node_id++)},t.prototype.FreeNode=function(t){t.parent=this.m_freeList,t.child1=null,t.child2=null,t.height=-1,delete t.userData,this.m_freeList=t},t.prototype.CreateProxy=function(t,e){var i=this.AllocateNode();return i.aabb.lowerBound.x=t.lowerBound.x-.1,i.aabb.lowerBound.y=t.lowerBound.y-.1,i.aabb.upperBound.x=t.upperBound.x+.1,i.aabb.upperBound.y=t.upperBound.y+.1,i.userData=e,i.height=0,this.InsertLeaf(i),i},t.prototype.DestroyProxy=function(t){this.RemoveLeaf(t),this.FreeNode(t)},t.prototype.MoveProxy=function(t,e,i){if(t.aabb.Contains(e))return!1;this.RemoveLeaf(t);var n=.1+2*(i.x>0?i.x:-i.x),r=.1+2*(i.y>0?i.y:-i.y);return t.aabb.lowerBound.x=e.lowerBound.x-n,t.aabb.lowerBound.y=e.lowerBound.y-r,t.aabb.upperBound.x=e.upperBound.x+n,t.aabb.upperBound.y=e.upperBound.y+r,this.InsertLeaf(t),!0},t.prototype.InsertLeaf=function(e){if(++this.m_insertionCount,null===this.m_root)return this.m_root=e,void(this.m_root.parent=null);for(var i=e.aabb,n=this.m_root;!n.IsLeaf();){var r=It(n.child1),s=It(n.child2),a=n.aabb.GetPerimeter(),o=t.s_combinedAABB;o.Combine2(n.aabb,i);var l=o.GetPerimeter(),c=2*l,h=2*(l-a),u=void 0,_=t.s_aabb,f=void 0;r.IsLeaf()?(_.Combine2(i,r.aabb),u=_.GetPerimeter()+h):(_.Combine2(i,r.aabb),f=r.aabb.GetPerimeter(),u=_.GetPerimeter()-f+h);var d=void 0;if(s.IsLeaf()?(_.Combine2(i,s.aabb),d=_.GetPerimeter()+h):(_.Combine2(i,s.aabb),f=s.aabb.GetPerimeter(),d=_.GetPerimeter()-f+h),c1){var r=It(i.child1),s=It(i.child2);return i.child1=t,i.parent=t.parent,t.parent=i,null!==i.parent?i.parent.child1===t?i.parent.child1=i:i.parent.child2=i:this.m_root=i,r.height>s.height?(i.child2=r,t.child2=s,s.parent=t,t.aabb.Combine2(e.aabb,s.aabb),i.aabb.Combine2(t.aabb,r.aabb),t.height=1+v(e.height,s.height),i.height=1+v(t.height,r.height)):(i.child2=s,t.child2=r,r.parent=t,t.aabb.Combine2(e.aabb,r.aabb),i.aabb.Combine2(t.aabb,s.aabb),t.height=1+v(e.height,r.height),i.height=1+v(t.height,s.height)),i}if(n<-1){var a=It(e.child1),o=It(e.child2);return e.child1=t,e.parent=t.parent,t.parent=e,null!==e.parent?e.parent.child1===t?e.parent.child1=e:e.parent.child2=e:this.m_root=e,a.height>o.height?(e.child2=a,t.child1=o,o.parent=t,t.aabb.Combine2(i.aabb,o.aabb),e.aabb.Combine2(t.aabb,a.aabb),t.height=1+v(i.height,o.height),e.height=1+v(t.height,a.height)):(e.child2=o,t.child1=a,a.parent=t,t.aabb.Combine2(i.aabb,a.aabb),e.aabb.Combine2(t.aabb,o.aabb),t.height=1+v(i.height,a.height),e.height=1+v(t.height,o.height)),e}return t},t.prototype.GetHeight=function(){return null===this.m_root?0:this.m_root.height},t.GetAreaNode=function(e){if(null===e)return 0;if(e.IsLeaf())return 0;var i=e.aabb.GetPerimeter();return(i+=t.GetAreaNode(e.child1))+t.GetAreaNode(e.child2)},t.prototype.GetAreaRatio=function(){if(null===this.m_root)return 0;var e=this.m_root.aabb.GetPerimeter();return t.GetAreaNode(this.m_root)/e},t.prototype.ComputeHeightNode=function(t){if(!t||t.IsLeaf())return 0;var e=this.ComputeHeightNode(t.child1),i=this.ComputeHeightNode(t.child2);return 1+v(e,i)},t.prototype.ComputeHeight=function(){return this.ComputeHeightNode(this.m_root)},t.prototype.ValidateStructure=function(t){if(null!==t){this.m_root;var e=t;if(!e.IsLeaf()){var i=It(e.child1),n=It(e.child2);this.ValidateStructure(i),this.ValidateStructure(n)}}},t.prototype.ValidateMetrics=function(e){if(null!==e){var i=e;if(!i.IsLeaf()){var n=It(i.child1),r=It(i.child2);t.s_aabb.Combine2(n.aabb,r.aabb),this.ValidateMetrics(n),this.ValidateMetrics(r)}}},t.prototype.Validate=function(){},t.GetMaxBalanceNode=function(t,e){if(null===t)return e;if(t.height<=1)return e;var i=It(t.child1),n=It(t.child2),r=m(n.height-i.height);return v(e,r)},t.prototype.GetMaxBalance=function(){return t.GetMaxBalanceNode(this.m_root,0)},t.prototype.RebuildBottomUp=function(){this.Validate()},t.ShiftOriginNode=function(e,i){if(null!==e&&!(e.height<=1)){var n=e.child1,r=e.child2;t.ShiftOriginNode(n,i),t.ShiftOriginNode(r,i),e.aabb.lowerBound.SelfSub(i),e.aabb.upperBound.SelfSub(i)}},t.prototype.ShiftOrigin=function(e){t.ShiftOriginNode(this.m_root,e)},t.s_r=new I,t.s_v=new I,t.s_abs_v=new I,t.s_segmentAABB=new Tt,t.s_subInput=new xt,t.s_combinedAABB=new Tt,t.s_aabb=new Tt,t.s_node_id=0,t})(),Ot=function(t,e){this.proxyA=t,this.proxyB=e},Lt=(function(){function t(){this.m_tree=new Rt,this.m_proxyCount=0,this.m_moveCount=0,this.m_moveBuffer=[],this.m_pairCount=0,this.m_pairBuffer=[]}return t.prototype.CreateProxy=function(t,e){var i=this.m_tree.CreateProxy(t,e);return++this.m_proxyCount,this.BufferMove(i),i},t.prototype.DestroyProxy=function(t){this.UnBufferMove(t),--this.m_proxyCount,this.m_tree.DestroyProxy(t)},t.prototype.MoveProxy=function(t,e,i){this.m_tree.MoveProxy(t,e,i)&&this.BufferMove(t)},t.prototype.TouchProxy=function(t){this.BufferMove(t)},t.prototype.GetProxyCount=function(){return this.m_proxyCount},t.prototype.UpdatePairs=function(t){var e=this;this.m_pairCount=0;for(var i=function(t){var i=n.m_moveBuffer[t];if(null===i)return"continue";var r=i.aabb;n.m_tree.Query(r,(function(t){if(t.m_id===i.m_id)return!0;var n,r;if(t.m_id_+f){e.state=t.b2TOIOutputState.e_separated,e.t=h,T=!0;break}if(D>_-f){d=S;break}var B=C.Evaluate(E[0],M[0],d);if(B<_-f){e.state=t.b2TOIOutputState.e_failed,e.t=d,T=!0;break}if(B<=_+f){e.state=t.b2TOIOutputState.e_touching,e.t=d,T=!0;break}for(var I=0,P=d,R=S;;){var O;O=1&I?P+(_-B)*(R-P)/(D-B):.5*(P+R),++I,++t.b2_toiRootIters;var L=C.Evaluate(E[0],M[0],O);if(m(L-_)_?(P=O,B=L):(R=O,D=L),50===I)break}if(t.b2_toiMaxRootIters=v(t.b2_toiMaxRootIters,I),++w===o)break}if(++p,++t.b2_toiIters,T)break;if(20===p){e.state=t.b2TOIOutputState.e_failed,e.t=d;break}}t.b2_toiMaxIters=v(t.b2_toiMaxIters,p);var F=n.GetMilliseconds();t.b2_toiMaxTime=v(t.b2_toiMaxTime,F),t.b2_toiTime+=F}var se=new I,ae=new I;function oe(e,i,n,r,s){e.pointCount=0;var a=V.MulXV(n,i.m_p,se),o=V.MulXV(s,r.m_p,ae),l=I.DistanceSquaredVV(a,o),c=i.m_radius+r.m_radius;l>c*c||(e.type=t.b2ManifoldType.e_circles,e.localPoint.Copy(i.m_p),e.localNormal.SetZero(),e.pointCount=1,e.points[0].localPoint.Copy(r.m_p),e.points[0].id.key=0)}var le=new I,ce=new I,he=new I;function ue(e,r,s,a,o){e.pointCount=0;for(var l=V.MulXV(o,a.m_p,le),c=V.MulTXV(s,l,ce),h=0,u=-i,_=r.m_radius+a.m_radius,f=r.m_count,d=r.m_vertices,p=r.m_normals,m=0;m_)return;y>u&&(u=y,h=m)}var v=h,g=(v+1)%f,b=d[v],A=d[g];if(u_*_)return;e.pointCount=1,e.type=t.b2ManifoldType.e_faceA,I.SubVV(c,b,e.localNormal).SelfNormalize(),e.localPoint.Copy(b),e.points[0].localPoint.Copy(a.m_p),e.points[0].id.key=0}else if(C<=0){if(I.DistanceSquaredVV(c,A)>_*_)return;e.pointCount=1,e.type=t.b2ManifoldType.e_faceA,I.SubVV(c,A,e.localNormal).SelfNormalize(),e.localPoint.Copy(A),e.points[0].localPoint.Copy(a.m_p),e.points[0].id.key=0}else{var T=I.MidVV(b,A,he);if(I.DotVV(I.SubVV(c,T,I.s_t1),p[v])>_)return;e.pointCount=1,e.type=t.b2ManifoldType.e_faceA,e.localNormal.Copy(p[v]).SelfNormalize(),e.localPoint.Copy(T),e.points[0].localPoint.Copy(a.m_p),e.points[0].id.key=0}}var _e=new I,fe=new I,de=new I,pe=new I;function me(t,e,n,r,s){for(var a=t.m_vertices,o=t.m_normals,l=r.m_count,c=r.m_vertices,h=F.MulRV(e.q,o[n],_e),u=F.MulTRV(s.q,h,fe),_=0,f=i,d=0;du&&(u=f,h=_)}var d=me(e,n,h,r,s),p=(h+a-1)%a,m=me(e,n,p,r,s),y=(h+1)%a,v=me(e,n,y,r,s),g=0,b=0,A=0;if(m>d&&m>v)A=-1,g=p,b=m;else{if(!(v>d))return t[0]=h,d;A=1,g=y,b=v}for(;(d=me(e,n,h=-1===A?(g+a-1)%a:(g+1)%a,r,s))>b;)g=h,b=d;return t[0]=g,b}var be=new I;function Ae(e,n,r,s,a,o){for(var l=n.m_normals,c=a.m_count,h=a.m_vertices,u=a.m_normals,_=F.MulTRV(o.q,F.MulRV(r.q,l[s],I.s_t0),be),f=0,d=i,p=0;po)){var h=we;h[0]=0;var u=ge(h,r,s,i,n);if(!(u>o)){var _,f,d,p,m=0,y=0;u>.98*c+.001?(_=r,f=i,d=s,p=n,m=h[0],e.type=t.b2ManifoldType.e_faceB,y=1):(_=i,f=r,d=n,p=s,m=l[0],e.type=t.b2ManifoldType.e_faceA,y=0);var v=xe;Ae(v,_,d,m,f,p);var g=_.m_count,b=_.m_vertices,A=m,x=(m+1)%g,C=b[A],T=b[x],S=I.SubVV(T,C,Ee);S.Normalize();var w=I.CrossVOne(S,Me),E=I.MidVV(C,T,De),M=F.MulRV(d.q,S,Ie),D=I.CrossVOne(M,Be),B=V.MulXV(d,C,Re),P=V.MulXV(d,T,Oe),R=I.DotVV(D,B),O=-I.DotVV(M,B)+o,L=I.DotVV(M,P)+o,N=Ce,k=Te;if(!(wt(N,v,I.NegV(M,Pe),O,A)<2||wt(k,N,M,L,x)<2)){e.localNormal.Copy(w),e.localPoint.Copy(E);for(var z=0,G=0;G_*_)return;if(i.m_hasVertex0){var m=i.m_vertex0,y=o,v=I.SubVV(y,m,ke);if(I.DotVV(v,I.SubVV(y,a,I.s_t0))>0)return}return f.cf.indexA=0,f.cf.typeA=t.b2ContactFeatureType.e_vertex,e.pointCount=1,e.type=t.b2ManifoldType.e_circles,e.localNormal.SetZero(),e.localPoint.Copy(d),e.points[0].id.Copy(f),void e.points[0].localPoint.Copy(r.m_p)}if(h<=0){var g=l,b=I.SubVV(a,g,Ne);if(I.DotVV(b,b)>_*_)return;if(i.m_hasVertex3){var A=i.m_vertex3,x=l,C=I.SubVV(A,x,ze);if(I.DotVV(C,I.SubVV(a,x,I.s_t0))>0)return}return f.cf.indexA=1,f.cf.typeA=t.b2ContactFeatureType.e_vertex,e.pointCount=1,e.type=t.b2ManifoldType.e_circles,e.localNormal.SetZero(),e.localPoint.Copy(g),e.points[0].id.Copy(f),void e.points[0].localPoint.Copy(r.m_p)}var T=I.DotVV(c,c),S=Ge;S.x=1/T*(h*o.x+u*l.x),S.y=1/T*(h*o.y+u*l.y);var w=I.SubVV(a,S,Ne);if(!(I.DotVV(w,w)>_*_)){var E=Ue.Set(-c.y,c.x);I.DotVV(E,I.SubVV(a,o,I.s_t0))<0&&E.Set(-E.x,-E.y),E.Normalize(),f.cf.indexA=0,f.cf.typeA=t.b2ContactFeatureType.e_face,e.pointCount=1,e.type=t.b2ManifoldType.e_faceA,e.localNormal.Copy(E),e.localPoint.Copy(o),e.points[0].id.Copy(f),e.points[0].localPoint.Copy(r.m_p)}}var We=function(){this.type=0,this.index=0,this.separation=0},Xe=function(){this.vertices=I.MakeArray(o),this.normals=I.MakeArray(o),this.count=0},Ye=function(){this.i1=0,this.i2=0,this.v1=new I,this.v2=new I,this.normal=new I,this.sideNormal1=new I,this.sideOffset1=0,this.sideNormal2=new I,this.sideOffset2=0},qe=new(function(){function e(){this.m_polygonB=new Xe,this.m_xf=new V,this.m_centroidB=new I,this.m_v0=new I,this.m_v1=new I,this.m_v2=new I,this.m_v3=new I,this.m_normal0=new I,this.m_normal1=new I,this.m_normal2=new I,this.m_normal=new I,this.m_type1=0,this.m_type2=0,this.m_lowerLimit=new I,this.m_upperLimit=new I,this.m_radius=0,this.m_front=!1}return e.prototype.Collide=function(i,n,r,s,o){V.MulTXX(r,o,this.m_xf),V.MulXV(this.m_xf,s.m_centroid,this.m_centroidB),this.m_v0.Copy(n.m_vertex0),this.m_v1.Copy(n.m_vertex1),this.m_v2.Copy(n.m_vertex2),this.m_v3.Copy(n.m_vertex3);var l=n.m_hasVertex0,c=n.m_hasVertex3,h=I.SubVV(this.m_v2,this.m_v1,e.s_edge1);h.Normalize(),this.m_normal1.Set(h.y,-h.x);var u=I.DotVV(this.m_normal1,I.SubVV(this.m_centroidB,this.m_v1,I.s_t0)),_=0,f=0,d=!1,p=!1;if(l){var m=I.SubVV(this.m_v1,this.m_v0,e.s_edge0);m.Normalize(),this.m_normal0.Set(m.y,-m.x),d=I.CrossVV(m,h)>=0,_=I.DotVV(this.m_normal0,I.SubVV(this.m_centroidB,this.m_v0,I.s_t0))}if(c){var y=I.SubVV(this.m_v3,this.m_v2,e.s_edge2);y.Normalize(),this.m_normal2.Set(y.y,-y.x),p=I.CrossVV(h,y)>0,f=I.DotVV(this.m_normal2,I.SubVV(this.m_centroidB,this.m_v2,I.s_t0))}l&&c?d&&p?(this.m_front=_>=0||u>=0||f>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal0),this.m_upperLimit.Copy(this.m_normal2)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1).SelfNeg())):d?(this.m_front=_>=0||u>=0&&f>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal0),this.m_upperLimit.Copy(this.m_normal1)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal2).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1).SelfNeg())):p?(this.m_front=f>=0||_>=0&&u>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal2)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal0).SelfNeg())):(this.m_front=_>=0&&u>=0&&f>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal2).SelfNeg(),this.m_upperLimit.Copy(this.m_normal0).SelfNeg())):l?d?(this.m_front=_>=0||u>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal0),this.m_upperLimit.Copy(this.m_normal1).SelfNeg()):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1).SelfNeg())):(this.m_front=_>=0&&u>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1).SelfNeg()):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal0).SelfNeg())):c?p?(this.m_front=u>=0||f>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal2)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1))):(this.m_front=u>=0&&f>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1)):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal2).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1))):(this.m_front=u>=0,this.m_front?(this.m_normal.Copy(this.m_normal1),this.m_lowerLimit.Copy(this.m_normal1).SelfNeg(),this.m_upperLimit.Copy(this.m_normal1).SelfNeg()):(this.m_normal.Copy(this.m_normal1).SelfNeg(),this.m_lowerLimit.Copy(this.m_normal1),this.m_upperLimit.Copy(this.m_normal1))),this.m_polygonB.count=s.m_count;for(var v=0;vthis.m_radius)){var b=this.ComputePolygonSeparation(e.s_polygonAxis);if(!(0!==b.type&&b.separation>this.m_radius)){var A;A=0===b.type?g:b.separation>.98*g.separation+.001?b:g;var x=e.s_ie,C=e.s_rf;if(1===A.type){i.type=t.b2ManifoldType.e_faceA;var T=0,S=I.DotVV(this.m_normal,this.m_polygonB.normals[0]);for(v=1;vthis.m_radius)return n.type=2,n.index=s,n.separation=h,n;if(I.DotVV(a,r)>=0){if(I.DotVV(I.SubVV(a,this.m_upperLimit,I.s_t0),this.m_normal)<-c)continue}else if(I.DotVV(I.SubVV(a,this.m_lowerLimit,I.s_t0),this.m_normal)<-c)continue;h>n.separation&&(n.type=2,n.index=s,n.separation=h)}return n},e.s_edge1=new I,e.s_edge0=new I,e.s_edge2=new I,e.s_ie=At.MakeArray(2),e.s_rf=new Ye,e.s_clipPoints1=At.MakeArray(2),e.s_clipPoints2=At.MakeArray(2),e.s_edgeAxis=new We,e.s_polygonAxis=new We,e.s_n=new I,e.s_perp=new I,e}());function Je(t,e,i,n,r){qe.Collide(t,e,i,n,r)}var Ze,Ke=function(){this.mass=0,this.center=new I(0,0),this.I=0};(Ze=t.b2ShapeType||(t.b2ShapeType={}))[Ze.e_unknown=-1]="e_unknown",Ze[Ze.e_circleShape=0]="e_circleShape",Ze[Ze.e_edgeShape=1]="e_edgeShape",Ze[Ze.e_polygonShape=2]="e_polygonShape",Ze[Ze.e_chainShape=3]="e_chainShape",Ze[Ze.e_shapeTypeCount=4]="e_shapeTypeCount";var Qe=(function(){function e(e,i){this.m_type=t.b2ShapeType.e_unknown,this.m_radius=0,this.m_type=e,this.m_radius=i}return e.prototype.Copy=function(t){return this.m_radius=t.m_radius,this},e.prototype.GetType=function(){return this.m_type},e})(),$e=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])};function ti(t,e){function i(){this.constructor=t}$e(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var ei,ii=(function(e){function i(i){void 0===i&&(i=0);var n=e.call(this,t.b2ShapeType.e_circleShape,i)||this;return n.m_p=new I,n}return ti(i,e),i.prototype.Set=function(t,e){return void 0===e&&(e=this.m_radius),this.m_p.Copy(t),this.m_radius=e,this},i.prototype.Clone=function(){return(new i).Copy(this)},i.prototype.Copy=function(t){return e.prototype.Copy.call(this,t),this.m_p.Copy(t.m_p),this},i.prototype.GetChildCount=function(){return 1},i.prototype.TestPoint=function(t,e){var n=V.MulXV(t,this.m_p,i.TestPoint_s_center),r=I.SubVV(e,n,i.TestPoint_s_d);return I.DotVV(r,r)<=A(this.m_radius)},i.prototype.ComputeDistance=function(t,e,n){var r=V.MulXV(t,this.m_p,i.ComputeDistance_s_center);return I.SubVV(e,r,n),n.Normalize()-this.m_radius},i.prototype.RayCast=function(t,e,r){var s=V.MulXV(r,this.m_p,i.RayCast_s_position),a=I.SubVV(e.p1,s,i.RayCast_s_s),o=I.DotVV(a,a)-A(this.m_radius),l=I.SubVV(e.p2,e.p1,i.RayCast_s_r),c=I.DotVV(a,l),h=I.DotVV(l,l),u=c*c-h*o;if(u<0||hthis.m_radius)return r.Copy(a),s*this.m_radius*this.m_radius;var l=this.m_radius*this.m_radius,c=o*o,h=l*(D(o/this.m_radius)+s/2)+o*T(l-c),u=-2/3*S(l-c,1.5)/h;return r.x=a.x+t.x*u,r.y=a.y+t.y*u,h},i.prototype.Dump=function(t){t(" const shape: b2CircleShape = new b2CircleShape();\n"),t(" shape.m_radius = %.15f;\n",this.m_radius),t(" shape.m_p.Set(%.15f, %.15f);\n",this.m_p.x,this.m_p.y)},i.TestPoint_s_center=new I,i.TestPoint_s_d=new I,i.ComputeDistance_s_center=new I,i.RayCast_s_position=new I,i.RayCast_s_s=new I,i.RayCast_s_r=new I,i.ComputeAABB_s_p=new I,i})(Qe),ni=(function(e){function r(){var i=e.call(this,t.b2ShapeType.e_polygonShape,h)||this;return i.m_centroid=new I(0,0),i.m_vertices=[],i.m_normals=[],i.m_count=0,i}return ti(r,e),r.prototype.Clone=function(){return(new r).Copy(this)},r.prototype.Copy=function(t){e.prototype.Copy.call(this,t),this.m_centroid.Copy(t.m_centroid),this.m_count=t.m_count,this.m_vertices=I.MakeArray(this.m_count),this.m_normals=I.MakeArray(this.m_count);for(var i=0;id||p===d&&s[c].yA.LengthSquared()&&(b=_)}else b=_;if(++v,g=b,b===f)break}for(this.m_count=v,this.m_vertices=I.MakeArray(this.m_count),this.m_normals=I.MakeArray(this.m_count),c=0;c0)return!1;return!0},r.prototype.ComputeDistance=function(t,e,n){for(var s=V.MulTXV(t,e,r.ComputeDistance_s_pLocal),a=-i,o=r.ComputeDistance_s_normalForMaxDistance.Copy(s),l=0;la&&(a=c,o.Copy(this.m_normals[l]))}if(a>0){var h=r.ComputeDistance_s_minDistance.Copy(o),u=a*a;for(l=0;lf&&(h.Copy(_),u=f)}return F.MulRV(t.q,h,n),n.Normalize(),Math.sqrt(u)}return F.MulRV(t.q,o,n),a},r.prototype.RayCast=function(t,e,i){for(var n=V.MulTXV(i,e.p1,r.RayCast_s_p1),s=V.MulTXV(i,e.p2,r.RayCast_s_p2),a=I.SubVV(s,n,r.RayCast_s_d),o=0,l=e.maxFraction,c=-1,h=0;h0&&u=0&&(t.fraction=o,F.MulRV(i.q,this.m_normals[c],t.normal),!0)},r.prototype.ComputeAABB=function(t,e){for(var i=V.MulXV(e,this.m_vertices[0],t.lowerBound),n=t.upperBound.Copy(i),s=0;s0&&(d?_||(h=f-1,c++):_&&(u=f-1,c++)),_=d}switch(c){case 0:if(_){var p=r.ComputeSubmergedArea_s_md;return this.ComputeMass(p,1),V.MulXV(i,p.center,s),p.mass}return 0;case 1:-1===h?h=this.m_count-1:u=this.m_count-1}for(var m,y=(h+1)%this.m_count,v=(u+1)%this.m_count,g=(0-l[h])/(l[y]-l[h]),b=(0-l[u])/(l[v]-l[u]),A=r.ComputeSubmergedArea_s_intoVec.Set(this.m_vertices[h].x*(1-g)+this.m_vertices[y].x*g,this.m_vertices[h].y*(1-g)+this.m_vertices[y].y*g),x=r.ComputeSubmergedArea_s_outoVec.Set(this.m_vertices[u].x*(1-b)+this.m_vertices[v].x*b,this.m_vertices[u].y*(1-b)+this.m_vertices[v].y*b),C=0,T=r.ComputeSubmergedArea_s_center.SetZero(),S=this.m_vertices[y],w=y;w!==v;){m=(w=(w+1)%this.m_count)===v?x:this.m_vertices[w];var E=.5*((S.x-A.x)*(m.y-A.y)-(S.y-A.y)*(m.x-A.x));C+=E,T.x+=E*(A.x+S.x+m.x)/3,T.y+=E*(A.y+S.y+m.y)/3,S=m}return T.SelfMul(1/C),V.MulXV(i,T,s),C},r.prototype.Dump=function(t){t(" const shape: b2PolygonShape = new b2PolygonShape();\n"),t(" const vs: b2Vec2[] = b2Vec2.MakeArray(%d);\n",o);for(var e=0;e0){var c=I.DotVV(o,o);l>c?I.SubVV(e,s,a):a.SelfMulSub(l/c,o)}return n.Copy(a),n.Normalize()},i.prototype.RayCast=function(t,e,n){var r=V.MulTXV(n,e.p1,i.RayCast_s_p1),s=V.MulTXV(n,e.p2,i.RayCast_s_p2),a=I.SubVV(s,r,i.RayCast_s_d),o=this.m_vertex1,l=this.m_vertex2,c=I.SubVV(l,o,i.RayCast_s_e),h=t.normal.Set(c.y,-c.x).SelfNormalize(),u=I.DotVV(h,I.SubVV(o,r,I.s_t0)),_=I.DotVV(h,a);if(0===_)return!1;var f=u/_;if(f<0||e.maxFraction0&&t.normal.SelfNeg(),0))},i.prototype.ComputeAABB=function(t,e){var n=V.MulXV(e,this.m_vertex1,i.ComputeAABB_s_v1),r=V.MulXV(e,this.m_vertex2,i.ComputeAABB_s_v2);I.MinV(n,r,t.lowerBound),I.MaxV(n,r,t.upperBound);var s=this.m_radius;t.lowerBound.SelfSubXY(s,s),t.upperBound.SelfAddXY(s,s)},i.prototype.ComputeMass=function(t){t.mass=0,I.MidVV(this.m_vertex1,this.m_vertex2,t.center),t.I=0},i.prototype.SetupDistanceProxy=function(t){t.m_vertices=t.m_buffer,t.m_vertices[0].Copy(this.m_vertex1),t.m_vertices[1].Copy(this.m_vertex2),t.m_count=2,t.m_radius=this.m_radius},i.prototype.ComputeSubmergedArea=function(t,e,i,n){return n.SetZero(),0},i.prototype.Dump=function(t){t(" const shape: b2EdgeShape = new b2EdgeShape();\n"),t(" shape.m_radius = %.15f;\n",this.m_radius),t(" shape.m_vertex0.Set(%.15f, %.15f);\n",this.m_vertex0.x,this.m_vertex0.y),t(" shape.m_vertex1.Set(%.15f, %.15f);\n",this.m_vertex1.x,this.m_vertex1.y),t(" shape.m_vertex2.Set(%.15f, %.15f);\n",this.m_vertex2.x,this.m_vertex2.y),t(" shape.m_vertex3.Set(%.15f, %.15f);\n",this.m_vertex3.x,this.m_vertex3.y),t(" shape.m_hasVertex0 = %s;\n",this.m_hasVertex0),t(" shape.m_hasVertex3 = %s;\n",this.m_hasVertex3)},i.ComputeDistance_s_v1=new I,i.ComputeDistance_s_v2=new I,i.ComputeDistance_s_d=new I,i.ComputeDistance_s_s=new I,i.RayCast_s_p1=new I,i.RayCast_s_p2=new I,i.RayCast_s_d=new I,i.RayCast_s_e=new I,i.RayCast_s_q=new I,i.RayCast_s_r=new I,i.ComputeAABB_s_v1=new I,i.ComputeAABB_s_v2=new I,i})(Qe),si=(function(e){function i(){var i=e.call(this,t.b2ShapeType.e_chainShape,h)||this;return i.m_vertices=[],i.m_count=0,i.m_prevVertex=new I,i.m_nextVertex=new I,i.m_hasPrevVertex=!1,i.m_hasNextVertex=!1,i}return ti(i,e),i.prototype.CreateLoop=function(t,e,i){if(void 0===e&&(e=t.length),void 0===i&&(i=0),e<3)return this;this.m_count=e+1,this.m_vertices=I.MakeArray(this.m_count);for(var n=0;n0?(e.m_vertex0.Copy(this.m_vertices[i-1]),e.m_hasVertex0=!0):(e.m_vertex0.Copy(this.m_prevVertex),e.m_hasVertex0=this.m_hasPrevVertex),i0&&this.ResetMassData(),this.m_world.m_newFixture=!0,e},i.prototype.CreateFixtureShapeDensity=function(t,e){void 0===e&&(e=0);var n=i.CreateFixtureShapeDensity_s_def;return n.shape=t,n.density=e,this.CreateFixtureDef(n)},i.prototype.DestroyFixture=function(t){if(this.m_world.IsLocked())throw new Error;for(var e=this.m_fixtureList,i=null;null!==e;){if(e===t){i?i.m_next=t.m_next:this.m_fixtureList=t.m_next;break}i=e,e=e.m_next}for(var n=this.m_contactList;n;){var r=n.contact;n=n.next;var s=r.GetFixtureA(),a=r.GetFixtureB();t!==s&&t!==a||this.m_world.m_contactManager.Destroy(r)}this.m_activeFlag&&t.DestroyProxies(),t.m_next=null,t.Destroy(),--this.m_fixtureCount,this.ResetMassData()},i.prototype.SetTransformVec=function(t,e){this.SetTransformXY(t.x,t.y,e)},i.prototype.SetTransformXY=function(t,e,i){if(this.m_world.IsLocked())throw new Error;this.m_xf.q.SetAngle(i),this.m_xf.p.Set(t,e),this.m_xf0.Copy(this.m_xf),V.MulXV(this.m_xf,this.m_sweep.localCenter,this.m_sweep.c),this.m_sweep.a=i,this.m_sweep.c0.Copy(this.m_sweep.c),this.m_sweep.a0=i;for(var n=this.m_fixtureList;n;n=n.m_next)n.Synchronize(this.m_xf,this.m_xf);this.m_world.m_contactManager.FindNewContacts()},i.prototype.SetTransform=function(t){this.SetTransformVec(t.p,t.GetAngle())},i.prototype.GetTransform=function(){return this.m_xf},i.prototype.GetPosition=function(){return this.m_xf.p},i.prototype.SetPosition=function(t){this.SetTransformVec(t,this.GetAngle())},i.prototype.SetPositionXY=function(t,e){this.SetTransformXY(t,e,this.GetAngle())},i.prototype.GetAngle=function(){return this.m_sweep.a},i.prototype.SetAngle=function(t){this.SetTransformVec(this.GetPosition(),t)},i.prototype.GetWorldCenter=function(){return this.m_sweep.c},i.prototype.GetLocalCenter=function(){return this.m_sweep.localCenter},i.prototype.SetLinearVelocity=function(e){this.m_type!==t.b2BodyType.b2_staticBody&&(I.DotVV(e,e)>0&&this.SetAwake(!0),this.m_linearVelocity.Copy(e))},i.prototype.GetLinearVelocity=function(){return this.m_linearVelocity},i.prototype.SetAngularVelocity=function(e){this.m_type!==t.b2BodyType.b2_staticBody&&(e*e>0&&this.SetAwake(!0),this.m_angularVelocity=e)},i.prototype.GetAngularVelocity=function(){return this.m_angularVelocity},i.prototype.GetDefinition=function(t){return t.type=this.GetType(),t.allowSleep=this.m_autoSleepFlag,t.angle=this.GetAngle(),t.angularDamping=this.m_angularDamping,t.gravityScale=this.m_gravityScale,t.angularVelocity=this.m_angularVelocity,t.fixedRotation=this.m_fixedRotationFlag,t.bullet=this.m_bulletFlag,t.awake=this.m_awakeFlag,t.linearDamping=this.m_linearDamping,t.linearVelocity.Copy(this.GetLinearVelocity()),t.position.Copy(this.GetPosition()),t.userData=this.GetUserData(),t},i.prototype.ApplyForce=function(e,i,n){void 0===n&&(n=!0),this.m_type===t.b2BodyType.b2_dynamicBody&&(n&&!this.m_awakeFlag&&this.SetAwake(!0),this.m_awakeFlag&&(this.m_force.x+=e.x,this.m_force.y+=e.y,this.m_torque+=(i.x-this.m_sweep.c.x)*e.y-(i.y-this.m_sweep.c.y)*e.x))},i.prototype.ApplyForceToCenter=function(e,i){void 0===i&&(i=!0),this.m_type===t.b2BodyType.b2_dynamicBody&&(i&&!this.m_awakeFlag&&this.SetAwake(!0),this.m_awakeFlag&&(this.m_force.x+=e.x,this.m_force.y+=e.y))},i.prototype.ApplyTorque=function(e,i){void 0===i&&(i=!0),this.m_type===t.b2BodyType.b2_dynamicBody&&(i&&!this.m_awakeFlag&&this.SetAwake(!0),this.m_awakeFlag&&(this.m_torque+=e))},i.prototype.ApplyLinearImpulse=function(e,i,n){void 0===n&&(n=!0),this.m_type===t.b2BodyType.b2_dynamicBody&&(n&&!this.m_awakeFlag&&this.SetAwake(!0),this.m_awakeFlag&&(this.m_linearVelocity.x+=this.m_invMass*e.x,this.m_linearVelocity.y+=this.m_invMass*e.y,this.m_angularVelocity+=this.m_invI*((i.x-this.m_sweep.c.x)*e.y-(i.y-this.m_sweep.c.y)*e.x)))},i.prototype.ApplyLinearImpulseToCenter=function(e,i){void 0===i&&(i=!0),this.m_type===t.b2BodyType.b2_dynamicBody&&(i&&!this.m_awakeFlag&&this.SetAwake(!0),this.m_awakeFlag&&(this.m_linearVelocity.x+=this.m_invMass*e.x,this.m_linearVelocity.y+=this.m_invMass*e.y))},i.prototype.ApplyAngularImpulse=function(e,i){void 0===i&&(i=!0),this.m_type===t.b2BodyType.b2_dynamicBody&&(i&&!this.m_awakeFlag&&this.SetAwake(!0),this.m_awakeFlag&&(this.m_angularVelocity+=this.m_invI*e))},i.prototype.GetMass=function(){return this.m_mass},i.prototype.GetInertia=function(){return this.m_I+this.m_mass*I.DotVV(this.m_sweep.localCenter,this.m_sweep.localCenter)},i.prototype.GetMassData=function(t){return t.mass=this.m_mass,t.I=this.m_I+this.m_mass*I.DotVV(this.m_sweep.localCenter,this.m_sweep.localCenter),t.center.Copy(this.m_sweep.localCenter),t},i.prototype.SetMassData=function(e){if(this.m_world.IsLocked())throw new Error;if(this.m_type===t.b2BodyType.b2_dynamicBody){this.m_invMass=0,this.m_I=0,this.m_invI=0,this.m_mass=e.mass,this.m_mass<=0&&(this.m_mass=1),this.m_invMass=1/this.m_mass,e.I>0&&!this.m_fixedRotationFlag&&(this.m_I=e.I-this.m_mass*I.DotVV(e.center,e.center),this.m_invI=1/this.m_I);var n=i.SetMassData_s_oldCenter.Copy(this.m_sweep.c);this.m_sweep.localCenter.Copy(e.center),V.MulXV(this.m_xf,this.m_sweep.localCenter,this.m_sweep.c),this.m_sweep.c0.Copy(this.m_sweep.c),I.AddVCrossSV(this.m_linearVelocity,this.m_angularVelocity,I.SubVV(this.m_sweep.c,n,I.s_t0),this.m_linearVelocity)}},i.prototype.ResetMassData=function(){if(this.m_mass=0,this.m_invMass=0,this.m_I=0,this.m_invI=0,this.m_sweep.localCenter.SetZero(),this.m_type===t.b2BodyType.b2_staticBody||this.m_type===t.b2BodyType.b2_kinematicBody)return this.m_sweep.c0.Copy(this.m_xf.p),this.m_sweep.c.Copy(this.m_xf.p),void(this.m_sweep.a0=this.m_sweep.a);for(var e=i.ResetMassData_s_localCenter.SetZero(),n=this.m_fixtureList;n;n=n.m_next)if(0!==n.m_density){var r=n.GetMassData(i.ResetMassData_s_massData);this.m_mass+=r.mass,e.x+=r.center.x*r.mass,e.y+=r.center.y*r.mass,this.m_I+=r.I}this.m_mass>0?(this.m_invMass=1/this.m_mass,e.x*=this.m_invMass,e.y*=this.m_invMass):(this.m_mass=1,this.m_invMass=1),this.m_I>0&&!this.m_fixedRotationFlag?(this.m_I-=this.m_mass*I.DotVV(e,e),this.m_invI=1/this.m_I):(this.m_I=0,this.m_invI=0);var s=i.ResetMassData_s_oldCenter.Copy(this.m_sweep.c);this.m_sweep.localCenter.Copy(e),V.MulXV(this.m_xf,this.m_sweep.localCenter,this.m_sweep.c),this.m_sweep.c0.Copy(this.m_sweep.c),I.AddVCrossSV(this.m_linearVelocity,this.m_angularVelocity,I.SubVV(this.m_sweep.c,s,I.s_t0),this.m_linearVelocity)},i.prototype.GetWorldPoint=function(t,e){return V.MulXV(this.m_xf,t,e)},i.prototype.GetWorldVector=function(t,e){return F.MulRV(this.m_xf.q,t,e)},i.prototype.GetLocalPoint=function(t,e){return V.MulTXV(this.m_xf,t,e)},i.prototype.GetLocalVector=function(t,e){return F.MulTRV(this.m_xf.q,t,e)},i.prototype.GetLinearVelocityFromWorldPoint=function(t,e){return I.AddVCrossSV(this.m_linearVelocity,this.m_angularVelocity,I.SubVV(t,this.m_sweep.c,I.s_t0),e)},i.prototype.GetLinearVelocityFromLocalPoint=function(t,e){return this.GetLinearVelocityFromWorldPoint(this.GetWorldPoint(t,e),e)},i.prototype.GetLinearDamping=function(){return this.m_linearDamping},i.prototype.SetLinearDamping=function(t){this.m_linearDamping=t},i.prototype.GetAngularDamping=function(){return this.m_angularDamping},i.prototype.SetAngularDamping=function(t){this.m_angularDamping=t},i.prototype.GetGravityScale=function(){return this.m_gravityScale},i.prototype.SetGravityScale=function(t){this.m_gravityScale=t},i.prototype.SetType=function(e){if(this.m_world.IsLocked())throw new Error;if(this.m_type!==e){this.m_type=e,this.ResetMassData(),this.m_type===t.b2BodyType.b2_staticBody&&(this.m_linearVelocity.SetZero(),this.m_angularVelocity=0,this.m_sweep.a0=this.m_sweep.a,this.m_sweep.c0.Copy(this.m_sweep.c),this.SynchronizeFixtures()),this.SetAwake(!0),this.m_force.SetZero(),this.m_torque=0;for(var i=this.m_contactList;i;){var n=i;i=i.next,this.m_world.m_contactManager.Destroy(n.contact)}this.m_contactList=null;for(var r=this.m_fixtureList;r;r=r.m_next)r.TouchProxies()}},i.prototype.GetType=function(){return this.m_type},i.prototype.SetBullet=function(t){this.m_bulletFlag=t},i.prototype.IsBullet=function(){return this.m_bulletFlag},i.prototype.SetSleepingAllowed=function(t){this.m_autoSleepFlag=t,t||this.SetAwake(!0)},i.prototype.IsSleepingAllowed=function(){return this.m_autoSleepFlag},i.prototype.SetAwake=function(t){t?(this.m_awakeFlag=!0,this.m_sleepTime=0):(this.m_awakeFlag=!1,this.m_sleepTime=0,this.m_linearVelocity.SetZero(),this.m_angularVelocity=0,this.m_force.SetZero(),this.m_torque=0)},i.prototype.IsAwake=function(){return this.m_awakeFlag},i.prototype.SetActive=function(t){if(this.m_world.IsLocked())throw new Error;if(t!==this.IsActive())if(this.m_activeFlag=t,t)for(var e=this.m_fixtureList;e;e=e.m_next)e.CreateProxies(this.m_xf);else{for(e=this.m_fixtureList;e;e=e.m_next)e.DestroyProxies();for(var i=this.m_contactList;i;){var n=i;i=i.next,this.m_world.m_contactManager.Destroy(n.contact)}this.m_contactList=null}},i.prototype.IsActive=function(){return this.m_activeFlag},i.prototype.SetFixedRotation=function(t){this.m_fixedRotationFlag!==t&&(this.m_fixedRotationFlag=t,this.m_angularVelocity=0,this.ResetMassData())},i.prototype.IsFixedRotation=function(){return this.m_fixedRotationFlag},i.prototype.GetFixtureList=function(){return this.m_fixtureList},i.prototype.GetJointList=function(){return this.m_jointList},i.prototype.GetContactList=function(){return this.m_contactList},i.prototype.GetNext=function(){return this.m_next},i.prototype.GetUserData=function(){return this.m_userData},i.prototype.SetUserData=function(t){this.m_userData=t},i.prototype.GetWorld=function(){return this.m_world},i.prototype.Dump=function(e){var i=this.m_islandIndex;e("{\n"),e(" const bd: b2BodyDef = new b2BodyDef();\n");var n="";switch(this.m_type){case t.b2BodyType.b2_staticBody:n="b2BodyType.b2_staticBody";break;case t.b2BodyType.b2_kinematicBody:n="b2BodyType.b2_kinematicBody";break;case t.b2BodyType.b2_dynamicBody:n="b2BodyType.b2_dynamicBody"}e(" bd.type = %s;\n",n),e(" bd.position.Set(%.15f, %.15f);\n",this.m_xf.p.x,this.m_xf.p.y),e(" bd.angle = %.15f;\n",this.m_sweep.a),e(" bd.linearVelocity.Set(%.15f, %.15f);\n",this.m_linearVelocity.x,this.m_linearVelocity.y),e(" bd.angularVelocity = %.15f;\n",this.m_angularVelocity),e(" bd.linearDamping = %.15f;\n",this.m_linearDamping),e(" bd.angularDamping = %.15f;\n",this.m_angularDamping),e(" bd.allowSleep = %s;\n",this.m_autoSleepFlag?"true":"false"),e(" bd.awake = %s;\n",this.m_awakeFlag?"true":"false"),e(" bd.fixedRotation = %s;\n",this.m_fixedRotationFlag?"true":"false"),e(" bd.bullet = %s;\n",this.m_bulletFlag?"true":"false"),e(" bd.active = %s;\n",this.m_activeFlag?"true":"false"),e(" bd.gravityScale = %.15f;\n",this.m_gravityScale),e("\n"),e(" bodies[%d] = this.m_world.CreateBody(bd);\n",this.m_islandIndex),e("\n");for(var r=this.m_fixtureList;r;r=r.m_next)e(" {\n"),r.Dump(e,i),e(" }\n");e("}\n")},i.prototype.SynchronizeFixtures=function(){var t=i.SynchronizeFixtures_s_xf1;t.q.SetAngle(this.m_sweep.a0),F.MulRV(t.q,this.m_sweep.localCenter,t.p),I.SubVV(this.m_sweep.c0,t.p,t.p);for(var e=this.m_fixtureList;e;e=e.m_next)e.Synchronize(t,this.m_xf)},i.prototype.SynchronizeTransform=function(){this.m_xf.q.SetAngle(this.m_sweep.a),F.MulRV(this.m_xf.q,this.m_sweep.localCenter,this.m_xf.p),I.SubVV(this.m_sweep.c,this.m_xf.p,this.m_xf.p)},i.prototype.ShouldCollide=function(e){return(this.m_type!==t.b2BodyType.b2_staticBody||e.m_type!==t.b2BodyType.b2_staticBody)&&this.ShouldCollideConnected(e)},i.prototype.ShouldCollideConnected=function(t){for(var e=this.m_jointList;e;e=e.next)if(e.other===t&&!e.joint.m_collideConnected)return!1;return!0},i.prototype.Advance=function(t){this.m_sweep.Advance(t),this.m_sweep.c.Copy(this.m_sweep.c0),this.m_sweep.a=this.m_sweep.a0,this.m_xf.q.SetAngle(this.m_sweep.a),F.MulRV(this.m_xf.q,this.m_sweep.localCenter,this.m_xf.p),I.SubVV(this.m_sweep.c,this.m_xf.p,this.m_xf.p)},i.prototype.GetControllerList=function(){return this.m_controllerList},i.prototype.GetControllerCount=function(){return this.m_controllerCount},i.CreateFixtureShapeDensity_s_def=new oi,i.SetMassData_s_oldCenter=new I,i.ResetMassData_s_localCenter=new I,i.ResetMassData_s_oldCenter=new I,i.ResetMassData_s_massData=new Ke,i.SynchronizeFixtures_s_xf1=new V,i})();(hi=t.b2JointType||(t.b2JointType={}))[hi.e_unknownJoint=0]="e_unknownJoint",hi[hi.e_revoluteJoint=1]="e_revoluteJoint",hi[hi.e_prismaticJoint=2]="e_prismaticJoint",hi[hi.e_distanceJoint=3]="e_distanceJoint",hi[hi.e_pulleyJoint=4]="e_pulleyJoint",hi[hi.e_mouseJoint=5]="e_mouseJoint",hi[hi.e_gearJoint=6]="e_gearJoint",hi[hi.e_wheelJoint=7]="e_wheelJoint",hi[hi.e_weldJoint=8]="e_weldJoint",hi[hi.e_frictionJoint=9]="e_frictionJoint",hi[hi.e_ropeJoint=10]="e_ropeJoint",hi[hi.e_motorJoint=11]="e_motorJoint",hi[hi.e_areaJoint=12]="e_areaJoint",(ui=t.b2LimitState||(t.b2LimitState={}))[ui.e_inactiveLimit=0]="e_inactiveLimit",ui[ui.e_atLowerLimit=1]="e_atLowerLimit",ui[ui.e_atUpperLimit=2]="e_atUpperLimit",ui[ui.e_equalLimits=3]="e_equalLimits";var fi=(function(){function t(){this.linear=new I,this.angularA=0,this.angularB=0}return t.prototype.SetZero=function(){return this.linear.SetZero(),this.angularA=0,this.angularB=0,this},t.prototype.Set=function(t,e,i){return this.linear.Copy(t),this.angularA=e,this.angularB=i,this},t})(),di=function(t,e){this.prev=null,this.next=null,this.joint=t,this.other=e},pi=function(e){this.type=t.b2JointType.e_unknownJoint,this.userData=null,this.collideConnected=!1,this.type=e},mi=(function(){function i(i){this.m_type=t.b2JointType.e_unknownJoint,this.m_prev=null,this.m_next=null,this.m_index=0,this.m_islandFlag=!1,this.m_collideConnected=!1,this.m_userData=null,this.m_type=i.type,this.m_edgeA=new di(this,i.bodyB),this.m_edgeB=new di(this,i.bodyA),this.m_bodyA=i.bodyA,this.m_bodyB=i.bodyB,this.m_collideConnected=e(i.collideConnected,!1),this.m_userData=i.userData}return i.prototype.GetType=function(){return this.m_type},i.prototype.GetBodyA=function(){return this.m_bodyA},i.prototype.GetBodyB=function(){return this.m_bodyB},i.prototype.GetNext=function(){return this.m_next},i.prototype.GetUserData=function(){return this.m_userData},i.prototype.SetUserData=function(t){this.m_userData=t},i.prototype.IsActive=function(){return this.m_bodyA.IsActive()&&this.m_bodyB.IsActive()},i.prototype.GetCollideConnected=function(){return this.m_collideConnected},i.prototype.Dump=function(t){t("// Dump is not supported for this joint type.\n")},i.prototype.ShiftOrigin=function(){},i})(),yi=(function(e){function i(){var i=e.call(this,t.b2JointType.e_distanceJoint)||this;return i.localAnchorA=new I,i.localAnchorB=new I,i.length=1,i.frequencyHz=0,i.dampingRatio=0,i}return ti(i,e),i.prototype.Initialize=function(t,e,i,n){this.bodyA=t,this.bodyB=e,this.bodyA.GetLocalPoint(i,this.localAnchorA),this.bodyB.GetLocalPoint(n,this.localAnchorB),this.length=I.DistanceVV(i,n),this.frequencyHz=0,this.dampingRatio=0},i})(pi),vi=(function(t){function i(i){var n=t.call(this,i)||this;return n.m_frequencyHz=0,n.m_dampingRatio=0,n.m_bias=0,n.m_localAnchorA=new I,n.m_localAnchorB=new I,n.m_gamma=0,n.m_impulse=0,n.m_length=0,n.m_indexA=0,n.m_indexB=0,n.m_u=new I,n.m_rA=new I,n.m_rB=new I,n.m_localCenterA=new I,n.m_localCenterB=new I,n.m_invMassA=0,n.m_invMassB=0,n.m_invIA=0,n.m_invIB=0,n.m_mass=0,n.m_qA=new F,n.m_qB=new F,n.m_lalcA=new I,n.m_lalcB=new I,n.m_frequencyHz=e(i.frequencyHz,0),n.m_dampingRatio=e(i.dampingRatio,0),n.m_localAnchorA.Copy(i.localAnchorA),n.m_localAnchorB.Copy(i.localAnchorB),n.m_length=i.length,n}return ti(i,t),i.prototype.GetAnchorA=function(t){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,t)},i.prototype.GetAnchorB=function(t){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,t)},i.prototype.GetReactionForce=function(t,e){return e.x=t*this.m_impulse*this.m_u.x,e.y=t*this.m_impulse*this.m_u.y,e},i.prototype.GetReactionTorque=function(){return 0},i.prototype.GetLocalAnchorA=function(){return this.m_localAnchorA},i.prototype.GetLocalAnchorB=function(){return this.m_localAnchorB},i.prototype.SetLength=function(t){this.m_length=t},i.prototype.Length=function(){return this.m_length},i.prototype.SetFrequency=function(t){this.m_frequencyHz=t},i.prototype.GetFrequency=function(){return this.m_frequencyHz},i.prototype.SetDampingRatio=function(t){this.m_dampingRatio=t},i.prototype.GetDampingRatio=function(){return this.m_dampingRatio},i.prototype.Dump=function(t){var e=this.m_bodyA.m_islandIndex,i=this.m_bodyB.m_islandIndex;t(" const jd: b2DistanceJointDef = new b2DistanceJointDef();\n"),t(" jd.bodyA = bodies[%d];\n",e),t(" jd.bodyB = bodies[%d];\n",i),t(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),t(" jd.localAnchorA.Set(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),t(" jd.localAnchorB.Set(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),t(" jd.length = %.15f;\n",this.m_length),t(" jd.frequencyHz = %.15f;\n",this.m_frequencyHz),t(" jd.dampingRatio = %.15f;\n",this.m_dampingRatio),t(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)},i.prototype.InitVelocityConstraints=function(t){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var e=t.positions[this.m_indexA].c,n=t.positions[this.m_indexA].a,r=t.velocities[this.m_indexA].v,a=t.velocities[this.m_indexA].w,o=t.positions[this.m_indexB].c,c=t.positions[this.m_indexB].a,h=t.velocities[this.m_indexB].v,u=t.velocities[this.m_indexB].w,_=this.m_qA.SetAngle(n),f=this.m_qB.SetAngle(c);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),F.MulRV(_,this.m_lalcA,this.m_rA),I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),F.MulRV(f,this.m_lalcB,this.m_rB),this.m_u.x=o.x+this.m_rB.x-e.x-this.m_rA.x,this.m_u.y=o.y+this.m_rB.y-e.y-this.m_rA.y;var d=this.m_u.Length();d>l?this.m_u.SelfMul(1/d):this.m_u.SetZero();var p=I.CrossVV(this.m_rA,this.m_u),m=I.CrossVV(this.m_rB,this.m_u),y=this.m_invMassA+this.m_invIA*p*p+this.m_invMassB+this.m_invIB*m*m;if(this.m_mass=0!==y?1/y:0,this.m_frequencyHz>0){var v=d-this.m_length,g=2*s*this.m_frequencyHz,b=2*this.m_mass*this.m_dampingRatio*g,A=this.m_mass*g*g,x=t.step.dt;this.m_gamma=x*(b+x*A),this.m_gamma=0!==this.m_gamma?1/this.m_gamma:0,this.m_bias=v*x*A*this.m_gamma,y+=this.m_gamma,this.m_mass=0!==y?1/y:0}else this.m_gamma=0,this.m_bias=0;if(t.step.warmStarting){this.m_impulse*=t.step.dtRatio;var C=I.MulSV(this.m_impulse,this.m_u,i.InitVelocityConstraints_s_P);r.SelfMulSub(this.m_invMassA,C),a-=this.m_invIA*I.CrossVV(this.m_rA,C),h.SelfMulAdd(this.m_invMassB,C),u+=this.m_invIB*I.CrossVV(this.m_rB,C)}else this.m_impulse=0;t.velocities[this.m_indexA].w=a,t.velocities[this.m_indexB].w=u},i.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexA].v,n=t.velocities[this.m_indexA].w,r=t.velocities[this.m_indexB].v,s=t.velocities[this.m_indexB].w,a=I.AddVCrossSV(e,n,this.m_rA,i.SolveVelocityConstraints_s_vpA),o=I.AddVCrossSV(r,s,this.m_rB,i.SolveVelocityConstraints_s_vpB),l=I.DotVV(this.m_u,I.SubVV(o,a,I.s_t0)),c=-this.m_mass*(l+this.m_bias+this.m_gamma*this.m_impulse);this.m_impulse+=c;var h=I.MulSV(c,this.m_u,i.SolveVelocityConstraints_s_P);e.SelfMulSub(this.m_invMassA,h),n-=this.m_invIA*I.CrossVV(this.m_rA,h),r.SelfMulAdd(this.m_invMassB,h),s+=this.m_invIB*I.CrossVV(this.m_rB,h),t.velocities[this.m_indexA].w=n,t.velocities[this.m_indexB].w=s},i.prototype.SolvePositionConstraints=function(t){if(this.m_frequencyHz>0)return!0;var e=t.positions[this.m_indexA].c,n=t.positions[this.m_indexA].a,r=t.positions[this.m_indexB].c,s=t.positions[this.m_indexB].a,a=this.m_qA.SetAngle(n),o=this.m_qB.SetAngle(s),c=F.MulRV(a,this.m_lalcA,this.m_rA),h=F.MulRV(o,this.m_lalcB,this.m_rB),u=this.m_u;u.x=r.x+h.x-e.x-c.x,u.y=r.y+h.y-e.y-c.y;var _=this.m_u.Normalize()-this.m_length;_=g(_,-.2,.2);var f=-this.m_mass*_,d=I.MulSV(f,u,i.SolvePositionConstraints_s_P);return e.SelfMulSub(this.m_invMassA,d),n-=this.m_invIA*I.CrossVV(c,d),r.SelfMulAdd(this.m_invMassB,d),s+=this.m_invIB*I.CrossVV(h,d),t.positions[this.m_indexA].a=n,t.positions[this.m_indexB].a=s,m(_)A(.2)&&f.SelfMul(.2/T(p)),p>A(l)&&(_=!1),o.x+=f.x,o.y+=f.y}return _},i})(mi),Ai=(function(e){function i(){var i=e.call(this,t.b2JointType.e_frictionJoint)||this;return i.localAnchorA=new I,i.localAnchorB=new I,i.maxForce=0,i.maxTorque=0,i}return ti(i,e),i.prototype.Initialize=function(t,e,i){this.bodyA=t,this.bodyB=e,this.bodyA.GetLocalPoint(i,this.localAnchorA),this.bodyB.GetLocalPoint(i,this.localAnchorB)},i})(pi),xi=(function(t){function i(i){var n=t.call(this,i)||this;return n.m_localAnchorA=new I,n.m_localAnchorB=new I,n.m_linearImpulse=new I,n.m_angularImpulse=0,n.m_maxForce=0,n.m_maxTorque=0,n.m_indexA=0,n.m_indexB=0,n.m_rA=new I,n.m_rB=new I,n.m_localCenterA=new I,n.m_localCenterB=new I,n.m_invMassA=0,n.m_invMassB=0,n.m_invIA=0,n.m_invIB=0,n.m_linearMass=new O,n.m_angularMass=0,n.m_qA=new F,n.m_qB=new F,n.m_lalcA=new I,n.m_lalcB=new I,n.m_K=new O,n.m_localAnchorA.Copy(i.localAnchorA),n.m_localAnchorB.Copy(i.localAnchorB),n.m_linearImpulse.SetZero(),n.m_maxForce=e(i.maxForce,0),n.m_maxTorque=e(i.maxTorque,0),n.m_linearMass.SetZero(),n}return ti(i,t),i.prototype.InitVelocityConstraints=function(t){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var e=t.positions[this.m_indexA].a,i=t.velocities[this.m_indexA].v,n=t.velocities[this.m_indexA].w,r=t.positions[this.m_indexB].a,s=t.velocities[this.m_indexB].v,a=t.velocities[this.m_indexB].w,o=this.m_qA.SetAngle(e),l=this.m_qB.SetAngle(r);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var c=F.MulRV(o,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var h=F.MulRV(l,this.m_lalcB,this.m_rB),u=this.m_invMassA,_=this.m_invMassB,f=this.m_invIA,d=this.m_invIB,p=this.m_K;if(p.ex.x=u+_+f*c.y*c.y+d*h.y*h.y,p.ex.y=-f*c.x*c.y-d*h.x*h.y,p.ey.x=p.ex.y,p.ey.y=u+_+f*c.x*c.x+d*h.x*h.x,p.GetInverse(this.m_linearMass),this.m_angularMass=f+d,this.m_angularMass>0&&(this.m_angularMass=1/this.m_angularMass),t.step.warmStarting){this.m_linearImpulse.SelfMul(t.step.dtRatio),this.m_angularImpulse*=t.step.dtRatio;var m=this.m_linearImpulse;i.SelfMulSub(u,m),n-=f*(I.CrossVV(this.m_rA,m)+this.m_angularImpulse),s.SelfMulAdd(_,m),a+=d*(I.CrossVV(this.m_rB,m)+this.m_angularImpulse)}else this.m_linearImpulse.SetZero(),this.m_angularImpulse=0;t.velocities[this.m_indexA].w=n,t.velocities[this.m_indexB].w=a},i.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexA].v,n=t.velocities[this.m_indexA].w,r=t.velocities[this.m_indexB].v,s=t.velocities[this.m_indexB].w,a=this.m_invMassA,o=this.m_invMassB,l=this.m_invIA,c=this.m_invIB,h=t.step.dt,u=s-n,_=-this.m_angularMass*u,f=this.m_angularImpulse,d=h*this.m_maxTorque;this.m_angularImpulse=g(this.m_angularImpulse+_,-d,d),n-=l*(_=this.m_angularImpulse-f),s+=c*_;var p=I.SubVV(I.AddVCrossSV(r,s,this.m_rB,I.s_t0),I.AddVCrossSV(e,n,this.m_rA,I.s_t1),i.SolveVelocityConstraints_s_Cdot_v2),m=O.MulMV(this.m_linearMass,p,i.SolveVelocityConstraints_s_impulseV).SelfNeg(),y=i.SolveVelocityConstraints_s_oldImpulseV.Copy(this.m_linearImpulse);this.m_linearImpulse.SelfAdd(m),d=h*this.m_maxForce,this.m_linearImpulse.LengthSquared()>d*d&&(this.m_linearImpulse.Normalize(),this.m_linearImpulse.SelfMul(d)),I.SubVV(this.m_linearImpulse,y,m),e.SelfMulSub(a,m),n-=l*I.CrossVV(this.m_rA,m),r.SelfMulAdd(o,m),s+=c*I.CrossVV(this.m_rB,m),t.velocities[this.m_indexA].w=n,t.velocities[this.m_indexB].w=s},i.prototype.SolvePositionConstraints=function(){return!0},i.prototype.GetAnchorA=function(t){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,t)},i.prototype.GetAnchorB=function(t){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,t)},i.prototype.GetReactionForce=function(t,e){return e.x=t*this.m_linearImpulse.x,e.y=t*this.m_linearImpulse.y,e},i.prototype.GetReactionTorque=function(t){return t*this.m_angularImpulse},i.prototype.GetLocalAnchorA=function(){return this.m_localAnchorA},i.prototype.GetLocalAnchorB=function(){return this.m_localAnchorB},i.prototype.SetMaxForce=function(t){this.m_maxForce=t},i.prototype.GetMaxForce=function(){return this.m_maxForce},i.prototype.SetMaxTorque=function(t){this.m_maxTorque=t},i.prototype.GetMaxTorque=function(){return this.m_maxTorque},i.prototype.Dump=function(t){var e=this.m_bodyA.m_islandIndex,i=this.m_bodyB.m_islandIndex;t(" const jd: b2FrictionJointDef = new b2FrictionJointDef();\n"),t(" jd.bodyA = bodies[%d];\n",e),t(" jd.bodyB = bodies[%d];\n",i),t(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),t(" jd.localAnchorA.Set(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),t(" jd.localAnchorB.Set(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),t(" jd.maxForce = %.15f;\n",this.m_maxForce),t(" jd.maxTorque = %.15f;\n",this.m_maxTorque),t(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)},i.SolveVelocityConstraints_s_Cdot_v2=new I,i.SolveVelocityConstraints_s_impulseV=new I,i.SolveVelocityConstraints_s_oldImpulseV=new I,i})(mi),Ci=(function(e){function i(){var i=e.call(this,t.b2JointType.e_gearJoint)||this;return i.ratio=1,i}return ti(i,e),i})(pi),Ti=(function(i){function n(n){var r,s,a=i.call(this,n)||this;a.m_typeA=t.b2JointType.e_unknownJoint,a.m_typeB=t.b2JointType.e_unknownJoint,a.m_localAnchorA=new I,a.m_localAnchorB=new I,a.m_localAnchorC=new I,a.m_localAnchorD=new I,a.m_localAxisC=new I,a.m_localAxisD=new I,a.m_referenceAngleA=0,a.m_referenceAngleB=0,a.m_constant=0,a.m_ratio=0,a.m_impulse=0,a.m_indexA=0,a.m_indexB=0,a.m_indexC=0,a.m_indexD=0,a.m_lcA=new I,a.m_lcB=new I,a.m_lcC=new I,a.m_lcD=new I,a.m_mA=0,a.m_mB=0,a.m_mC=0,a.m_mD=0,a.m_iA=0,a.m_iB=0,a.m_iC=0,a.m_iD=0,a.m_JvAC=new I,a.m_JvBD=new I,a.m_JwA=0,a.m_JwB=0,a.m_JwC=0,a.m_JwD=0,a.m_mass=0,a.m_qA=new F,a.m_qB=new F,a.m_qC=new F,a.m_qD=new F,a.m_lalcA=new I,a.m_lalcB=new I,a.m_lalcC=new I,a.m_lalcD=new I,a.m_joint1=n.joint1,a.m_joint2=n.joint2,a.m_typeA=a.m_joint1.GetType(),a.m_typeB=a.m_joint2.GetType(),a.m_bodyC=a.m_joint1.GetBodyA(),a.m_bodyA=a.m_joint1.GetBodyB();var o=a.m_bodyA.m_xf,l=a.m_bodyA.m_sweep.a,c=a.m_bodyC.m_xf,h=a.m_bodyC.m_sweep.a;if(a.m_typeA===t.b2JointType.e_revoluteJoint){var u=n.joint1;a.m_localAnchorC.Copy(u.m_localAnchorA),a.m_localAnchorA.Copy(u.m_localAnchorB),a.m_referenceAngleA=u.m_referenceAngle,a.m_localAxisC.SetZero(),r=l-h-a.m_referenceAngleA}else{var _=n.joint1;a.m_localAnchorC.Copy(_.m_localAnchorA),a.m_localAnchorA.Copy(_.m_localAnchorB),a.m_referenceAngleA=_.m_referenceAngle,a.m_localAxisC.Copy(_.m_localXAxisA);var f=a.m_localAnchorC,d=F.MulTRV(c.q,I.AddVV(F.MulRV(o.q,a.m_localAnchorA,I.s_t0),I.SubVV(o.p,c.p,I.s_t1),I.s_t0),I.s_t0);r=I.DotVV(I.SubVV(d,f,I.s_t0),a.m_localAxisC)}a.m_bodyD=a.m_joint2.GetBodyA(),a.m_bodyB=a.m_joint2.GetBodyB();var p=a.m_bodyB.m_xf,m=a.m_bodyB.m_sweep.a,y=a.m_bodyD.m_xf,v=a.m_bodyD.m_sweep.a;if(a.m_typeB===t.b2JointType.e_revoluteJoint)u=n.joint2,a.m_localAnchorD.Copy(u.m_localAnchorA),a.m_localAnchorB.Copy(u.m_localAnchorB),a.m_referenceAngleB=u.m_referenceAngle,a.m_localAxisD.SetZero(),s=m-v-a.m_referenceAngleB;else{_=n.joint2,a.m_localAnchorD.Copy(_.m_localAnchorA),a.m_localAnchorB.Copy(_.m_localAnchorB),a.m_referenceAngleB=_.m_referenceAngle,a.m_localAxisD.Copy(_.m_localXAxisA);var g=a.m_localAnchorD,b=F.MulTRV(y.q,I.AddVV(F.MulRV(p.q,a.m_localAnchorB,I.s_t0),I.SubVV(p.p,y.p,I.s_t1),I.s_t0),I.s_t0);s=I.DotVV(I.SubVV(b,g,I.s_t0),a.m_localAxisD)}return a.m_ratio=e(n.ratio,1),a.m_constant=r+a.m_ratio*s,a.m_impulse=0,a}return ti(n,i),n.prototype.InitVelocityConstraints=function(e){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_indexC=this.m_bodyC.m_islandIndex,this.m_indexD=this.m_bodyD.m_islandIndex,this.m_lcA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_lcB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_lcC.Copy(this.m_bodyC.m_sweep.localCenter),this.m_lcD.Copy(this.m_bodyD.m_sweep.localCenter),this.m_mA=this.m_bodyA.m_invMass,this.m_mB=this.m_bodyB.m_invMass,this.m_mC=this.m_bodyC.m_invMass,this.m_mD=this.m_bodyD.m_invMass,this.m_iA=this.m_bodyA.m_invI,this.m_iB=this.m_bodyB.m_invI,this.m_iC=this.m_bodyC.m_invI,this.m_iD=this.m_bodyD.m_invI;var i=e.positions[this.m_indexA].a,r=e.velocities[this.m_indexA].v,s=e.velocities[this.m_indexA].w,a=e.positions[this.m_indexB].a,o=e.velocities[this.m_indexB].v,l=e.velocities[this.m_indexB].w,c=e.positions[this.m_indexC].a,h=e.velocities[this.m_indexC].v,u=e.velocities[this.m_indexC].w,_=e.positions[this.m_indexD].a,f=e.velocities[this.m_indexD].v,d=e.velocities[this.m_indexD].w,p=this.m_qA.SetAngle(i),m=this.m_qB.SetAngle(a),y=this.m_qC.SetAngle(c),v=this.m_qD.SetAngle(_);if(this.m_mass=0,this.m_typeA===t.b2JointType.e_revoluteJoint)this.m_JvAC.SetZero(),this.m_JwA=1,this.m_JwC=1,this.m_mass+=this.m_iA+this.m_iC;else{var g=F.MulRV(y,this.m_localAxisC,n.InitVelocityConstraints_s_u);I.SubVV(this.m_localAnchorC,this.m_lcC,this.m_lalcC);var b=F.MulRV(y,this.m_lalcC,n.InitVelocityConstraints_s_rC);I.SubVV(this.m_localAnchorA,this.m_lcA,this.m_lalcA);var A=F.MulRV(p,this.m_lalcA,n.InitVelocityConstraints_s_rA);this.m_JvAC.Copy(g),this.m_JwC=I.CrossVV(b,g),this.m_JwA=I.CrossVV(A,g),this.m_mass+=this.m_mC+this.m_mA+this.m_iC*this.m_JwC*this.m_JwC+this.m_iA*this.m_JwA*this.m_JwA}if(this.m_typeB===t.b2JointType.e_revoluteJoint)this.m_JvBD.SetZero(),this.m_JwB=this.m_ratio,this.m_JwD=this.m_ratio,this.m_mass+=this.m_ratio*this.m_ratio*(this.m_iB+this.m_iD);else{g=F.MulRV(v,this.m_localAxisD,n.InitVelocityConstraints_s_u),I.SubVV(this.m_localAnchorD,this.m_lcD,this.m_lalcD);var x=F.MulRV(v,this.m_lalcD,n.InitVelocityConstraints_s_rD);I.SubVV(this.m_localAnchorB,this.m_lcB,this.m_lalcB);var C=F.MulRV(m,this.m_lalcB,n.InitVelocityConstraints_s_rB);I.MulSV(this.m_ratio,g,this.m_JvBD),this.m_JwD=this.m_ratio*I.CrossVV(x,g),this.m_JwB=this.m_ratio*I.CrossVV(C,g),this.m_mass+=this.m_ratio*this.m_ratio*(this.m_mD+this.m_mB)+this.m_iD*this.m_JwD*this.m_JwD+this.m_iB*this.m_JwB*this.m_JwB}this.m_mass=this.m_mass>0?1/this.m_mass:0,e.step.warmStarting?(r.SelfMulAdd(this.m_mA*this.m_impulse,this.m_JvAC),s+=this.m_iA*this.m_impulse*this.m_JwA,o.SelfMulAdd(this.m_mB*this.m_impulse,this.m_JvBD),l+=this.m_iB*this.m_impulse*this.m_JwB,h.SelfMulSub(this.m_mC*this.m_impulse,this.m_JvAC),u-=this.m_iC*this.m_impulse*this.m_JwC,f.SelfMulSub(this.m_mD*this.m_impulse,this.m_JvBD),d-=this.m_iD*this.m_impulse*this.m_JwD):this.m_impulse=0,e.velocities[this.m_indexA].w=s,e.velocities[this.m_indexB].w=l,e.velocities[this.m_indexC].w=u,e.velocities[this.m_indexD].w=d},n.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexA].v,i=t.velocities[this.m_indexA].w,n=t.velocities[this.m_indexB].v,r=t.velocities[this.m_indexB].w,s=t.velocities[this.m_indexC].v,a=t.velocities[this.m_indexC].w,o=t.velocities[this.m_indexD].v,l=t.velocities[this.m_indexD].w,c=I.DotVV(this.m_JvAC,I.SubVV(e,s,I.s_t0))+I.DotVV(this.m_JvBD,I.SubVV(n,o,I.s_t0));c+=this.m_JwA*i-this.m_JwC*a+(this.m_JwB*r-this.m_JwD*l);var h=-this.m_mass*c;this.m_impulse+=h,e.SelfMulAdd(this.m_mA*h,this.m_JvAC),i+=this.m_iA*h*this.m_JwA,n.SelfMulAdd(this.m_mB*h,this.m_JvBD),r+=this.m_iB*h*this.m_JwB,s.SelfMulSub(this.m_mC*h,this.m_JvAC),a-=this.m_iC*h*this.m_JwC,o.SelfMulSub(this.m_mD*h,this.m_JvBD),l-=this.m_iD*h*this.m_JwD,t.velocities[this.m_indexA].w=i,t.velocities[this.m_indexB].w=r,t.velocities[this.m_indexC].w=a,t.velocities[this.m_indexD].w=l},n.prototype.SolvePositionConstraints=function(e){var i,r,s,a,o,c,h=e.positions[this.m_indexA].c,u=e.positions[this.m_indexA].a,_=e.positions[this.m_indexB].c,f=e.positions[this.m_indexB].a,d=e.positions[this.m_indexC].c,p=e.positions[this.m_indexC].a,m=e.positions[this.m_indexD].c,y=e.positions[this.m_indexD].a,v=this.m_qA.SetAngle(u),g=this.m_qB.SetAngle(f),b=this.m_qC.SetAngle(p),A=this.m_qD.SetAngle(y),x=this.m_JvAC,C=this.m_JvBD,T=0;if(this.m_typeA===t.b2JointType.e_revoluteJoint)x.SetZero(),s=1,o=1,T+=this.m_iA+this.m_iC,i=u-p-this.m_referenceAngleA;else{var S=F.MulRV(b,this.m_localAxisC,n.SolvePositionConstraints_s_u),w=F.MulRV(b,this.m_lalcC,n.SolvePositionConstraints_s_rC),E=F.MulRV(v,this.m_lalcA,n.SolvePositionConstraints_s_rA);x.Copy(S),o=I.CrossVV(w,S),s=I.CrossVV(E,S),T+=this.m_mC+this.m_mA+this.m_iC*o*o+this.m_iA*s*s;var M=this.m_lalcC,D=F.MulTRV(b,I.AddVV(E,I.SubVV(h,d,I.s_t0),I.s_t0),I.s_t0);i=I.DotVV(I.SubVV(D,M,I.s_t0),this.m_localAxisC)}if(this.m_typeB===t.b2JointType.e_revoluteJoint)C.SetZero(),a=this.m_ratio,c=this.m_ratio,T+=this.m_ratio*this.m_ratio*(this.m_iB+this.m_iD),r=f-y-this.m_referenceAngleB;else{S=F.MulRV(A,this.m_localAxisD,n.SolvePositionConstraints_s_u);var B=F.MulRV(A,this.m_lalcD,n.SolvePositionConstraints_s_rD),P=F.MulRV(g,this.m_lalcB,n.SolvePositionConstraints_s_rB);I.MulSV(this.m_ratio,S,C),c=this.m_ratio*I.CrossVV(B,S),a=this.m_ratio*I.CrossVV(P,S),T+=this.m_ratio*this.m_ratio*(this.m_mD+this.m_mB)+this.m_iD*c*c+this.m_iB*a*a;var R=this.m_lalcD,O=F.MulTRV(A,I.AddVV(P,I.SubVV(_,m,I.s_t0),I.s_t0),I.s_t0);r=I.DotVV(I.SubVV(O,R,I.s_t0),this.m_localAxisD)}var L=i+this.m_ratio*r-this.m_constant,V=0;return T>0&&(V=-L/T),h.SelfMulAdd(this.m_mA*V,x),u+=this.m_iA*V*s,_.SelfMulAdd(this.m_mB*V,C),f+=this.m_iB*V*a,d.SelfMulSub(this.m_mC*V,x),p-=this.m_iC*V*o,m.SelfMulSub(this.m_mD*V,C),y-=this.m_iD*V*c,e.positions[this.m_indexA].a=u,e.positions[this.m_indexB].a=f,e.positions[this.m_indexC].a=p,e.positions[this.m_indexD].a=y,00&&(this.m_angularMass=1/this.m_angularMass),I.SubVV(I.AddVV(s,_,I.s_t0),I.AddVV(e,u,I.s_t1),this.m_linearError),this.m_angularError=a-i-this.m_angularOffset,t.step.warmStarting){this.m_linearImpulse.SelfMul(t.step.dtRatio),this.m_angularImpulse*=t.step.dtRatio;var v=this.m_linearImpulse;n.SelfMulSub(f,v),r-=p*(I.CrossVV(u,v)+this.m_angularImpulse),o.SelfMulAdd(d,v),l+=m*(I.CrossVV(_,v)+this.m_angularImpulse)}else this.m_linearImpulse.SetZero(),this.m_angularImpulse=0;t.velocities[this.m_indexA].w=r,t.velocities[this.m_indexB].w=l},i.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexA].v,n=t.velocities[this.m_indexA].w,r=t.velocities[this.m_indexB].v,s=t.velocities[this.m_indexB].w,a=this.m_invMassA,o=this.m_invMassB,l=this.m_invIA,c=this.m_invIB,h=t.step.dt,u=t.step.inv_dt,_=s-n+u*this.m_correctionFactor*this.m_angularError,f=-this.m_angularMass*_,d=this.m_angularImpulse,p=h*this.m_maxTorque;this.m_angularImpulse=g(this.m_angularImpulse+f,-p,p),n-=l*(f=this.m_angularImpulse-d),s+=c*f;var m=this.m_rA,y=this.m_rB,v=I.AddVV(I.SubVV(I.AddVV(r,I.CrossSV(s,y,I.s_t0),I.s_t0),I.AddVV(e,I.CrossSV(n,m,I.s_t1),I.s_t1),I.s_t2),I.MulSV(u*this.m_correctionFactor,this.m_linearError,I.s_t3),i.SolveVelocityConstraints_s_Cdot_v2),b=O.MulMV(this.m_linearMass,v,i.SolveVelocityConstraints_s_impulse_v2).SelfNeg(),A=i.SolveVelocityConstraints_s_oldImpulse_v2.Copy(this.m_linearImpulse);this.m_linearImpulse.SelfAdd(b),p=h*this.m_maxForce,this.m_linearImpulse.LengthSquared()>p*p&&(this.m_linearImpulse.Normalize(),this.m_linearImpulse.SelfMul(p)),I.SubVV(this.m_linearImpulse,A,b),e.SelfMulSub(a,b),n-=l*I.CrossVV(m,b),r.SelfMulAdd(o,b),s+=c*I.CrossVV(y,b),t.velocities[this.m_indexA].w=n,t.velocities[this.m_indexB].w=s},i.prototype.SolvePositionConstraints=function(){return!0},i.prototype.Dump=function(t){var e=this.m_bodyA.m_islandIndex,i=this.m_bodyB.m_islandIndex;t(" const jd: b2MotorJointDef = new b2MotorJointDef();\n"),t(" jd.bodyA = bodies[%d];\n",e),t(" jd.bodyB = bodies[%d];\n",i),t(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),t(" jd.linearOffset.Set(%.15f, %.15f);\n",this.m_linearOffset.x,this.m_linearOffset.y),t(" jd.angularOffset = %.15f;\n",this.m_angularOffset),t(" jd.maxForce = %.15f;\n",this.m_maxForce),t(" jd.maxTorque = %.15f;\n",this.m_maxTorque),t(" jd.correctionFactor = %.15f;\n",this.m_correctionFactor),t(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)},i.SolveVelocityConstraints_s_Cdot_v2=new I,i.SolveVelocityConstraints_s_impulse_v2=new I,i.SolveVelocityConstraints_s_oldImpulse_v2=new I,i})(mi),Ei=(function(e){function i(){var i=e.call(this,t.b2JointType.e_mouseJoint)||this;return i.target=new I,i.maxForce=0,i.frequencyHz=5,i.dampingRatio=.7,i}return ti(i,e),i})(pi),Mi=(function(t){function i(i){var n=t.call(this,i)||this;return n.m_localAnchorB=new I,n.m_targetA=new I,n.m_frequencyHz=0,n.m_dampingRatio=0,n.m_beta=0,n.m_impulse=new I,n.m_maxForce=0,n.m_gamma=0,n.m_indexA=0,n.m_indexB=0,n.m_rB=new I,n.m_localCenterB=new I,n.m_invMassB=0,n.m_invIB=0,n.m_mass=new O,n.m_C=new I,n.m_qB=new F,n.m_lalcB=new I,n.m_K=new O,n.m_targetA.Copy(e(i.target,I.ZERO)),V.MulTXV(n.m_bodyB.GetTransform(),n.m_targetA,n.m_localAnchorB),n.m_maxForce=e(i.maxForce,0),n.m_impulse.SetZero(),n.m_frequencyHz=e(i.frequencyHz,0),n.m_dampingRatio=e(i.dampingRatio,0),n.m_beta=0,n.m_gamma=0,n}return ti(i,t),i.prototype.SetTarget=function(t){this.m_bodyB.IsAwake()||this.m_bodyB.SetAwake(!0),this.m_targetA.Copy(t)},i.prototype.GetTarget=function(){return this.m_targetA},i.prototype.SetMaxForce=function(t){this.m_maxForce=t},i.prototype.GetMaxForce=function(){return this.m_maxForce},i.prototype.SetFrequency=function(t){this.m_frequencyHz=t},i.prototype.GetFrequency=function(){return this.m_frequencyHz},i.prototype.SetDampingRatio=function(t){this.m_dampingRatio=t},i.prototype.GetDampingRatio=function(){return this.m_dampingRatio},i.prototype.InitVelocityConstraints=function(t){this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIB=this.m_bodyB.m_invI;var e=t.positions[this.m_indexB].c,i=t.positions[this.m_indexB].a,n=t.velocities[this.m_indexB].v,r=t.velocities[this.m_indexB].w,a=this.m_qB.SetAngle(i),o=this.m_bodyB.GetMass(),l=2*s*this.m_frequencyHz,c=2*o*this.m_dampingRatio*l,h=o*l*l,u=t.step.dt;this.m_gamma=u*(c+u*h),0!==this.m_gamma&&(this.m_gamma=1/this.m_gamma),this.m_beta=u*h*this.m_gamma,I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),F.MulRV(a,this.m_lalcB,this.m_rB);var _=this.m_K;_.ex.x=this.m_invMassB+this.m_invIB*this.m_rB.y*this.m_rB.y+this.m_gamma,_.ex.y=-this.m_invIB*this.m_rB.x*this.m_rB.y,_.ey.x=_.ex.y,_.ey.y=this.m_invMassB+this.m_invIB*this.m_rB.x*this.m_rB.x+this.m_gamma,_.GetInverse(this.m_mass),this.m_C.x=e.x+this.m_rB.x-this.m_targetA.x,this.m_C.y=e.y+this.m_rB.y-this.m_targetA.y,this.m_C.SelfMul(this.m_beta),r*=.98,t.step.warmStarting?(this.m_impulse.SelfMul(t.step.dtRatio),n.x+=this.m_invMassB*this.m_impulse.x,n.y+=this.m_invMassB*this.m_impulse.y,r+=this.m_invIB*I.CrossVV(this.m_rB,this.m_impulse)):this.m_impulse.SetZero(),t.velocities[this.m_indexB].w=r},i.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexB].v,n=t.velocities[this.m_indexB].w,r=I.AddVCrossSV(e,n,this.m_rB,i.SolveVelocityConstraints_s_Cdot),s=O.MulMV(this.m_mass,I.AddVV(r,I.AddVV(this.m_C,I.MulSV(this.m_gamma,this.m_impulse,I.s_t0),I.s_t0),I.s_t0).SelfNeg(),i.SolveVelocityConstraints_s_impulse),a=i.SolveVelocityConstraints_s_oldImpulse.Copy(this.m_impulse);this.m_impulse.SelfAdd(s);var o=t.step.dt*this.m_maxForce;this.m_impulse.LengthSquared()>o*o&&this.m_impulse.SelfMul(o/this.m_impulse.Length()),I.SubVV(this.m_impulse,a,s),e.SelfMulAdd(this.m_invMassB,s),n+=this.m_invIB*I.CrossVV(this.m_rB,s),t.velocities[this.m_indexB].w=n},i.prototype.SolvePositionConstraints=function(){return!0},i.prototype.GetAnchorA=function(t){return t.x=this.m_targetA.x,t.y=this.m_targetA.y,t},i.prototype.GetAnchorB=function(t){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,t)},i.prototype.GetReactionForce=function(t,e){return I.MulSV(t,this.m_impulse,e)},i.prototype.GetReactionTorque=function(){return 0},i.prototype.Dump=function(t){t("Mouse joint dumping is not supported.\n")},i.prototype.ShiftOrigin=function(t){this.m_targetA.SelfSub(t)},i.SolveVelocityConstraints_s_Cdot=new I,i.SolveVelocityConstraints_s_impulse=new I,i.SolveVelocityConstraints_s_oldImpulse=new I,i})(mi),Di=(function(e){function i(){var i=e.call(this,t.b2JointType.e_prismaticJoint)||this;return i.localAnchorA=new I,i.localAnchorB=new I,i.localAxisA=new I(1,0),i.referenceAngle=0,i.enableLimit=!1,i.lowerTranslation=0,i.upperTranslation=0,i.enableMotor=!1,i.maxMotorForce=0,i.motorSpeed=0,i}return ti(i,e),i.prototype.Initialize=function(t,e,i,n){this.bodyA=t,this.bodyB=e,this.bodyA.GetLocalPoint(i,this.localAnchorA),this.bodyB.GetLocalPoint(i,this.localAnchorB),this.bodyA.GetLocalVector(n,this.localAxisA),this.referenceAngle=this.bodyB.GetAngle()-this.bodyA.GetAngle()},i})(pi),Bi=(function(i){function n(n){var r=i.call(this,n)||this;return r.m_localAnchorA=new I,r.m_localAnchorB=new I,r.m_localXAxisA=new I,r.m_localYAxisA=new I,r.m_referenceAngle=0,r.m_impulse=new R(0,0,0),r.m_motorImpulse=0,r.m_lowerTranslation=0,r.m_upperTranslation=0,r.m_maxMotorForce=0,r.m_motorSpeed=0,r.m_enableLimit=!1,r.m_enableMotor=!1,r.m_limitState=t.b2LimitState.e_inactiveLimit,r.m_indexA=0,r.m_indexB=0,r.m_localCenterA=new I,r.m_localCenterB=new I,r.m_invMassA=0,r.m_invMassB=0,r.m_invIA=0,r.m_invIB=0,r.m_axis=new I(0,0),r.m_perp=new I(0,0),r.m_s1=0,r.m_s2=0,r.m_a1=0,r.m_a2=0,r.m_K=new L,r.m_K3=new L,r.m_K2=new O,r.m_motorMass=0,r.m_qA=new F,r.m_qB=new F,r.m_lalcA=new I,r.m_lalcB=new I,r.m_rA=new I,r.m_rB=new I,r.m_localAnchorA.Copy(e(n.localAnchorA,I.ZERO)),r.m_localAnchorB.Copy(e(n.localAnchorB,I.ZERO)),r.m_localXAxisA.Copy(e(n.localAxisA,new I(1,0))).SelfNormalize(),I.CrossOneV(r.m_localXAxisA,r.m_localYAxisA),r.m_referenceAngle=e(n.referenceAngle,0),r.m_lowerTranslation=e(n.lowerTranslation,0),r.m_upperTranslation=e(n.upperTranslation,0),r.m_maxMotorForce=e(n.maxMotorForce,0),r.m_motorSpeed=e(n.motorSpeed,0),r.m_enableLimit=e(n.enableLimit,!1),r.m_enableMotor=e(n.enableMotor,!1),r}return ti(n,i),n.prototype.InitVelocityConstraints=function(e){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var i=e.positions[this.m_indexA].c,r=e.positions[this.m_indexA].a,s=e.velocities[this.m_indexA].v,a=e.velocities[this.m_indexA].w,o=e.positions[this.m_indexB].c,c=e.positions[this.m_indexB].a,h=e.velocities[this.m_indexB].v,u=e.velocities[this.m_indexB].w,_=this.m_qA.SetAngle(r),f=this.m_qB.SetAngle(c);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var d=F.MulRV(_,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var p=F.MulRV(f,this.m_lalcB,this.m_rB),y=I.AddVV(I.SubVV(o,i,I.s_t0),I.SubVV(p,d,I.s_t1),n.InitVelocityConstraints_s_d),v=this.m_invMassA,g=this.m_invMassB,b=this.m_invIA,A=this.m_invIB;if(F.MulRV(_,this.m_localXAxisA,this.m_axis),this.m_a1=I.CrossVV(I.AddVV(y,d,I.s_t0),this.m_axis),this.m_a2=I.CrossVV(p,this.m_axis),this.m_motorMass=v+g+b*this.m_a1*this.m_a1+A*this.m_a2*this.m_a2,this.m_motorMass>0&&(this.m_motorMass=1/this.m_motorMass),F.MulRV(_,this.m_localYAxisA,this.m_perp),this.m_s1=I.CrossVV(I.AddVV(y,d,I.s_t0),this.m_perp),this.m_s2=I.CrossVV(p,this.m_perp),this.m_K.ex.x=v+g+b*this.m_s1*this.m_s1+A*this.m_s2*this.m_s2,this.m_K.ex.y=b*this.m_s1+A*this.m_s2,this.m_K.ex.z=b*this.m_s1*this.m_a1+A*this.m_s2*this.m_a2,this.m_K.ey.x=this.m_K.ex.y,this.m_K.ey.y=b+A,0===this.m_K.ey.y&&(this.m_K.ey.y=1),this.m_K.ey.z=b*this.m_a1+A*this.m_a2,this.m_K.ez.x=this.m_K.ex.z,this.m_K.ez.y=this.m_K.ey.z,this.m_K.ez.z=v+g+b*this.m_a1*this.m_a1+A*this.m_a2*this.m_a2,this.m_enableLimit){var x=I.DotVV(this.m_axis,y);m(this.m_upperTranslation-this.m_lowerTranslation)<2*l?this.m_limitState=t.b2LimitState.e_equalLimits:x<=this.m_lowerTranslation?this.m_limitState!==t.b2LimitState.e_atLowerLimit&&(this.m_limitState=t.b2LimitState.e_atLowerLimit,this.m_impulse.z=0):x>=this.m_upperTranslation?this.m_limitState!==t.b2LimitState.e_atUpperLimit&&(this.m_limitState=t.b2LimitState.e_atUpperLimit,this.m_impulse.z=0):(this.m_limitState=t.b2LimitState.e_inactiveLimit,this.m_impulse.z=0)}else this.m_limitState=t.b2LimitState.e_inactiveLimit,this.m_impulse.z=0;if(this.m_enableMotor||(this.m_motorImpulse=0),e.step.warmStarting){this.m_impulse.SelfMul(e.step.dtRatio),this.m_motorImpulse*=e.step.dtRatio;var C=I.AddVV(I.MulSV(this.m_impulse.x,this.m_perp,I.s_t0),I.MulSV(this.m_motorImpulse+this.m_impulse.z,this.m_axis,I.s_t1),n.InitVelocityConstraints_s_P),T=this.m_impulse.x*this.m_s1+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a1,S=this.m_impulse.x*this.m_s2+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a2;s.SelfMulSub(v,C),a-=b*T,h.SelfMulAdd(g,C),u+=A*S}else this.m_impulse.SetZero(),this.m_motorImpulse=0;e.velocities[this.m_indexA].w=a,e.velocities[this.m_indexB].w=u},n.prototype.SolveVelocityConstraints=function(e){var i=e.velocities[this.m_indexA].v,r=e.velocities[this.m_indexA].w,s=e.velocities[this.m_indexB].v,a=e.velocities[this.m_indexB].w,o=this.m_invMassA,l=this.m_invMassB,c=this.m_invIA,h=this.m_invIB;if(this.m_enableMotor&&this.m_limitState!==t.b2LimitState.e_equalLimits){var u=I.DotVV(this.m_axis,I.SubVV(s,i,I.s_t0))+this.m_a2*a-this.m_a1*r,_=this.m_motorMass*(this.m_motorSpeed-u),f=this.m_motorImpulse,d=e.step.dt*this.m_maxMotorForce;this.m_motorImpulse=g(this.m_motorImpulse+_,-d,d),_=this.m_motorImpulse-f;var p=I.MulSV(_,this.m_axis,n.SolveVelocityConstraints_s_P),m=_*this.m_a1,b=_*this.m_a2;i.SelfMulSub(o,p),r-=c*m,s.SelfMulAdd(l,p),a+=h*b}var A=I.DotVV(this.m_perp,I.SubVV(s,i,I.s_t0))+this.m_s2*a-this.m_s1*r,x=a-r;if(this.m_enableLimit&&this.m_limitState!==t.b2LimitState.e_inactiveLimit){var C=I.DotVV(this.m_axis,I.SubVV(s,i,I.s_t0))+this.m_a2*a-this.m_a1*r,T=n.SolveVelocityConstraints_s_f1.Copy(this.m_impulse),S=this.m_K.Solve33(-A,-x,-C,n.SolveVelocityConstraints_s_df3);this.m_impulse.SelfAdd(S),this.m_limitState===t.b2LimitState.e_atLowerLimit?this.m_impulse.z=v(this.m_impulse.z,0):this.m_limitState===t.b2LimitState.e_atUpperLimit&&(this.m_impulse.z=y(this.m_impulse.z,0));var w=-A-(this.m_impulse.z-T.z)*this.m_K.ez.x,E=-x-(this.m_impulse.z-T.z)*this.m_K.ez.y,M=this.m_K.Solve22(w,E,n.SolveVelocityConstraints_s_f2r);M.x+=T.x,M.y+=T.y,this.m_impulse.x=M.x,this.m_impulse.y=M.y,S.x=this.m_impulse.x-T.x,S.y=this.m_impulse.y-T.y,S.z=this.m_impulse.z-T.z,p=I.AddVV(I.MulSV(S.x,this.m_perp,I.s_t0),I.MulSV(S.z,this.m_axis,I.s_t1),n.SolveVelocityConstraints_s_P),m=S.x*this.m_s1+S.y+S.z*this.m_a1,b=S.x*this.m_s2+S.y+S.z*this.m_a2,i.SelfMulSub(o,p),r-=c*m,s.SelfMulAdd(l,p),a+=h*b}else{var D=this.m_K.Solve22(-A,-x,n.SolveVelocityConstraints_s_df2);this.m_impulse.x+=D.x,this.m_impulse.y+=D.y,p=I.MulSV(D.x,this.m_perp,n.SolveVelocityConstraints_s_P),m=D.x*this.m_s1+D.y,b=D.x*this.m_s2+D.y,i.SelfMulSub(o,p),r-=c*m,s.SelfMulAdd(l,p),a+=h*b}e.velocities[this.m_indexA].w=r,e.velocities[this.m_indexB].w=a},n.prototype.SolvePositionConstraints=function(t){var e=t.positions[this.m_indexA].c,i=t.positions[this.m_indexA].a,r=t.positions[this.m_indexB].c,s=t.positions[this.m_indexB].a,a=this.m_qA.SetAngle(i),o=this.m_qB.SetAngle(s),h=this.m_invMassA,u=this.m_invMassB,_=this.m_invIA,f=this.m_invIB,d=F.MulRV(a,this.m_lalcA,this.m_rA),p=F.MulRV(o,this.m_lalcB,this.m_rB),y=I.SubVV(I.AddVV(r,p,I.s_t0),I.AddVV(e,d,I.s_t1),n.SolvePositionConstraints_s_d),b=F.MulRV(a,this.m_localXAxisA,this.m_axis),A=I.CrossVV(I.AddVV(y,d,I.s_t0),b),x=I.CrossVV(p,b),C=F.MulRV(a,this.m_localYAxisA,this.m_perp),T=I.CrossVV(I.AddVV(y,d,I.s_t0),C),S=I.CrossVV(p,C),w=n.SolvePositionConstraints_s_impulse,E=I.DotVV(C,y),M=s-i-this.m_referenceAngle,D=m(E),B=m(M),P=!1,R=0;if(this.m_enableLimit){var O=I.DotVV(b,y);m(this.m_upperTranslation-this.m_lowerTranslation)<2*l?(R=g(O,-.2,.2),D=v(D,m(O)),P=!0):O<=this.m_lowerTranslation?(R=g(O-this.m_lowerTranslation+l,-.2,0),D=v(D,this.m_lowerTranslation-O),P=!0):O>=this.m_upperTranslation&&(R=g(O-this.m_upperTranslation-l,0,.2),D=v(D,O-this.m_upperTranslation),P=!0)}if(P){var L=h+u+_*T*T+f*S*S,V=_*T+f*S,N=_*T*A+f*S*x;0===(U=_+f)&&(U=1);var k=_*A+f*x,z=h+u+_*A*A+f*x*x,G=this.m_K3;G.ex.SetXYZ(L,V,N),G.ey.SetXYZ(V,U,k),G.ez.SetXYZ(N,k,z),w=G.Solve33(-E,-M,-R,w)}else{var U;L=h+u+_*T*T+f*S*S,V=_*T+f*S,0===(U=_+f)&&(U=1);var j=this.m_K2;j.ex.Set(L,V),j.ey.Set(V,U);var H=j.Solve(-E,-M,n.SolvePositionConstraints_s_impulse1);w.x=H.x,w.y=H.y,w.z=0}var W=I.AddVV(I.MulSV(w.x,C,I.s_t0),I.MulSV(w.z,b,I.s_t1),n.SolvePositionConstraints_s_P),X=w.x*T+w.y+w.z*A,Y=w.x*S+w.y+w.z*x;return e.SelfMulSub(h,W),i-=_*X,r.SelfMulAdd(u,W),s+=f*Y,t.positions[this.m_indexA].a=i,t.positions[this.m_indexB].a=s,D<=l&&B<=c},n.prototype.GetAnchorA=function(t){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,t)},n.prototype.GetAnchorB=function(t){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,t)},n.prototype.GetReactionForce=function(t,e){return e.x=t*(this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.x),e.y=t*(this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.y),e},n.prototype.GetReactionTorque=function(t){return t*this.m_impulse.y},n.prototype.GetLocalAnchorA=function(){return this.m_localAnchorA},n.prototype.GetLocalAnchorB=function(){return this.m_localAnchorB},n.prototype.GetLocalAxisA=function(){return this.m_localXAxisA},n.prototype.GetReferenceAngle=function(){return this.m_referenceAngle},n.prototype.GetJointTranslation=function(){var t=this.m_bodyA.GetWorldPoint(this.m_localAnchorA,n.GetJointTranslation_s_pA),e=this.m_bodyB.GetWorldPoint(this.m_localAnchorB,n.GetJointTranslation_s_pB),i=I.SubVV(e,t,n.GetJointTranslation_s_d),r=this.m_bodyA.GetWorldVector(this.m_localXAxisA,n.GetJointTranslation_s_axis);return I.DotVV(i,r)},n.prototype.GetJointSpeed=function(){var t=this.m_bodyA,e=this.m_bodyB;I.SubVV(this.m_localAnchorA,t.m_sweep.localCenter,this.m_lalcA);var i=F.MulRV(t.m_xf.q,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,e.m_sweep.localCenter,this.m_lalcB);var n=F.MulRV(e.m_xf.q,this.m_lalcB,this.m_rB),r=I.AddVV(t.m_sweep.c,i,I.s_t0),s=I.AddVV(e.m_sweep.c,n,I.s_t1),a=I.SubVV(s,r,I.s_t2),o=t.GetWorldVector(this.m_localXAxisA,this.m_axis),l=t.m_linearVelocity,c=e.m_linearVelocity,h=t.m_angularVelocity,u=e.m_angularVelocity;return I.DotVV(a,I.CrossSV(h,o,I.s_t0))+I.DotVV(o,I.SubVV(I.AddVCrossSV(c,u,n,I.s_t0),I.AddVCrossSV(l,h,i,I.s_t1),I.s_t0))},n.prototype.IsLimitEnabled=function(){return this.m_enableLimit},n.prototype.EnableLimit=function(t){t!==this.m_enableLimit&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableLimit=t,this.m_impulse.z=0)},n.prototype.GetLowerLimit=function(){return this.m_lowerTranslation},n.prototype.GetUpperLimit=function(){return this.m_upperTranslation},n.prototype.SetLimits=function(t,e){t===this.m_lowerTranslation&&e===this.m_upperTranslation||(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_lowerTranslation=t,this.m_upperTranslation=e,this.m_impulse.z=0)},n.prototype.IsMotorEnabled=function(){return this.m_enableMotor},n.prototype.EnableMotor=function(t){t!==this.m_enableMotor&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableMotor=t)},n.prototype.SetMotorSpeed=function(t){t!==this.m_motorSpeed&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_motorSpeed=t)},n.prototype.GetMotorSpeed=function(){return this.m_motorSpeed},n.prototype.SetMaxMotorForce=function(t){t!==this.m_maxMotorForce&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_maxMotorForce=t)},n.prototype.GetMaxMotorForce=function(){return this.m_maxMotorForce},n.prototype.GetMotorForce=function(t){return t*this.m_motorImpulse},n.prototype.Dump=function(t){var e=this.m_bodyA.m_islandIndex,i=this.m_bodyB.m_islandIndex;t(" const jd: b2PrismaticJointDef = new b2PrismaticJointDef();\n"),t(" jd.bodyA = bodies[%d];\n",e),t(" jd.bodyB = bodies[%d];\n",i),t(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),t(" jd.localAnchorA.Set(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),t(" jd.localAnchorB.Set(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),t(" jd.localAxisA.Set(%.15f, %.15f);\n",this.m_localXAxisA.x,this.m_localXAxisA.y),t(" jd.referenceAngle = %.15f;\n",this.m_referenceAngle),t(" jd.enableLimit = %s;\n",this.m_enableLimit?"true":"false"),t(" jd.lowerTranslation = %.15f;\n",this.m_lowerTranslation),t(" jd.upperTranslation = %.15f;\n",this.m_upperTranslation),t(" jd.enableMotor = %s;\n",this.m_enableMotor?"true":"false"),t(" jd.motorSpeed = %.15f;\n",this.m_motorSpeed),t(" jd.maxMotorForce = %.15f;\n",this.m_maxMotorForce),t(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)},n.InitVelocityConstraints_s_d=new I,n.InitVelocityConstraints_s_P=new I,n.SolveVelocityConstraints_s_P=new I,n.SolveVelocityConstraints_s_f2r=new I,n.SolveVelocityConstraints_s_f1=new R,n.SolveVelocityConstraints_s_df3=new R,n.SolveVelocityConstraints_s_df2=new I,n.SolvePositionConstraints_s_d=new I,n.SolvePositionConstraints_s_impulse=new R,n.SolvePositionConstraints_s_impulse1=new I,n.SolvePositionConstraints_s_P=new I,n.GetJointTranslation_s_pA=new I,n.GetJointTranslation_s_pB=new I,n.GetJointTranslation_s_d=new I,n.GetJointTranslation_s_axis=new I,n})(mi),Ii=(function(e){function i(){var i=e.call(this,t.b2JointType.e_pulleyJoint)||this;return i.groundAnchorA=new I(-1,1),i.groundAnchorB=new I(1,1),i.localAnchorA=new I(-1,0),i.localAnchorB=new I(1,0),i.lengthA=0,i.lengthB=0,i.ratio=1,i.collideConnected=!0,i}return ti(i,e),i.prototype.Initialize=function(t,e,i,n,r,s,a){this.bodyA=t,this.bodyB=e,this.groundAnchorA.Copy(i),this.groundAnchorB.Copy(n),this.bodyA.GetLocalPoint(r,this.localAnchorA),this.bodyB.GetLocalPoint(s,this.localAnchorB),this.lengthA=I.DistanceVV(r,i),this.lengthB=I.DistanceVV(s,n),this.ratio=a},i})(pi),Pi=(function(t){function i(i){var n=t.call(this,i)||this;return n.m_groundAnchorA=new I,n.m_groundAnchorB=new I,n.m_lengthA=0,n.m_lengthB=0,n.m_localAnchorA=new I,n.m_localAnchorB=new I,n.m_constant=0,n.m_ratio=0,n.m_impulse=0,n.m_indexA=0,n.m_indexB=0,n.m_uA=new I,n.m_uB=new I,n.m_rA=new I,n.m_rB=new I,n.m_localCenterA=new I,n.m_localCenterB=new I,n.m_invMassA=0,n.m_invMassB=0,n.m_invIA=0,n.m_invIB=0,n.m_mass=0,n.m_qA=new F,n.m_qB=new F,n.m_lalcA=new I,n.m_lalcB=new I,n.m_groundAnchorA.Copy(e(i.groundAnchorA,new I(-1,1))),n.m_groundAnchorB.Copy(e(i.groundAnchorB,new I(1,0))),n.m_localAnchorA.Copy(e(i.localAnchorA,new I(-1,0))),n.m_localAnchorB.Copy(e(i.localAnchorB,new I(1,0))),n.m_lengthA=e(i.lengthA,0),n.m_lengthB=e(i.lengthB,0),n.m_ratio=e(i.ratio,1),n.m_constant=e(i.lengthA,0)+n.m_ratio*e(i.lengthB,0),n.m_impulse=0,n}return ti(i,t),i.prototype.InitVelocityConstraints=function(t){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var e=t.positions[this.m_indexA].c,n=t.positions[this.m_indexA].a,r=t.velocities[this.m_indexA].v,s=t.velocities[this.m_indexA].w,a=t.positions[this.m_indexB].c,o=t.positions[this.m_indexB].a,c=t.velocities[this.m_indexB].v,h=t.velocities[this.m_indexB].w,u=this.m_qA.SetAngle(n),_=this.m_qB.SetAngle(o);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),F.MulRV(u,this.m_lalcA,this.m_rA),I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),F.MulRV(_,this.m_lalcB,this.m_rB),this.m_uA.Copy(e).SelfAdd(this.m_rA).SelfSub(this.m_groundAnchorA),this.m_uB.Copy(a).SelfAdd(this.m_rB).SelfSub(this.m_groundAnchorB);var f=this.m_uA.Length(),d=this.m_uB.Length();f>10*l?this.m_uA.SelfMul(1/f):this.m_uA.SetZero(),d>10*l?this.m_uB.SelfMul(1/d):this.m_uB.SetZero();var p=I.CrossVV(this.m_rA,this.m_uA),m=I.CrossVV(this.m_rB,this.m_uB),y=this.m_invMassA+this.m_invIA*p*p,v=this.m_invMassB+this.m_invIB*m*m;if(this.m_mass=y+this.m_ratio*this.m_ratio*v,this.m_mass>0&&(this.m_mass=1/this.m_mass),t.step.warmStarting){this.m_impulse*=t.step.dtRatio;var g=I.MulSV(-this.m_impulse,this.m_uA,i.InitVelocityConstraints_s_PA),b=I.MulSV(-this.m_ratio*this.m_impulse,this.m_uB,i.InitVelocityConstraints_s_PB);r.SelfMulAdd(this.m_invMassA,g),s+=this.m_invIA*I.CrossVV(this.m_rA,g),c.SelfMulAdd(this.m_invMassB,b),h+=this.m_invIB*I.CrossVV(this.m_rB,b)}else this.m_impulse=0;t.velocities[this.m_indexA].w=s,t.velocities[this.m_indexB].w=h},i.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexA].v,n=t.velocities[this.m_indexA].w,r=t.velocities[this.m_indexB].v,s=t.velocities[this.m_indexB].w,a=I.AddVCrossSV(e,n,this.m_rA,i.SolveVelocityConstraints_s_vpA),o=I.AddVCrossSV(r,s,this.m_rB,i.SolveVelocityConstraints_s_vpB),l=-I.DotVV(this.m_uA,a)-this.m_ratio*I.DotVV(this.m_uB,o),c=-this.m_mass*l;this.m_impulse+=c;var h=I.MulSV(-c,this.m_uA,i.SolveVelocityConstraints_s_PA),u=I.MulSV(-this.m_ratio*c,this.m_uB,i.SolveVelocityConstraints_s_PB);e.SelfMulAdd(this.m_invMassA,h),n+=this.m_invIA*I.CrossVV(this.m_rA,h),r.SelfMulAdd(this.m_invMassB,u),s+=this.m_invIB*I.CrossVV(this.m_rB,u),t.velocities[this.m_indexA].w=n,t.velocities[this.m_indexB].w=s},i.prototype.SolvePositionConstraints=function(t){var e=t.positions[this.m_indexA].c,n=t.positions[this.m_indexA].a,r=t.positions[this.m_indexB].c,s=t.positions[this.m_indexB].a,a=this.m_qA.SetAngle(n),o=this.m_qB.SetAngle(s);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var c=F.MulRV(a,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var h=F.MulRV(o,this.m_lalcB,this.m_rB),u=this.m_uA.Copy(e).SelfAdd(c).SelfSub(this.m_groundAnchorA),_=this.m_uB.Copy(r).SelfAdd(h).SelfSub(this.m_groundAnchorB),f=u.Length(),d=_.Length();f>10*l?u.SelfMul(1/f):u.SetZero(),d>10*l?_.SelfMul(1/d):_.SetZero();var p=I.CrossVV(c,u),y=I.CrossVV(h,_),v=this.m_invMassA+this.m_invIA*p*p,g=this.m_invMassB+this.m_invIB*y*y,b=v+this.m_ratio*this.m_ratio*g;b>0&&(b=1/b);var A=this.m_constant-f-this.m_ratio*d,x=m(A),C=-b*A,T=I.MulSV(-C,u,i.SolvePositionConstraints_s_PA),S=I.MulSV(-this.m_ratio*C,_,i.SolvePositionConstraints_s_PB);return e.SelfMulAdd(this.m_invMassA,T),n+=this.m_invIA*I.CrossVV(c,T),r.SelfMulAdd(this.m_invMassB,S),s+=this.m_invIB*I.CrossVV(h,S),t.positions[this.m_indexA].a=n,t.positions[this.m_indexB].a=s,x0&&(this.m_motorMass=1/this.m_motorMass),this.m_enableMotor&&!y||(this.m_motorImpulse=0),this.m_enableLimit&&!y){var v=a-i-this.m_referenceAngle;m(this.m_upperAngle-this.m_lowerAngle)<2*c?this.m_limitState=t.b2LimitState.e_equalLimits:v<=this.m_lowerAngle?(this.m_limitState!==t.b2LimitState.e_atLowerLimit&&(this.m_impulse.z=0),this.m_limitState=t.b2LimitState.e_atLowerLimit):v>=this.m_upperAngle?(this.m_limitState!==t.b2LimitState.e_atUpperLimit&&(this.m_impulse.z=0),this.m_limitState=t.b2LimitState.e_atUpperLimit):(this.m_limitState=t.b2LimitState.e_inactiveLimit,this.m_impulse.z=0)}else this.m_limitState=t.b2LimitState.e_inactiveLimit;if(e.step.warmStarting){this.m_impulse.SelfMul(e.step.dtRatio),this.m_motorImpulse*=e.step.dtRatio;var g=n.InitVelocityConstraints_s_P.Set(this.m_impulse.x,this.m_impulse.y);r.SelfMulSub(_,g),s-=d*(I.CrossVV(this.m_rA,g)+this.m_motorImpulse+this.m_impulse.z),o.SelfMulAdd(f,g),l+=p*(I.CrossVV(this.m_rB,g)+this.m_motorImpulse+this.m_impulse.z)}else this.m_impulse.SetZero(),this.m_motorImpulse=0;e.velocities[this.m_indexA].w=s,e.velocities[this.m_indexB].w=l},n.prototype.SolveVelocityConstraints=function(e){var i=e.velocities[this.m_indexA].v,r=e.velocities[this.m_indexA].w,s=e.velocities[this.m_indexB].v,a=e.velocities[this.m_indexB].w,o=this.m_invMassA,l=this.m_invMassB,c=this.m_invIA,h=this.m_invIB,u=c+h===0;if(this.m_enableMotor&&this.m_limitState!==t.b2LimitState.e_equalLimits&&!u){var _=a-r-this.m_motorSpeed,f=-this.m_motorMass*_,d=this.m_motorImpulse,p=e.step.dt*this.m_maxMotorTorque;this.m_motorImpulse=g(this.m_motorImpulse+f,-p,p),r-=c*(f=this.m_motorImpulse-d),a+=h*f}if(this.m_enableLimit&&this.m_limitState!==t.b2LimitState.e_inactiveLimit&&!u){var m=I.SubVV(I.AddVCrossSV(s,a,this.m_rB,I.s_t0),I.AddVCrossSV(i,r,this.m_rA,I.s_t1),n.SolveVelocityConstraints_s_Cdot1),y=a-r,v=this.m_mass.Solve33(m.x,m.y,y,n.SolveVelocityConstraints_s_impulse_v3).SelfNeg();if(this.m_limitState===t.b2LimitState.e_equalLimits)this.m_impulse.SelfAdd(v);else if(this.m_limitState===t.b2LimitState.e_atLowerLimit)if(this.m_impulse.z+v.z<0){var b=-m.x+this.m_impulse.z*this.m_mass.ez.x,A=-m.y+this.m_impulse.z*this.m_mass.ez.y,x=this.m_mass.Solve22(b,A,n.SolveVelocityConstraints_s_reduced_v2);v.x=x.x,v.y=x.y,v.z=-this.m_impulse.z,this.m_impulse.x+=x.x,this.m_impulse.y+=x.y,this.m_impulse.z=0}else this.m_impulse.SelfAdd(v);else this.m_limitState===t.b2LimitState.e_atUpperLimit&&(this.m_impulse.z+v.z>0?(b=-m.x+this.m_impulse.z*this.m_mass.ez.x,A=-m.y+this.m_impulse.z*this.m_mass.ez.y,x=this.m_mass.Solve22(b,A,n.SolveVelocityConstraints_s_reduced_v2),v.x=x.x,v.y=x.y,v.z=-this.m_impulse.z,this.m_impulse.x+=x.x,this.m_impulse.y+=x.y,this.m_impulse.z=0):this.m_impulse.SelfAdd(v));var C=n.SolveVelocityConstraints_s_P.Set(v.x,v.y);i.SelfMulSub(o,C),r-=c*(I.CrossVV(this.m_rA,C)+v.z),s.SelfMulAdd(l,C),a+=h*(I.CrossVV(this.m_rB,C)+v.z)}else{var T=I.SubVV(I.AddVCrossSV(s,a,this.m_rB,I.s_t0),I.AddVCrossSV(i,r,this.m_rA,I.s_t1),n.SolveVelocityConstraints_s_Cdot_v2),S=this.m_mass.Solve22(-T.x,-T.y,n.SolveVelocityConstraints_s_impulse_v2);this.m_impulse.x+=S.x,this.m_impulse.y+=S.y,i.SelfMulSub(o,S),r-=c*I.CrossVV(this.m_rA,S),s.SelfMulAdd(l,S),a+=h*I.CrossVV(this.m_rB,S)}e.velocities[this.m_indexA].w=r,e.velocities[this.m_indexB].w=a},n.prototype.SolvePositionConstraints=function(e){var i,r=e.positions[this.m_indexA].c,s=e.positions[this.m_indexA].a,a=e.positions[this.m_indexB].c,o=e.positions[this.m_indexB].a,h=this.m_qA.SetAngle(s),u=this.m_qB.SetAngle(o),_=0,f=this.m_invIA+this.m_invIB===0;if(this.m_enableLimit&&this.m_limitState!==t.b2LimitState.e_inactiveLimit&&!f){var d=o-s-this.m_referenceAngle,p=0;if(this.m_limitState===t.b2LimitState.e_equalLimits){var y=g(d-this.m_lowerAngle,-.13962634015955555,.13962634015955555);p=-this.m_motorMass*y,_=m(y)}else this.m_limitState===t.b2LimitState.e_atLowerLimit?(_=-(y=d-this.m_lowerAngle),y=g(y+c,-.13962634015955555,0),p=-this.m_motorMass*y):this.m_limitState===t.b2LimitState.e_atUpperLimit&&(_=y=d-this.m_upperAngle,y=g(y-c,0,.13962634015955555),p=-this.m_motorMass*y);s-=this.m_invIA*p,o+=this.m_invIB*p}h.SetAngle(s),u.SetAngle(o),I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var v=F.MulRV(h,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var b=F.MulRV(u,this.m_lalcB,this.m_rB),A=I.SubVV(I.AddVV(a,b,I.s_t0),I.AddVV(r,v,I.s_t1),n.SolvePositionConstraints_s_C_v2);i=A.Length();var x=this.m_invMassA,C=this.m_invMassB,T=this.m_invIA,S=this.m_invIB,w=this.m_K;w.ex.x=x+C+T*v.y*v.y+S*b.y*b.y,w.ex.y=-T*v.x*v.y-S*b.x*b.y,w.ey.x=w.ex.y,w.ey.y=x+C+T*v.x*v.x+S*b.x*b.x;var E=w.Solve(A.x,A.y,n.SolvePositionConstraints_s_impulse).SelfNeg();return r.SelfMulSub(x,E),s-=T*I.CrossVV(v,E),a.SelfMulAdd(C,E),o+=S*I.CrossVV(b,E),e.positions[this.m_indexA].a=s,e.positions[this.m_indexB].a=o,i<=l&&_<=c},n.prototype.GetAnchorA=function(t){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,t)},n.prototype.GetAnchorB=function(t){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,t)},n.prototype.GetReactionForce=function(t,e){return e.x=t*this.m_impulse.x,e.y=t*this.m_impulse.y,e},n.prototype.GetReactionTorque=function(t){return t*this.m_impulse.z},n.prototype.GetLocalAnchorA=function(){return this.m_localAnchorA},n.prototype.GetLocalAnchorB=function(){return this.m_localAnchorB},n.prototype.GetReferenceAngle=function(){return this.m_referenceAngle},n.prototype.GetJointAngle=function(){return this.m_bodyB.m_sweep.a-this.m_bodyA.m_sweep.a-this.m_referenceAngle},n.prototype.GetJointSpeed=function(){return this.m_bodyB.m_angularVelocity-this.m_bodyA.m_angularVelocity},n.prototype.IsMotorEnabled=function(){return this.m_enableMotor},n.prototype.EnableMotor=function(t){t!==this.m_enableMotor&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableMotor=t)},n.prototype.GetMotorTorque=function(t){return t*this.m_motorImpulse},n.prototype.GetMotorSpeed=function(){return this.m_motorSpeed},n.prototype.SetMaxMotorTorque=function(t){t!==this.m_maxMotorTorque&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_maxMotorTorque=t)},n.prototype.GetMaxMotorTorque=function(){return this.m_maxMotorTorque},n.prototype.IsLimitEnabled=function(){return this.m_enableLimit},n.prototype.EnableLimit=function(t){t!==this.m_enableLimit&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableLimit=t,this.m_impulse.z=0)},n.prototype.GetLowerLimit=function(){return this.m_lowerAngle},n.prototype.GetUpperLimit=function(){return this.m_upperAngle},n.prototype.SetLimits=function(t,e){t===this.m_lowerAngle&&e===this.m_upperAngle||(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_impulse.z=0,this.m_lowerAngle=t,this.m_upperAngle=e)},n.prototype.SetMotorSpeed=function(t){t!==this.m_motorSpeed&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_motorSpeed=t)},n.prototype.Dump=function(t){var e=this.m_bodyA.m_islandIndex,i=this.m_bodyB.m_islandIndex;t(" const jd: b2RevoluteJointDef = new b2RevoluteJointDef();\n"),t(" jd.bodyA = bodies[%d];\n",e),t(" jd.bodyB = bodies[%d];\n",i),t(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),t(" jd.localAnchorA.Set(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),t(" jd.localAnchorB.Set(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),t(" jd.referenceAngle = %.15f;\n",this.m_referenceAngle),t(" jd.enableLimit = %s;\n",this.m_enableLimit?"true":"false"),t(" jd.lowerAngle = %.15f;\n",this.m_lowerAngle),t(" jd.upperAngle = %.15f;\n",this.m_upperAngle),t(" jd.enableMotor = %s;\n",this.m_enableMotor?"true":"false"),t(" jd.motorSpeed = %.15f;\n",this.m_motorSpeed),t(" jd.maxMotorTorque = %.15f;\n",this.m_maxMotorTorque),t(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)},n.InitVelocityConstraints_s_P=new I,n.SolveVelocityConstraints_s_P=new I,n.SolveVelocityConstraints_s_Cdot_v2=new I,n.SolveVelocityConstraints_s_Cdot1=new I,n.SolveVelocityConstraints_s_impulse_v3=new R,n.SolveVelocityConstraints_s_reduced_v2=new I,n.SolveVelocityConstraints_s_impulse_v2=new I,n.SolvePositionConstraints_s_C_v2=new I,n.SolvePositionConstraints_s_impulse=new I,n})(mi),Li=(function(e){function i(){var i=e.call(this,t.b2JointType.e_ropeJoint)||this;return i.localAnchorA=new I(-1,0),i.localAnchorB=new I(1,0),i.maxLength=0,i}return ti(i,e),i})(pi),Fi=(function(i){function n(n){var r=i.call(this,n)||this;return r.m_localAnchorA=new I,r.m_localAnchorB=new I,r.m_maxLength=0,r.m_length=0,r.m_impulse=0,r.m_indexA=0,r.m_indexB=0,r.m_u=new I,r.m_rA=new I,r.m_rB=new I,r.m_localCenterA=new I,r.m_localCenterB=new I,r.m_invMassA=0,r.m_invMassB=0,r.m_invIA=0,r.m_invIB=0,r.m_mass=0,r.m_state=t.b2LimitState.e_inactiveLimit,r.m_qA=new F,r.m_qB=new F,r.m_lalcA=new I,r.m_lalcB=new I,r.m_localAnchorA.Copy(e(n.localAnchorA,new I(-1,0))),r.m_localAnchorB.Copy(e(n.localAnchorB,new I(1,0))),r.m_maxLength=e(n.maxLength,0),r}return ti(n,i),n.prototype.InitVelocityConstraints=function(e){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var i=e.positions[this.m_indexA].c,r=e.positions[this.m_indexA].a,s=e.velocities[this.m_indexA].v,a=e.velocities[this.m_indexA].w,o=e.positions[this.m_indexB].c,c=e.positions[this.m_indexB].a,h=e.velocities[this.m_indexB].v,u=e.velocities[this.m_indexB].w,_=this.m_qA.SetAngle(r),f=this.m_qB.SetAngle(c);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA),F.MulRV(_,this.m_lalcA,this.m_rA),I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB),F.MulRV(f,this.m_lalcB,this.m_rB),this.m_u.Copy(o).SelfAdd(this.m_rB).SelfSub(i).SelfSub(this.m_rA),this.m_length=this.m_u.Length();var d=this.m_length-this.m_maxLength;if(this.m_state=d>0?t.b2LimitState.e_atUpperLimit:t.b2LimitState.e_inactiveLimit,!(this.m_length>l))return this.m_u.SetZero(),this.m_mass=0,void(this.m_impulse=0);this.m_u.SelfMul(1/this.m_length);var p=I.CrossVV(this.m_rA,this.m_u),m=I.CrossVV(this.m_rB,this.m_u),y=this.m_invMassA+this.m_invIA*p*p+this.m_invMassB+this.m_invIB*m*m;if(this.m_mass=0!==y?1/y:0,e.step.warmStarting){this.m_impulse*=e.step.dtRatio;var v=I.MulSV(this.m_impulse,this.m_u,n.InitVelocityConstraints_s_P);s.SelfMulSub(this.m_invMassA,v),a-=this.m_invIA*I.CrossVV(this.m_rA,v),h.SelfMulAdd(this.m_invMassB,v),u+=this.m_invIB*I.CrossVV(this.m_rB,v)}else this.m_impulse=0;e.velocities[this.m_indexA].w=a,e.velocities[this.m_indexB].w=u},n.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexA].v,i=t.velocities[this.m_indexA].w,r=t.velocities[this.m_indexB].v,s=t.velocities[this.m_indexB].w,a=I.AddVCrossSV(e,i,this.m_rA,n.SolveVelocityConstraints_s_vpA),o=I.AddVCrossSV(r,s,this.m_rB,n.SolveVelocityConstraints_s_vpB),l=this.m_length-this.m_maxLength,c=I.DotVV(this.m_u,I.SubVV(o,a,I.s_t0));l<0&&(c+=t.step.inv_dt*l);var h=-this.m_mass*c,u=this.m_impulse;this.m_impulse=y(0,this.m_impulse+h),h=this.m_impulse-u;var _=I.MulSV(h,this.m_u,n.SolveVelocityConstraints_s_P);e.SelfMulSub(this.m_invMassA,_),i-=this.m_invIA*I.CrossVV(this.m_rA,_),r.SelfMulAdd(this.m_invMassB,_),s+=this.m_invIB*I.CrossVV(this.m_rB,_),t.velocities[this.m_indexA].w=i,t.velocities[this.m_indexB].w=s},n.prototype.SolvePositionConstraints=function(t){var e=t.positions[this.m_indexA].c,i=t.positions[this.m_indexA].a,r=t.positions[this.m_indexB].c,s=t.positions[this.m_indexB].a,a=this.m_qA.SetAngle(i),o=this.m_qB.SetAngle(s);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var c=F.MulRV(a,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var h=F.MulRV(o,this.m_lalcB,this.m_rB),u=this.m_u.Copy(r).SelfAdd(h).SelfSub(e).SelfSub(c),_=u.Normalize(),f=_-this.m_maxLength;f=g(f,0,.2);var d=-this.m_mass*f,p=I.MulSV(d,u,n.SolvePositionConstraints_s_P);return e.SelfMulSub(this.m_invMassA,p),i-=this.m_invIA*I.CrossVV(c,p),r.SelfMulAdd(this.m_invMassB,p),s+=this.m_invIB*I.CrossVV(h,p),t.positions[this.m_indexA].a=i,t.positions[this.m_indexB].a=s,_-this.m_maxLength0){p.GetInverse22(this.m_mass);var m=f+d,y=m>0?1/m:0,v=a-e-this.m_referenceAngle,g=2*s*this.m_frequencyHz,b=2*y*this.m_dampingRatio*g,A=y*g*g,x=t.step.dt;this.m_gamma=x*(b+x*A),this.m_gamma=0!==this.m_gamma?1/this.m_gamma:0,this.m_bias=v*x*A*this.m_gamma,m+=this.m_gamma,this.m_mass.ez.z=0!==m?1/m:0}else p.GetSymInverse33(this.m_mass),this.m_gamma=0,this.m_bias=0;if(t.step.warmStarting){this.m_impulse.SelfMul(t.step.dtRatio);var C=i.InitVelocityConstraints_s_P.Set(this.m_impulse.x,this.m_impulse.y);n.SelfMulSub(u,C),r-=f*(I.CrossVV(this.m_rA,C)+this.m_impulse.z),o.SelfMulAdd(_,C),l+=d*(I.CrossVV(this.m_rB,C)+this.m_impulse.z)}else this.m_impulse.SetZero();t.velocities[this.m_indexA].w=r,t.velocities[this.m_indexB].w=l},i.prototype.SolveVelocityConstraints=function(t){var e=t.velocities[this.m_indexA].v,n=t.velocities[this.m_indexA].w,r=t.velocities[this.m_indexB].v,s=t.velocities[this.m_indexB].w,a=this.m_invMassA,o=this.m_invMassB,l=this.m_invIA,c=this.m_invIB;if(this.m_frequencyHz>0){var h=s-n,u=-this.m_mass.ez.z*(h+this.m_bias+this.m_gamma*this.m_impulse.z);this.m_impulse.z+=u,n-=l*u,s+=c*u;var _=I.SubVV(I.AddVCrossSV(r,s,this.m_rB,I.s_t0),I.AddVCrossSV(e,n,this.m_rA,I.s_t1),i.SolveVelocityConstraints_s_Cdot1),f=L.MulM33XY(this.m_mass,_.x,_.y,i.SolveVelocityConstraints_s_impulse1).SelfNeg();this.m_impulse.x+=f.x,this.m_impulse.y+=f.y;var d=f;e.SelfMulSub(a,d),n-=l*I.CrossVV(this.m_rA,d),r.SelfMulAdd(o,d),s+=c*I.CrossVV(this.m_rB,d)}else{_=I.SubVV(I.AddVCrossSV(r,s,this.m_rB,I.s_t0),I.AddVCrossSV(e,n,this.m_rA,I.s_t1),i.SolveVelocityConstraints_s_Cdot1),h=s-n;var p=L.MulM33XYZ(this.m_mass,_.x,_.y,h,i.SolveVelocityConstraints_s_impulse).SelfNeg();this.m_impulse.SelfAdd(p),d=i.SolveVelocityConstraints_s_P.Set(p.x,p.y),e.SelfMulSub(a,d),n-=l*(I.CrossVV(this.m_rA,d)+p.z),r.SelfMulAdd(o,d),s+=c*(I.CrossVV(this.m_rB,d)+p.z)}t.velocities[this.m_indexA].w=n,t.velocities[this.m_indexB].w=s},i.prototype.SolvePositionConstraints=function(t){var e=t.positions[this.m_indexA].c,n=t.positions[this.m_indexA].a,r=t.positions[this.m_indexB].c,s=t.positions[this.m_indexB].a,a=this.m_qA.SetAngle(n),o=this.m_qB.SetAngle(s),h=this.m_invMassA,u=this.m_invMassB,_=this.m_invIA,f=this.m_invIB;I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var d=F.MulRV(a,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var p,y,v=F.MulRV(o,this.m_lalcB,this.m_rB),g=this.m_K;if(g.ex.x=h+u+d.y*d.y*_+v.y*v.y*f,g.ey.x=-d.y*d.x*_-v.y*v.x*f,g.ez.x=-d.y*_-v.y*f,g.ex.y=g.ey.x,g.ey.y=h+u+d.x*d.x*_+v.x*v.x*f,g.ez.y=d.x*_+v.x*f,g.ex.z=g.ez.x,g.ey.z=g.ez.y,g.ez.z=_+f,this.m_frequencyHz>0){p=(A=I.SubVV(I.AddVV(r,v,I.s_t0),I.AddVV(e,d,I.s_t1),i.SolvePositionConstraints_s_C1)).Length(),y=0;var b=g.Solve22(A.x,A.y,i.SolvePositionConstraints_s_P).SelfNeg();e.SelfMulSub(h,b),n-=_*I.CrossVV(d,b),r.SelfMulAdd(u,b),s+=f*I.CrossVV(v,b)}else{var A=I.SubVV(I.AddVV(r,v,I.s_t0),I.AddVV(e,d,I.s_t1),i.SolvePositionConstraints_s_C1),x=s-n-this.m_referenceAngle;p=A.Length(),y=m(x);var C=g.Solve33(A.x,A.y,x,i.SolvePositionConstraints_s_impulse).SelfNeg();b=i.SolvePositionConstraints_s_P.Set(C.x,C.y),e.SelfMulSub(h,b),n-=_*(I.CrossVV(this.m_rA,b)+C.z),r.SelfMulAdd(u,b),s+=f*(I.CrossVV(this.m_rB,b)+C.z)}return t.positions[this.m_indexA].a=n,t.positions[this.m_indexB].a=s,p<=l&&y<=c},i.prototype.GetAnchorA=function(t){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,t)},i.prototype.GetAnchorB=function(t){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,t)},i.prototype.GetReactionForce=function(t,e){return e.x=t*this.m_impulse.x,e.y=t*this.m_impulse.y,e},i.prototype.GetReactionTorque=function(t){return t*this.m_impulse.z},i.prototype.GetLocalAnchorA=function(){return this.m_localAnchorA},i.prototype.GetLocalAnchorB=function(){return this.m_localAnchorB},i.prototype.GetReferenceAngle=function(){return this.m_referenceAngle},i.prototype.SetFrequency=function(t){this.m_frequencyHz=t},i.prototype.GetFrequency=function(){return this.m_frequencyHz},i.prototype.SetDampingRatio=function(t){this.m_dampingRatio=t},i.prototype.GetDampingRatio=function(){return this.m_dampingRatio},i.prototype.Dump=function(t){var e=this.m_bodyA.m_islandIndex,i=this.m_bodyB.m_islandIndex;t(" const jd: b2WeldJointDef = new b2WeldJointDef();\n"),t(" jd.bodyA = bodies[%d];\n",e),t(" jd.bodyB = bodies[%d];\n",i),t(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),t(" jd.localAnchorA.Set(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),t(" jd.localAnchorB.Set(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),t(" jd.referenceAngle = %.15f;\n",this.m_referenceAngle),t(" jd.frequencyHz = %.15f;\n",this.m_frequencyHz),t(" jd.dampingRatio = %.15f;\n",this.m_dampingRatio),t(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)},i.InitVelocityConstraints_s_P=new I,i.SolveVelocityConstraints_s_Cdot1=new I,i.SolveVelocityConstraints_s_impulse1=new I,i.SolveVelocityConstraints_s_impulse=new R,i.SolveVelocityConstraints_s_P=new I,i.SolvePositionConstraints_s_C1=new I,i.SolvePositionConstraints_s_P=new I,i.SolvePositionConstraints_s_impulse=new R,i})(mi),ki=(function(e){function i(){var i=e.call(this,t.b2JointType.e_wheelJoint)||this;return i.localAnchorA=new I(0,0),i.localAnchorB=new I(0,0),i.localAxisA=new I(1,0),i.enableMotor=!1,i.maxMotorTorque=0,i.motorSpeed=0,i.frequencyHz=2,i.dampingRatio=.7,i}return ti(i,e),i.prototype.Initialize=function(t,e,i,n){this.bodyA=t,this.bodyB=e,this.bodyA.GetLocalPoint(i,this.localAnchorA),this.bodyB.GetLocalPoint(i,this.localAnchorB),this.bodyA.GetLocalVector(n,this.localAxisA)},i})(pi),zi=(function(t){function i(i){var n=t.call(this,i)||this;return n.m_frequencyHz=0,n.m_dampingRatio=0,n.m_localAnchorA=new I,n.m_localAnchorB=new I,n.m_localXAxisA=new I,n.m_localYAxisA=new I,n.m_impulse=0,n.m_motorImpulse=0,n.m_springImpulse=0,n.m_maxMotorTorque=0,n.m_motorSpeed=0,n.m_enableMotor=!1,n.m_indexA=0,n.m_indexB=0,n.m_localCenterA=new I,n.m_localCenterB=new I,n.m_invMassA=0,n.m_invMassB=0,n.m_invIA=0,n.m_invIB=0,n.m_ax=new I,n.m_ay=new I,n.m_sAx=0,n.m_sBx=0,n.m_sAy=0,n.m_sBy=0,n.m_mass=0,n.m_motorMass=0,n.m_springMass=0,n.m_bias=0,n.m_gamma=0,n.m_qA=new F,n.m_qB=new F,n.m_lalcA=new I,n.m_lalcB=new I,n.m_rA=new I,n.m_rB=new I,n.m_frequencyHz=e(i.frequencyHz,2),n.m_dampingRatio=e(i.dampingRatio,.7),n.m_localAnchorA.Copy(e(i.localAnchorA,I.ZERO)),n.m_localAnchorB.Copy(e(i.localAnchorB,I.ZERO)),n.m_localXAxisA.Copy(e(i.localAxisA,I.UNITX)),I.CrossOneV(n.m_localXAxisA,n.m_localYAxisA),n.m_maxMotorTorque=e(i.maxMotorTorque,0),n.m_motorSpeed=e(i.motorSpeed,0),n.m_enableMotor=e(i.enableMotor,!1),n.m_ax.SetZero(),n.m_ay.SetZero(),n}return ti(i,t),i.prototype.GetMotorSpeed=function(){return this.m_motorSpeed},i.prototype.GetMaxMotorTorque=function(){return this.m_maxMotorTorque},i.prototype.SetSpringFrequencyHz=function(t){this.m_frequencyHz=t},i.prototype.GetSpringFrequencyHz=function(){return this.m_frequencyHz},i.prototype.SetSpringDampingRatio=function(t){this.m_dampingRatio=t},i.prototype.GetSpringDampingRatio=function(){return this.m_dampingRatio},i.prototype.InitVelocityConstraints=function(t){this.m_indexA=this.m_bodyA.m_islandIndex,this.m_indexB=this.m_bodyB.m_islandIndex,this.m_localCenterA.Copy(this.m_bodyA.m_sweep.localCenter),this.m_localCenterB.Copy(this.m_bodyB.m_sweep.localCenter),this.m_invMassA=this.m_bodyA.m_invMass,this.m_invMassB=this.m_bodyB.m_invMass,this.m_invIA=this.m_bodyA.m_invI,this.m_invIB=this.m_bodyB.m_invI;var e=this.m_invMassA,n=this.m_invMassB,r=this.m_invIA,a=this.m_invIB,o=t.positions[this.m_indexA].c,l=t.positions[this.m_indexA].a,c=t.velocities[this.m_indexA].v,h=t.velocities[this.m_indexA].w,u=t.positions[this.m_indexB].c,_=t.positions[this.m_indexB].a,f=t.velocities[this.m_indexB].v,d=t.velocities[this.m_indexB].w,p=this.m_qA.SetAngle(l),m=this.m_qB.SetAngle(_);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var y=F.MulRV(p,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var v=F.MulRV(m,this.m_lalcB,this.m_rB),g=I.SubVV(I.AddVV(u,v,I.s_t0),I.AddVV(o,y,I.s_t1),i.InitVelocityConstraints_s_d);if(F.MulRV(p,this.m_localYAxisA,this.m_ay),this.m_sAy=I.CrossVV(I.AddVV(g,y,I.s_t0),this.m_ay),this.m_sBy=I.CrossVV(v,this.m_ay),this.m_mass=e+n+r*this.m_sAy*this.m_sAy+a*this.m_sBy*this.m_sBy,this.m_mass>0&&(this.m_mass=1/this.m_mass),this.m_springMass=0,this.m_bias=0,this.m_gamma=0,this.m_frequencyHz>0){F.MulRV(p,this.m_localXAxisA,this.m_ax),this.m_sAx=I.CrossVV(I.AddVV(g,y,I.s_t0),this.m_ax),this.m_sBx=I.CrossVV(v,this.m_ax);var b=e+n+r*this.m_sAx*this.m_sAx+a*this.m_sBx*this.m_sBx;if(b>0){this.m_springMass=1/b;var A=I.DotVV(g,this.m_ax),x=2*s*this.m_frequencyHz,C=2*this.m_springMass*this.m_dampingRatio*x,T=this.m_springMass*x*x,S=t.step.dt;this.m_gamma=S*(C+S*T),this.m_gamma>0&&(this.m_gamma=1/this.m_gamma),this.m_bias=A*S*T*this.m_gamma,this.m_springMass=b+this.m_gamma,this.m_springMass>0&&(this.m_springMass=1/this.m_springMass)}}else this.m_springImpulse=0;if(this.m_enableMotor?(this.m_motorMass=r+a,this.m_motorMass>0&&(this.m_motorMass=1/this.m_motorMass)):(this.m_motorMass=0,this.m_motorImpulse=0),t.step.warmStarting){this.m_impulse*=t.step.dtRatio,this.m_springImpulse*=t.step.dtRatio,this.m_motorImpulse*=t.step.dtRatio;var w=I.AddVV(I.MulSV(this.m_impulse,this.m_ay,I.s_t0),I.MulSV(this.m_springImpulse,this.m_ax,I.s_t1),i.InitVelocityConstraints_s_P),E=this.m_impulse*this.m_sAy+this.m_springImpulse*this.m_sAx+this.m_motorImpulse,M=this.m_impulse*this.m_sBy+this.m_springImpulse*this.m_sBx+this.m_motorImpulse;c.SelfMulSub(this.m_invMassA,w),h-=this.m_invIA*E,f.SelfMulAdd(this.m_invMassB,w),d+=this.m_invIB*M}else this.m_impulse=0,this.m_springImpulse=0,this.m_motorImpulse=0;t.velocities[this.m_indexA].w=h,t.velocities[this.m_indexB].w=d},i.prototype.SolveVelocityConstraints=function(t){var e=this.m_invMassA,n=this.m_invMassB,r=this.m_invIA,s=this.m_invIB,a=t.velocities[this.m_indexA].v,o=t.velocities[this.m_indexA].w,l=t.velocities[this.m_indexB].v,c=t.velocities[this.m_indexB].w,h=I.DotVV(this.m_ax,I.SubVV(l,a,I.s_t0))+this.m_sBx*c-this.m_sAx*o,u=-this.m_springMass*(h+this.m_bias+this.m_gamma*this.m_springImpulse);this.m_springImpulse+=u;var _=I.MulSV(u,this.m_ax,i.SolveVelocityConstraints_s_P),f=u*this.m_sAx,d=u*this.m_sBx;a.SelfMulSub(e,_),o-=r*f,l.SelfMulAdd(n,_),h=(c+=s*d)-o-this.m_motorSpeed,u=-this.m_motorMass*h;var p=this.m_motorImpulse,m=t.step.dt*this.m_maxMotorTorque;this.m_motorImpulse=g(this.m_motorImpulse+u,-m,m),o-=r*(u=this.m_motorImpulse-p),c+=s*u,h=I.DotVV(this.m_ay,I.SubVV(l,a,I.s_t0))+this.m_sBy*c-this.m_sAy*o,u=-this.m_mass*h,this.m_impulse+=u,_=I.MulSV(u,this.m_ay,i.SolveVelocityConstraints_s_P),f=u*this.m_sAy,d=u*this.m_sBy,a.SelfMulSub(e,_),o-=r*f,l.SelfMulAdd(n,_),c+=s*d,t.velocities[this.m_indexA].w=o,t.velocities[this.m_indexB].w=c},i.prototype.SolvePositionConstraints=function(t){var e=t.positions[this.m_indexA].c,n=t.positions[this.m_indexA].a,r=t.positions[this.m_indexB].c,s=t.positions[this.m_indexB].a,a=this.m_qA.SetAngle(n),o=this.m_qB.SetAngle(s);I.SubVV(this.m_localAnchorA,this.m_localCenterA,this.m_lalcA);var c=F.MulRV(a,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,this.m_localCenterB,this.m_lalcB);var h,u=F.MulRV(o,this.m_lalcB,this.m_rB),_=I.AddVV(I.SubVV(r,e,I.s_t0),I.SubVV(u,c,I.s_t1),i.SolvePositionConstraints_s_d),f=F.MulRV(a,this.m_localYAxisA,this.m_ay),d=I.CrossVV(I.AddVV(_,c,I.s_t0),f),p=I.CrossVV(u,f),y=I.DotVV(_,this.m_ay),v=this.m_invMassA+this.m_invMassB+this.m_invIA*this.m_sAy*this.m_sAy+this.m_invIB*this.m_sBy*this.m_sBy;h=0!==v?-y/v:0;var g=I.MulSV(h,f,i.SolvePositionConstraints_s_P),b=h*d,A=h*p;return e.SelfMulSub(this.m_invMassA,g),n-=this.m_invIA*b,r.SelfMulAdd(this.m_invMassB,g),s+=this.m_invIB*A,t.positions[this.m_indexA].a=n,t.positions[this.m_indexB].a=s,m(y)<=l},i.prototype.GetDefinition=function(t){return t},i.prototype.GetAnchorA=function(t){return this.m_bodyA.GetWorldPoint(this.m_localAnchorA,t)},i.prototype.GetAnchorB=function(t){return this.m_bodyB.GetWorldPoint(this.m_localAnchorB,t)},i.prototype.GetReactionForce=function(t,e){return e.x=t*(this.m_impulse*this.m_ay.x+this.m_springImpulse*this.m_ax.x),e.y=t*(this.m_impulse*this.m_ay.y+this.m_springImpulse*this.m_ax.y),e},i.prototype.GetReactionTorque=function(t){return t*this.m_motorImpulse},i.prototype.GetLocalAnchorA=function(){return this.m_localAnchorA},i.prototype.GetLocalAnchorB=function(){return this.m_localAnchorB},i.prototype.GetLocalAxisA=function(){return this.m_localXAxisA},i.prototype.GetJointTranslation=function(){return this.GetPrismaticJointTranslation()},i.prototype.GetJointLinearSpeed=function(){return this.GetPrismaticJointSpeed()},i.prototype.GetJointAngle=function(){return this.GetRevoluteJointAngle()},i.prototype.GetJointAngularSpeed=function(){return this.GetRevoluteJointSpeed()},i.prototype.GetPrismaticJointTranslation=function(){var t=this.m_bodyA,e=this.m_bodyB,i=t.GetWorldPoint(this.m_localAnchorA,new I),n=e.GetWorldPoint(this.m_localAnchorB,new I),r=I.SubVV(n,i,new I),s=t.GetWorldVector(this.m_localXAxisA,new I);return I.DotVV(r,s)},i.prototype.GetPrismaticJointSpeed=function(){var t=this.m_bodyA,e=this.m_bodyB;I.SubVV(this.m_localAnchorA,t.m_sweep.localCenter,this.m_lalcA);var i=F.MulRV(t.m_xf.q,this.m_lalcA,this.m_rA);I.SubVV(this.m_localAnchorB,e.m_sweep.localCenter,this.m_lalcB);var n=F.MulRV(e.m_xf.q,this.m_lalcB,this.m_rB),r=I.AddVV(t.m_sweep.c,i,I.s_t0),s=I.AddVV(e.m_sweep.c,n,I.s_t1),a=I.SubVV(s,r,I.s_t2),o=t.GetWorldVector(this.m_localXAxisA,new I),l=t.m_linearVelocity,c=e.m_linearVelocity,h=t.m_angularVelocity,u=e.m_angularVelocity;return I.DotVV(a,I.CrossSV(h,o,I.s_t0))+I.DotVV(o,I.SubVV(I.AddVCrossSV(c,u,n,I.s_t0),I.AddVCrossSV(l,h,i,I.s_t1),I.s_t0))},i.prototype.GetRevoluteJointAngle=function(){return this.m_bodyB.m_sweep.a-this.m_bodyA.m_sweep.a},i.prototype.GetRevoluteJointSpeed=function(){var t=this.m_bodyA.m_angularVelocity;return this.m_bodyB.m_angularVelocity-t},i.prototype.IsMotorEnabled=function(){return this.m_enableMotor},i.prototype.EnableMotor=function(t){t!==this.m_enableMotor&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_enableMotor=t)},i.prototype.SetMotorSpeed=function(t){t!==this.m_motorSpeed&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_motorSpeed=t)},i.prototype.SetMaxMotorTorque=function(t){t!==this.m_maxMotorTorque&&(this.m_bodyA.SetAwake(!0),this.m_bodyB.SetAwake(!0),this.m_maxMotorTorque=t)},i.prototype.GetMotorTorque=function(t){return t*this.m_motorImpulse},i.prototype.Dump=function(t){var e=this.m_bodyA.m_islandIndex,i=this.m_bodyB.m_islandIndex;t(" const jd: b2WheelJointDef = new b2WheelJointDef();\n"),t(" jd.bodyA = bodies[%d];\n",e),t(" jd.bodyB = bodies[%d];\n",i),t(" jd.collideConnected = %s;\n",this.m_collideConnected?"true":"false"),t(" jd.localAnchorA.Set(%.15f, %.15f);\n",this.m_localAnchorA.x,this.m_localAnchorA.y),t(" jd.localAnchorB.Set(%.15f, %.15f);\n",this.m_localAnchorB.x,this.m_localAnchorB.y),t(" jd.localAxisA.Set(%.15f, %.15f);\n",this.m_localXAxisA.x,this.m_localXAxisA.y),t(" jd.enableMotor = %s;\n",this.m_enableMotor?"true":"false"),t(" jd.motorSpeed = %.15f;\n",this.m_motorSpeed),t(" jd.maxMotorTorque = %.15f;\n",this.m_maxMotorTorque),t(" jd.frequencyHz = %.15f;\n",this.m_frequencyHz),t(" jd.dampingRatio = %.15f;\n",this.m_dampingRatio),t(" joints[%d] = this.m_world.CreateJoint(jd);\n",this.m_index)},i.InitVelocityConstraints_s_d=new I,i.InitVelocityConstraints_s_P=new I,i.SolveVelocityConstraints_s_P=new I,i.SolvePositionConstraints_s_d=new I,i.SolvePositionConstraints_s_P=new I,i})(mi);function Gi(t,e){return T(t*e)}function Ui(t,e){return t>e?t:e}var ji,Hi=function(t){this.prev=null,this.next=null,this.contact=t},Wi=(function(){function t(){this.m_islandFlag=!1,this.m_touchingFlag=!1,this.m_enabledFlag=!1,this.m_filterFlag=!1,this.m_bulletHitFlag=!1,this.m_toiFlag=!1,this.m_prev=null,this.m_next=null,this.m_indexA=0,this.m_indexB=0,this.m_manifold=new gt,this.m_toiCount=0,this.m_toi=0,this.m_friction=0,this.m_restitution=0,this.m_tangentSpeed=0,this.m_oldManifold=new gt,this.m_nodeA=new Hi(this),this.m_nodeB=new Hi(this)}return t.prototype.GetManifold=function(){return this.m_manifold},t.prototype.GetWorldManifold=function(t){var e=this.m_fixtureA.GetBody(),i=this.m_fixtureB.GetBody(),n=this.m_fixtureA.GetShape(),r=this.m_fixtureB.GetShape();t.Initialize(this.m_manifold,e.GetTransform(),n.m_radius,i.GetTransform(),r.m_radius)},t.prototype.IsTouching=function(){return this.m_touchingFlag},t.prototype.SetEnabled=function(t){this.m_enabledFlag=t},t.prototype.IsEnabled=function(){return this.m_enabledFlag},t.prototype.GetNext=function(){return this.m_next},t.prototype.GetFixtureA=function(){return this.m_fixtureA},t.prototype.GetChildIndexA=function(){return this.m_indexA},t.prototype.GetFixtureB=function(){return this.m_fixtureB},t.prototype.GetChildIndexB=function(){return this.m_indexB},t.prototype.FlagForFiltering=function(){this.m_filterFlag=!0},t.prototype.SetFriction=function(t){this.m_friction=t},t.prototype.GetFriction=function(){return this.m_friction},t.prototype.ResetFriction=function(){this.m_friction=Gi(this.m_fixtureA.m_friction,this.m_fixtureB.m_friction)},t.prototype.SetRestitution=function(t){this.m_restitution=t},t.prototype.GetRestitution=function(){return this.m_restitution},t.prototype.ResetRestitution=function(){this.m_restitution=Ui(this.m_fixtureA.m_restitution,this.m_fixtureB.m_restitution)},t.prototype.SetTangentSpeed=function(t){this.m_tangentSpeed=t},t.prototype.GetTangentSpeed=function(){return this.m_tangentSpeed},t.prototype.Reset=function(t,e,i,n){this.m_islandFlag=!1,this.m_touchingFlag=!1,this.m_enabledFlag=!0,this.m_filterFlag=!1,this.m_bulletHitFlag=!1,this.m_toiFlag=!1,this.m_fixtureA=t,this.m_fixtureB=i,this.m_indexA=e,this.m_indexB=n,this.m_manifold.pointCount=0,this.m_prev=null,this.m_next=null,delete this.m_nodeA.contact,this.m_nodeA.prev=null,this.m_nodeA.next=null,delete this.m_nodeA.other,delete this.m_nodeB.contact,this.m_nodeB.prev=null,this.m_nodeB.next=null,delete this.m_nodeB.other,this.m_toiCount=0,this.m_friction=Gi(this.m_fixtureA.m_friction,this.m_fixtureB.m_friction),this.m_restitution=Ui(this.m_fixtureA.m_restitution,this.m_fixtureB.m_restitution)},t.prototype.Update=function(t){var e=this.m_oldManifold;this.m_oldManifold=this.m_manifold,this.m_manifold=e,this.m_enabledFlag=!0;var i=!1,n=this.m_touchingFlag,r=this.m_fixtureA.IsSensor(),s=this.m_fixtureB.IsSensor(),a=r||s,o=this.m_fixtureA.GetBody(),l=this.m_fixtureB.GetBody(),c=o.GetTransform(),h=l.GetTransform();if(a){var u=this.m_fixtureA.GetShape(),_=this.m_fixtureB.GetShape();i=Bt(u,this.m_indexA,_,this.m_indexB,c,h),this.m_manifold.pointCount=0}else{this.Evaluate(this.m_manifold,c,h),i=this.m_manifold.pointCount>0;for(var f=0;f0&&!e.IsSensor()&&!i.IsSensor()&&(e.GetBody().SetAwake(!0),i.GetBody().SetAwake(!0));var n=e.GetType(),r=i.GetType(),s=this.m_registers[n][r];s.destroyFcn&&s.destroyFcn(t,this.m_allocator)},e})(),en=(function(){function t(){}return t.prototype.SayGoodbyeJoint=function(){},t.prototype.SayGoodbyeFixture=function(){},t.prototype.SayGoodbyeParticleGroup=function(){},t.prototype.SayGoodbyeParticle=function(){},t})(),nn=(function(){function e(){}return e.prototype.ShouldCollide=function(e,i){var n=e.GetBody(),r=i.GetBody();if(r.GetType()===t.b2BodyType.b2_staticBody&&n.GetType()===t.b2BodyType.b2_staticBody)return!1;if(!r.ShouldCollideConnected(n))return!1;var s=e.GetFilterData(),a=i.GetFilterData();return s.groupIndex===a.groupIndex&&0!==s.groupIndex?s.groupIndex>0:0!=(s.maskBits&a.categoryBits)&&0!=(s.categoryBits&a.maskBits)},e.prototype.ShouldCollideFixtureParticle=function(){return!0},e.prototype.ShouldCollideParticleParticle=function(){return!0},e.b2_defaultFilter=new e,e})(),rn=function(){this.normalImpulses=p(a),this.tangentImpulses=p(a),this.count=0},sn=(function(){function t(){}return t.prototype.BeginContact=function(){},t.prototype.EndContact=function(){},t.prototype.BeginContactFixtureParticle=function(){},t.prototype.EndContactFixtureParticle=function(){},t.prototype.BeginContactParticleParticle=function(){},t.prototype.EndContactParticleParticle=function(){},t.prototype.PreSolve=function(){},t.prototype.PostSolve=function(){},t.b2_defaultListener=new t,t})(),an=(function(){function t(){}return t.prototype.ReportFixture=function(){return!0},t.prototype.ReportParticle=function(){return!1},t.prototype.ShouldQueryParticleSystem=function(){return!0},t})(),on=(function(){function t(){}return t.prototype.ReportFixture=function(t,e,i,n){return n},t.prototype.ReportParticle=function(){return 0},t.prototype.ShouldQueryParticleSystem=function(){return!0},t})(),ln=(function(){function e(){this.m_broadPhase=new Lt,this.m_contactList=null,this.m_contactCount=0,this.m_contactFilter=nn.b2_defaultFilter,this.m_contactListener=sn.b2_defaultListener,this.m_allocator=null,this.m_contactFactory=new tn(this.m_allocator)}return e.prototype.AddPair=function(t,e){var i=t.fixture,n=e.fixture,r=t.childIndex,s=e.childIndex,a=i.GetBody(),o=n.GetBody();if(a!==o){for(var l=o.GetContactList();l;){if(l.other===a){var c=l.contact.GetFixtureA(),h=l.contact.GetFixtureB(),u=l.contact.GetChildIndexA(),_=l.contact.GetChildIndexB();if(c===i&&h===n&&u===r&&_===s)return;if(c===n&&h===i&&u===s&&_===r)return}l=l.next}if(!this.m_contactFilter||this.m_contactFilter.ShouldCollide(i,n)){var f=this.m_contactFactory.Create(i,r,n,s);null!==f&&(i=f.GetFixtureA(),n=f.GetFixtureB(),r=f.GetChildIndexA(),s=f.GetChildIndexB(),a=i.m_body,o=n.m_body,f.m_prev=null,f.m_next=this.m_contactList,null!==this.m_contactList&&(this.m_contactList.m_prev=f),this.m_contactList=f,f.m_nodeA.contact=f,f.m_nodeA.other=o,f.m_nodeA.prev=null,f.m_nodeA.next=a.m_contactList,null!==a.m_contactList&&(a.m_contactList.prev=f.m_nodeA),a.m_contactList=f.m_nodeA,f.m_nodeB.contact=f,f.m_nodeB.other=a,f.m_nodeB.prev=null,f.m_nodeB.next=o.m_contactList,null!==o.m_contactList&&(o.m_contactList.prev=f.m_nodeB),o.m_contactList=f.m_nodeB,i.IsSensor()||n.IsSensor()||(a.SetAwake(!0),o.SetAwake(!0)),++this.m_contactCount)}}},e.prototype.FindNewContacts=function(){var t=this;this.m_broadPhase.UpdatePairs((function(e,i){t.AddPair(e,i)}))},e.prototype.Destroy=function(t){var e=t.GetFixtureA(),i=t.GetFixtureB(),n=e.GetBody(),r=i.GetBody();this.m_contactListener&&t.IsTouching()&&this.m_contactListener.EndContact(t),t.m_prev&&(t.m_prev.m_next=t.m_next),t.m_next&&(t.m_next.m_prev=t.m_prev),t===this.m_contactList&&(this.m_contactList=t.m_next),t.m_nodeA.prev&&(t.m_nodeA.prev.next=t.m_nodeA.next),t.m_nodeA.next&&(t.m_nodeA.next.prev=t.m_nodeA.prev),t.m_nodeA===n.m_contactList&&(n.m_contactList=t.m_nodeA.next),t.m_nodeB.prev&&(t.m_nodeB.prev.next=t.m_nodeB.next),t.m_nodeB.next&&(t.m_nodeB.next.prev=t.m_nodeB.prev),t.m_nodeB===r.m_contactList&&(r.m_contactList=t.m_nodeB.next),this.m_contactFactory.Destroy(t),--this.m_contactCount},e.prototype.Collide=function(){for(var e=this.m_contactList;e;){var i=e.GetFixtureA(),n=e.GetFixtureB(),r=e.GetChildIndexA(),s=e.GetChildIndexB(),a=i.GetBody(),o=n.GetBody();if(e.m_filterFlag){if(this.m_contactFilter&&!this.m_contactFilter.ShouldCollide(i,n)){e=(h=e).m_next,this.Destroy(h);continue}e.m_filterFlag=!1}var l=a.IsAwake()&&a.m_type!==t.b2BodyType.b2_staticBody,c=o.IsAwake()&&o.m_type!==t.b2BodyType.b2_staticBody;if(l||c){var h,u=i.m_proxies[r].treeNode,_=n.m_proxies[s].treeNode;St(u.aabb,_.aabb)?(e.Update(this.m_contactListener),e=e.m_next):(e=(h=e).m_next,this.Destroy(h))}else e=e.m_next}},e})(),cn=(function(){function t(){this.step=0,this.collide=0,this.solve=0,this.solveInit=0,this.solveVelocity=0,this.solvePosition=0,this.broadphase=0,this.solveTOI=0}return t.prototype.Reset=function(){return this.step=0,this.collide=0,this.solve=0,this.solveInit=0,this.solveVelocity=0,this.solvePosition=0,this.broadphase=0,this.solveTOI=0,this},t})(),hn=(function(){function t(){this.dt=0,this.inv_dt=0,this.dtRatio=0,this.velocityIterations=0,this.positionIterations=0,this.particleIterations=0,this.warmStarting=!1}return t.prototype.Copy=function(t){return this.dt=t.dt,this.inv_dt=t.inv_dt,this.dtRatio=t.dtRatio,this.positionIterations=t.positionIterations,this.velocityIterations=t.velocityIterations,this.particleIterations=t.particleIterations,this.warmStarting=t.warmStarting,this},t})(),un=(function(){function t(){this.c=new I,this.a=0}return t.MakeArray=function(e){return d(e,(function(){return new t}))},t})(),_n=(function(){function t(){this.v=new I,this.w=0}return t.MakeArray=function(e){return d(e,(function(){return new t}))},t})(),fn=function(){this.step=new hn},dn=(function(){function t(){this.rA=new I,this.rB=new I,this.normalImpulse=0,this.tangentImpulse=0,this.normalMass=0,this.tangentMass=0,this.velocityBias=0}return t.MakeArray=function(e){return d(e,(function(){return new t}))},t})(),pn=(function(){function t(){this.points=dn.MakeArray(a),this.normal=new I,this.tangent=new I,this.normalMass=new O,this.K=new O,this.indexA=0,this.indexB=0,this.invMassA=0,this.invMassB=0,this.invIA=0,this.invIB=0,this.friction=0,this.restitution=0,this.tangentSpeed=0,this.pointCount=0,this.contactIndex=0}return t.MakeArray=function(e){return d(e,(function(){return new t}))},t})(),mn=(function(){function e(){this.localPoints=I.MakeArray(a),this.localNormal=new I,this.localPoint=new I,this.indexA=0,this.indexB=0,this.invMassA=0,this.invMassB=0,this.localCenterA=new I,this.localCenterB=new I,this.invIA=0,this.invIB=0,this.type=t.b2ManifoldType.e_unknown,this.radiusA=0,this.radiusB=0,this.pointCount=0}return e.MakeArray=function(t){return d(t,(function(){return new e}))},e})(),yn=function(){this.step=new hn,this.count=0,this.allocator=null},vn=(function(){function e(){this.normal=new I,this.point=new I,this.separation=0}return e.prototype.Initialize=function(i,n,r,s){var a=e.Initialize_s_pointA,o=e.Initialize_s_pointB,l=e.Initialize_s_planePoint,c=e.Initialize_s_clipPoint;switch(i.type){case t.b2ManifoldType.e_circles:V.MulXV(n,i.localPoint,a),V.MulXV(r,i.localPoints[0],o),I.SubVV(o,a,this.normal).SelfNormalize(),I.MidVV(a,o,this.point),this.separation=I.DotVV(I.SubVV(o,a,I.s_t0),this.normal)-i.radiusA-i.radiusB;break;case t.b2ManifoldType.e_faceA:F.MulRV(n.q,i.localNormal,this.normal),V.MulXV(n,i.localPoint,l),V.MulXV(r,i.localPoints[s],c),this.separation=I.DotVV(I.SubVV(c,l,I.s_t0),this.normal)-i.radiusA-i.radiusB,this.point.Copy(c);break;case t.b2ManifoldType.e_faceB:F.MulRV(r.q,i.localNormal,this.normal),V.MulXV(r,i.localPoint,l),V.MulXV(n,i.localPoints[s],c),this.separation=I.DotVV(I.SubVV(c,l,I.s_t0),this.normal)-i.radiusA-i.radiusB,this.point.Copy(c),this.normal.SelfNeg()}},e.Initialize_s_pointA=new I,e.Initialize_s_pointB=new I,e.Initialize_s_planePoint=new I,e.Initialize_s_clipPoint=new I,e})(),gn=(function(){function t(){this.m_step=new hn,this.m_allocator=null,this.m_positionConstraints=mn.MakeArray(1024),this.m_velocityConstraints=pn.MakeArray(1024),this.m_count=0}return t.prototype.Initialize=function(t){if(this.m_step.Copy(t.step),this.m_allocator=t.allocator,this.m_count=t.count,this.m_positionConstraints.length0?1/P:0;var R=s.tangent,O=I.CrossVV(M.rA,R),L=I.CrossVV(M.rB,R),V=_+f+d*O*O+p*L*L;M.tangentMass=V>0?1/V:0,M.velocityBias=0;var N=I.DotVV(s.normal,I.SubVV(I.AddVCrossSV(T,S,M.rB,I.s_t0),I.AddVCrossSV(b,A,M.rA,I.s_t1),I.s_t0));N<-1&&(M.velocityBias+=-s.restitution*N)}s.pointCount}},t.prototype.WarmStart=function(){for(var e=t.WarmStart_s_P,i=0;i0?-B/O:0;I.MulSV(L,E,a),x.SelfMulSub(d,a),C-=p*I.CrossVV(r,a),T.SelfMulAdd(v,a),S+=b*I.CrossVV(s,a)}this.m_positions[u].a=C,this.m_positions[_].a=S}return o>-3*l},t.prototype.SolveTOIPositionConstraints=function(e,i){for(var n=t.SolveTOIPositionConstraints_s_xfA,r=t.SolveTOIPositionConstraints_s_xfB,s=t.SolveTOIPositionConstraints_s_psm,a=t.SolveTOIPositionConstraints_s_rA,o=t.SolveTOIPositionConstraints_s_rB,c=t.SolveTOIPositionConstraints_s_P,h=0,u=0;u0?-R/V:0;I.MulSV(N,D,c),T.SelfMulSub(b,c),S-=A*I.CrossVV(a,c),w.SelfMulAdd(x,c),E+=C*I.CrossVV(o,c)}this.m_positions[f].a=S,this.m_positions[d].a=E}return h>=-1.5*l},t.InitializeVelocityConstraints_s_xfA=new V,t.InitializeVelocityConstraints_s_xfB=new V,t.InitializeVelocityConstraints_s_worldManifold=new bt,t.WarmStart_s_P=new I,t.SolveVelocityConstraints_s_dv=new I,t.SolveVelocityConstraints_s_dv1=new I,t.SolveVelocityConstraints_s_dv2=new I,t.SolveVelocityConstraints_s_P=new I,t.SolveVelocityConstraints_s_a=new I,t.SolveVelocityConstraints_s_b=new I,t.SolveVelocityConstraints_s_x=new I,t.SolveVelocityConstraints_s_d=new I,t.SolveVelocityConstraints_s_P1=new I,t.SolveVelocityConstraints_s_P2=new I,t.SolveVelocityConstraints_s_P1P2=new I,t.SolvePositionConstraints_s_xfA=new V,t.SolvePositionConstraints_s_xfB=new V,t.SolvePositionConstraints_s_psm=new vn,t.SolvePositionConstraints_s_rA=new I,t.SolvePositionConstraints_s_rB=new I,t.SolvePositionConstraints_s_P=new I,t.SolveTOIPositionConstraints_s_xfA=new V,t.SolveTOIPositionConstraints_s_xfB=new V,t.SolveTOIPositionConstraints_s_psm=new vn,t.SolveTOIPositionConstraints_s_rA=new I,t.SolveTOIPositionConstraints_s_rB=new I,t.SolveTOIPositionConstraints_s_P=new I,t})(),bn=(function(){function e(){this.m_allocator=null,this.m_bodies=[],this.m_contacts=[],this.m_joints=[],this.m_positions=un.MakeArray(1024),this.m_velocities=_n.MakeArray(1024),this.m_bodyCount=0,this.m_jointCount=0,this.m_contactCount=0,this.m_bodyCapacity=0,this.m_contactCapacity=0,this.m_jointCapacity=0}return e.prototype.Initialize=function(t,e,i,n,r){if(this.m_bodyCapacity=t,this.m_contactCapacity=e,this.m_jointCapacity=i,this.m_bodyCount=0,this.m_contactCount=0,this.m_jointCount=0,this.m_allocator=n,this.m_listener=r,this.m_positions.length4){var x=2/A.Length();_.SelfMul(x)}var C=l*f;C*C>2.4674011002726646&&(f*=x=1.570796326795/m(C)),b.x+=l*_.x,b.y+=l*_.y,u+=l*f,this.m_positions[c].a=u,this.m_velocities[c].w=f}o.Reset();var T=!1;for(c=0;c.0012184696791469947||I.DotVV(h.m_linearVelocity,h.m_linearVelocity)>1e-4?(h.m_sleepTime=0,D=0):(h.m_sleepTime+=l,D=y(D,h.m_sleepTime)));if(D>=.5&&T)for(c=0;c4){var d=2/f.Length();u.SelfMul(d)}var p=l*_;p*p>2.4674011002726646&&(_*=d=1.570796326795/m(p)),c.SelfMulAdd(l,u),h+=l*_,this.m_positions[r].a=h,this.m_velocities[r].w=_;var y=this.m_bodies[r];y.m_sweep.c.Copy(c),y.m_sweep.a=h,y.m_linearVelocity.Copy(u),y.m_angularVelocity=_,y.SynchronizeTransform()}this.Report(o.m_velocityConstraints)},e.prototype.Report=function(t){if(null!==this.m_listener)for(var i=0;i0){var r=1/this.m_mass;this.m_center.SelfMul(r),this.m_linearVelocity.SelfMul(r)}for(this.m_inertia=0,this.m_angularVelocity=0,n=this.m_firstIndex;n0&&(this.m_angularVelocity*=1/this.m_inertia),this.m_timestamp=this.m_system.m_timestamp}},e.GetLinearVelocityFromWorldPoint_s_t0=new I,e})(),En=(function(){function t(t){this.m_front=0,this.m_back=0,this.m_capacity=0,this.m_buffer=d(t,(function(){return null})),this.m_capacity=t}return t.prototype.Push=function(t){if(this.m_back>=this.m_capacity){for(var e=this.m_front;e=this.m_capacity&&(this.m_capacity>0?(this.m_buffer.concat(d(this.m_capacity,(function(){return null}))),this.m_capacity*=2):(this.m_buffer.concat(d(1,(function(){return null}))),this.m_capacity=1))}this.m_buffer[this.m_back]=t,this.m_back++},t.prototype.Pop=function(){this.m_buffer[this.m_front]=null,this.m_front++},t.prototype.Empty=function(){return this.m_front===this.m_back},t.prototype.Front=function(){var t=this.m_buffer[this.m_front];if(!t)throw new Error;return t},t})(),Mn=(function(){function t(e){this.m_generatorCapacity=0,this.m_generatorCount=0,this.m_countX=0,this.m_countY=0,this.m_diagram=[],this.m_generatorBuffer=d(e,(function(){return new t.Generator})),this.m_generatorCapacity=e}return t.prototype.AddGenerator=function(t,e,i){var n=this.m_generatorBuffer[this.m_generatorCount++];n.center.Copy(t),n.tag=e,n.necessary=i},t.prototype.Generate=function(e,n){for(var r=1/e,s=new I(+i,+i),a=new I(-i,-i),o=0,l=0;l=0&&u>=0&&h0&&c.Push(new t.Task(h-1,u,_-1,f)),u>0&&c.Push(new t.Task(h,u-1,_-this.m_countX,f)),hg*g+b*b&&(this.m_diagram[_]=m,h>0&&c.Push(new t.Task(h-1,u,_-1,m)),u>0&&c.Push(new t.Task(h,u-1,_-this.m_countX,m)),h=i)break;Dn(t,l,i)}}if(0===a)break;r=i,i=s[--a]}return t}function Pn(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=t.length-e),void 0===n&&(n=Bn),In(t,e,i,n)}function Rn(t,e,i){void 0===i&&(i=t.length);for(var n=0,r=0;r0;){var a=Math.floor(s/2),o=e+a;r(t[o],n)?(e=++o,s-=a+1):s=a}return e}function Ln(t,e,i,n,r){void 0===r&&(r=Bn);for(var s=i-e;s>0;){var a=Math.floor(s/2),o=e+a;r(n,t[o])?s=a:(e=++o,s-=a+1)}return e}function Fn(t,e,i,n){for(var r=i;e!==r;)Dn(t,e++,r++),r===n?r=i:e===i&&(i=r)}function Vn(t,e,i,n){if(e===i)return i;for(var r=e;++e!==i;)n(t[r],t[e])||Dn(t,++r,e);return++r}(function(t){t.Generator=function(){this.center=new I,this.tag=0,this.necessary=!1};t.Task=function(t,e,i,n){this.m_x=t,this.m_y=e,this.m_i=i,this.m_generator=n}})(Mn||(Mn={}));var Nn=(function(){function t(t){this.data=[],this.count=0,this.capacity=0,this.allocator=t}return t.prototype.Append=function(){return this.count>=this.capacity&&this.Grow(),this.count++},t.prototype.Reserve=function(t){if(!(this.capacity>=t)){for(var e=this.capacity;e=0;)this.ReportFixtureAndParticle(t,i,s);return!0},e.prototype.ReportParticle=function(){return!1},e.prototype.ReportFixtureAndParticle=function(){},e})(an),zn=(function(){function t(){this.indexA=0,this.indexB=0,this.weight=0,this.normal=new I,this.flags=0}return t.prototype.SetIndices=function(t,e){this.indexA=t,this.indexB=e},t.prototype.SetWeight=function(t){this.weight=t},t.prototype.SetNormal=function(t){this.normal.Copy(t)},t.prototype.SetFlags=function(t){this.flags=t},t.prototype.GetIndexA=function(){return this.indexA},t.prototype.GetIndexB=function(){return this.indexB},t.prototype.GetWeight=function(){return this.weight},t.prototype.GetNormal=function(){return this.normal},t.prototype.GetFlags=function(){return this.flags},t.prototype.IsEqual=function(t){return this.indexA===t.indexA&&this.indexB===t.indexB&&this.flags===t.flags&&this.weight===t.weight&&this.normal.x===t.normal.x&&this.normal.y===t.normal.y},t.prototype.IsNotEqual=function(t){return!this.IsEqual(t)},t.prototype.ApproximatelyEqual=function(t){return this.indexA===t.indexA&&this.indexB===t.indexB&&this.flags===t.flags&&m(this.weight-t.weight)<.01&&I.DistanceSquaredVV(this.normal,t.normal)<1e-4},t})(),Gn=function(){this.index=0,this.weight=0,this.normal=new I,this.mass=0},Un=function(){this.indexA=0,this.indexB=0,this.flags=0,this.strength=0,this.distance=0},jn=function(){this.indexA=0,this.indexB=0,this.indexC=0,this.flags=0,this.strength=0,this.pa=new I(0,0),this.pb=new I(0,0),this.pc=new I(0,0),this.ka=0,this.kb=0,this.kc=0,this.s=0},Hn=(function(){function t(){this.strictContactCheck=!1,this.density=1,this.gravityScale=1,this.radius=1,this.maxCount=0,this.pressureStrength=.005,this.dampingStrength=1,this.elasticStrength=.25,this.springStrength=.25,this.viscousStrength=.25,this.surfaceTensionPressureStrength=.2,this.surfaceTensionNormalStrength=.2,this.repulsiveStrength=1,this.powderStrength=.5,this.ejectionStrength=.5,this.staticPressureStrength=.2,this.staticPressureRelaxation=.2,this.staticPressureIterations=8,this.colorMixingStrength=.5,this.destroyByAge=!0,this.lifetimeGranularity=1/60}return t.prototype.Copy=function(t){return this.strictContactCheck=t.strictContactCheck,this.density=t.density,this.gravityScale=t.gravityScale,this.radius=t.radius,this.maxCount=t.maxCount,this.pressureStrength=t.pressureStrength,this.dampingStrength=t.dampingStrength,this.elasticStrength=t.elasticStrength,this.springStrength=t.springStrength,this.viscousStrength=t.viscousStrength,this.surfaceTensionPressureStrength=t.surfaceTensionPressureStrength,this.surfaceTensionNormalStrength=t.surfaceTensionNormalStrength,this.repulsiveStrength=t.repulsiveStrength,this.powderStrength=t.powderStrength,this.ejectionStrength=t.ejectionStrength,this.staticPressureStrength=t.staticPressureStrength,this.staticPressureRelaxation=t.staticPressureRelaxation,this.staticPressureIterations=t.staticPressureIterations,this.colorMixingStrength=t.colorMixingStrength,this.destroyByAge=t.destroyByAge,this.lifetimeGranularity=t.lifetimeGranularity,this},t.prototype.Clone=function(){return(new t).Copy(this)},t})();t.b2ParticleSystem=(function(){function n(t,e){this.m_paused=!1,this.m_timestamp=0,this.m_allParticleFlags=0,this.m_needsUpdateAllParticleFlags=!1,this.m_allGroupFlags=0,this.m_needsUpdateAllGroupFlags=!1,this.m_hasForce=!1,this.m_iterationIndex=0,this.m_inverseDensity=0,this.m_particleDiameter=0,this.m_inverseDiameter=0,this.m_squaredDiameter=0,this.m_count=0,this.m_internalAllocatedCapacity=0,this.m_handleIndexBuffer=new n.UserOverridableBuffer,this.m_flagsBuffer=new n.UserOverridableBuffer,this.m_positionBuffer=new n.UserOverridableBuffer,this.m_velocityBuffer=new n.UserOverridableBuffer,this.m_forceBuffer=[],this.m_weightBuffer=[],this.m_staticPressureBuffer=[],this.m_accumulationBuffer=[],this.m_accumulation2Buffer=[],this.m_depthBuffer=[],this.m_colorBuffer=new n.UserOverridableBuffer,this.m_groupBuffer=[],this.m_userDataBuffer=new n.UserOverridableBuffer,this.m_stuckThreshold=0,this.m_lastBodyContactStepBuffer=new n.UserOverridableBuffer,this.m_bodyContactCountBuffer=new n.UserOverridableBuffer,this.m_consecutiveContactStepsBuffer=new n.UserOverridableBuffer,this.m_stuckParticleBuffer=new Nn(function(){return 0}),this.m_proxyBuffer=new Nn(function(){return new n.Proxy}),this.m_contactBuffer=new Nn(function(){return new zn}),this.m_bodyContactBuffer=new Nn(function(){return new Gn}),this.m_pairBuffer=new Nn(function(){return new Un}),this.m_triadBuffer=new Nn(function(){return new jn}),this.m_expirationTimeBuffer=new n.UserOverridableBuffer,this.m_indexByExpirationTimeBuffer=new n.UserOverridableBuffer,this.m_timeElapsed=0,this.m_expirationTimeBufferRequiresSorting=!1,this.m_groupCount=0,this.m_groupList=null,this.m_def=new Hn,this.m_prev=null,this.m_next=null,this.SetStrictContactCheck(t.strictContactCheck),this.SetDensity(t.density),this.SetGravityScale(t.gravityScale),this.SetRadius(t.radius),this.SetMaxParticleCount(t.maxCount),this.m_def=t.Clone(),this.m_world=e,this.SetDestructionByAge(this.m_def.destroyByAge)}return n.computeTag=function(t,e){return(e+n.yOffset>>>0<>>0)>>>0},n.computeRelativeTag=function(t,e,i){return t+(i<>>0},n.prototype.Drop=function(){for(;this.m_groupList;)this.DestroyParticleGroup(this.m_groupList);this.FreeUserOverridableBuffer(this.m_handleIndexBuffer),this.FreeUserOverridableBuffer(this.m_flagsBuffer),this.FreeUserOverridableBuffer(this.m_lastBodyContactStepBuffer),this.FreeUserOverridableBuffer(this.m_bodyContactCountBuffer),this.FreeUserOverridableBuffer(this.m_consecutiveContactStepsBuffer),this.FreeUserOverridableBuffer(this.m_positionBuffer),this.FreeUserOverridableBuffer(this.m_velocityBuffer),this.FreeUserOverridableBuffer(this.m_colorBuffer),this.FreeUserOverridableBuffer(this.m_userDataBuffer),this.FreeUserOverridableBuffer(this.m_expirationTimeBuffer),this.FreeUserOverridableBuffer(this.m_indexByExpirationTimeBuffer),this.FreeBuffer(this.m_forceBuffer,this.m_internalAllocatedCapacity),this.FreeBuffer(this.m_weightBuffer,this.m_internalAllocatedCapacity),this.FreeBuffer(this.m_staticPressureBuffer,this.m_internalAllocatedCapacity),this.FreeBuffer(this.m_accumulationBuffer,this.m_internalAllocatedCapacity),this.FreeBuffer(this.m_accumulation2Buffer,this.m_internalAllocatedCapacity),this.FreeBuffer(this.m_depthBuffer,this.m_internalAllocatedCapacity),this.FreeBuffer(this.m_groupBuffer,this.m_internalAllocatedCapacity)},n.prototype.CreateParticle=function(t){if(this.m_world.IsLocked())throw new Error;if(this.m_count>=this.m_internalAllocatedCapacity){var i=this.m_count?2*this.m_count:256;this.ReallocateInternalAllocatedBuffers(i)}if(this.m_count>=this.m_internalAllocatedCapacity){if(!this.m_def.destroyByAge)return u;this.DestroyOldestParticle(0,!1),this.SolveZombie()}var n=this.m_count++;if(!this.m_flagsBuffer.data)throw new Error;if(this.m_flagsBuffer.data[n]=0,this.m_lastBodyContactStepBuffer.data&&(this.m_lastBodyContactStepBuffer.data[n]=0),this.m_bodyContactCountBuffer.data&&(this.m_bodyContactCountBuffer.data[n]=0),this.m_consecutiveContactStepsBuffer.data&&(this.m_consecutiveContactStepsBuffer.data[n]=0),!this.m_positionBuffer.data)throw new Error;if(!this.m_velocityBuffer.data)throw new Error;this.m_positionBuffer.data[n]=(this.m_positionBuffer.data[n]||new I).Copy(e(t.position,I.ZERO)),this.m_velocityBuffer.data[n]=(this.m_velocityBuffer.data[n]||new I).Copy(e(t.velocity,I.ZERO)),this.m_weightBuffer[n]=0,this.m_forceBuffer[n]=(this.m_forceBuffer[n]||new I).SetZero(),this.m_staticPressureBuffer&&(this.m_staticPressureBuffer[n]=0),this.m_depthBuffer&&(this.m_depthBuffer[n]=0);var r=(new k).Copy(e(t.color,k.ZERO));!this.m_colorBuffer.data&&r.IsZero()||(this.m_colorBuffer.data=this.RequestBuffer(this.m_colorBuffer.data),this.m_colorBuffer.data[n]=(this.m_colorBuffer.data[n]||new k).Copy(r)),(this.m_userDataBuffer.data||t.userData)&&(this.m_userDataBuffer.data=this.RequestBuffer(this.m_userDataBuffer.data),this.m_userDataBuffer.data[n]=t.userData),this.m_handleIndexBuffer.data&&(this.m_handleIndexBuffer.data[n]=null);var s=this.m_proxyBuffer.data[this.m_proxyBuffer.Append()],a=e(t.lifetime,0),o=a>0;if(this.m_expirationTimeBuffer.data||o){if(this.SetParticleLifetime(n,o?a:this.ExpirationTimeToLifetime(-this.GetQuantizedTimeElapsed())),!this.m_indexByExpirationTimeBuffer.data)throw new Error;this.m_indexByExpirationTimeBuffer.data[n]=n}s.index=n;var l=e(t.group,null);return this.m_groupBuffer[n]=l,l&&(l.m_firstIndex0?n:r,e)},n.prototype.DestroyParticlesInShape=function(t,e,i){void 0===i&&(i=!1);var r=n.DestroyParticlesInShape_s_aabb;if(this.m_world.IsLocked())throw new Error;var s=new n.DestroyParticlesInShapeCallback(this,t,e,i),a=r;return t.ComputeAABB(a,e,0),this.m_world.QueryAABB(s,a),s.Destroyed()},n.prototype.CreateParticleGroup=function(t){var i=n.CreateParticleGroup_s_transform;if(this.m_world.IsLocked())throw new Error;var r=i;r.SetPositionAngle(e(t.position,I.ZERO),e(t.angle,0));var s=this.m_count;if(t.shape&&this.CreateParticlesWithShapeForGroup(t.shape,t,r),t.shapes&&this.CreateParticlesWithShapesForGroup(t.shapes,e(t.shapeCount,t.shapes.length),t,r),t.positionData)for(var a=e(t.particleCount,t.positionData.length),o=0;o0&&(this.m_lastBodyContactStepBuffer.data=this.RequestBuffer(this.m_lastBodyContactStepBuffer.data),this.m_bodyContactCountBuffer.data=this.RequestBuffer(this.m_bodyContactCountBuffer.data),this.m_consecutiveContactStepsBuffer.data=this.RequestBuffer(this.m_consecutiveContactStepsBuffer.data))},n.prototype.GetStuckCandidates=function(){return this.m_stuckParticleBuffer.Data()},n.prototype.GetStuckCandidateCount=function(){return this.m_stuckParticleBuffer.GetCount()},n.prototype.ComputeCollisionEnergy=function(){if(!this.m_velocityBuffer.data)throw new Error;for(var t=n.ComputeCollisionEnergy_s_v,e=this.m_velocityBuffer.data,i=0,r=0;r0?this.GetQuantizedTimeElapsed()+s:s;a!==this.m_expirationTimeBuffer.data[t]&&(this.m_expirationTimeBuffer.data[t]=a,this.m_expirationTimeBufferRequiresSorting=!0)},n.prototype.GetParticleLifetime=function(t){return this.ExpirationTimeToLifetime(this.GetExpirationTimeBuffer()[t])},n.prototype.SetDestructionByAge=function(t){t&&this.GetExpirationTimeBuffer(),this.m_def.destroyByAge=t},n.prototype.GetDestructionByAge=function(){return this.m_def.destroyByAge},n.prototype.GetExpirationTimeBuffer=function(){return this.m_expirationTimeBuffer.data=this.RequestBuffer(this.m_expirationTimeBuffer.data),this.m_expirationTimeBuffer.data},n.prototype.ExpirationTimeToLifetime=function(t){return(t>0?t-this.GetQuantizedTimeElapsed():t)*this.m_def.lifetimeGranularity},n.prototype.GetIndexByExpirationTimeBuffer=function(){if(this.GetParticleCount()?this.SetParticleLifetime(0,this.GetParticleLifetime(0)):this.m_indexByExpirationTimeBuffer.data=this.RequestBuffer(this.m_indexByExpirationTimeBuffer.data),!this.m_indexByExpirationTimeBuffer.data)throw new Error;return this.m_indexByExpirationTimeBuffer.data},n.prototype.ParticleApplyLinearImpulse=function(t,e){this.ApplyLinearImpulse(t,t+1,e)},n.prototype.ApplyLinearImpulse=function(t,e,i){if(!this.m_velocityBuffer.data)throw new Error;for(var n=this.m_velocityBuffer.data,r=(e-t)*this.GetParticleMass(),s=(new I).Copy(i).SelfMul(1/r),a=t;a=0;){var m=I.SubVV(e,c[u],s),v=I.DotVV(m,f),g=v*v-d*(I.DotVV(m,m)-this.m_squaredDiameter);if(g>=0){var b=T(g),A=(-v-b)/d;if(A>_)continue;if(A<0&&((A=(-v+b)/d)<0||A>_))continue;var x=I.AddVMulSV(m,A,f,o);x.Normalize();var C=t.ReportParticle(this,u,I.AddVMulSV(e,A,f,l),x,A);if((_=y(_,C))<=0)break}}}},n.prototype.ComputeAABB=function(t){var e=this.GetParticleCount();if(t.lowerBound.x=+i,t.lowerBound.y=+i,t.upperBound.x=-i,t.upperBound.y=-i,!this.m_positionBuffer.data)throw new Error;for(var n=this.m_positionBuffer.data,r=0;re?e:t}if(t=e(t,this.m_def.maxCount),t=e(t,this.m_flagsBuffer.userSuppliedCapacity),t=e(t,this.m_positionBuffer.userSuppliedCapacity),t=e(t,this.m_velocityBuffer.userSuppliedCapacity),t=e(t,this.m_colorBuffer.userSuppliedCapacity),t=e(t,this.m_userDataBuffer.userSuppliedCapacity),this.m_internalAllocatedCapacity0;this.m_lastBodyContactStepBuffer.data=this.ReallocateBuffer4(this.m_lastBodyContactStepBuffer,this.m_internalAllocatedCapacity,t,i),this.m_bodyContactCountBuffer.data=this.ReallocateBuffer4(this.m_bodyContactCountBuffer,this.m_internalAllocatedCapacity,t,i),this.m_consecutiveContactStepsBuffer.data=this.ReallocateBuffer4(this.m_consecutiveContactStepsBuffer,this.m_internalAllocatedCapacity,t,i),this.m_positionBuffer.data=this.ReallocateBuffer4(this.m_positionBuffer,this.m_internalAllocatedCapacity,t,!1),this.m_velocityBuffer.data=this.ReallocateBuffer4(this.m_velocityBuffer,this.m_internalAllocatedCapacity,t,!1),this.m_forceBuffer=this.ReallocateBuffer5(this.m_forceBuffer,0,this.m_internalAllocatedCapacity,t,!1),this.m_weightBuffer=this.ReallocateBuffer5(this.m_weightBuffer,0,this.m_internalAllocatedCapacity,t,!1),this.m_staticPressureBuffer=this.ReallocateBuffer5(this.m_staticPressureBuffer,0,this.m_internalAllocatedCapacity,t,!0),this.m_accumulationBuffer=this.ReallocateBuffer5(this.m_accumulationBuffer,0,this.m_internalAllocatedCapacity,t,!1),this.m_accumulation2Buffer=this.ReallocateBuffer5(this.m_accumulation2Buffer,0,this.m_internalAllocatedCapacity,t,!0),this.m_depthBuffer=this.ReallocateBuffer5(this.m_depthBuffer,0,this.m_internalAllocatedCapacity,t,!0),this.m_colorBuffer.data=this.ReallocateBuffer4(this.m_colorBuffer,this.m_internalAllocatedCapacity,t,!0),this.m_groupBuffer=this.ReallocateBuffer5(this.m_groupBuffer,0,this.m_internalAllocatedCapacity,t,!1),this.m_userDataBuffer.data=this.ReallocateBuffer4(this.m_userDataBuffer,this.m_internalAllocatedCapacity,t,!0),this.m_expirationTimeBuffer.data=this.ReallocateBuffer4(this.m_expirationTimeBuffer,this.m_internalAllocatedCapacity,t,!0),this.m_indexByExpirationTimeBuffer.data=this.ReallocateBuffer4(this.m_indexByExpirationTimeBuffer,this.m_internalAllocatedCapacity,t,!1),this.m_internalAllocatedCapacity=t}},n.prototype.CreateParticleForGroup=function(t,i,n){var r=new An;r.flags=e(t.flags,0),V.MulXV(i,n,r.position),I.AddVV(e(t.linearVelocity,I.ZERO),I.CrossSV(e(t.angularVelocity,0),I.SubVV(r.position,e(t.position,I.ZERO),I.s_t0),I.s_t0),r.velocity),r.color.Copy(e(t.color,k.ZERO)),r.lifetime=e(t.lifetime,0),r.userData=t.userData,this.CreateParticle(r)},n.prototype.CreateParticlesStrokeShapeForGroup=function(i,r,s){var a=n.CreateParticlesStrokeShapeForGroup_s_edge,o=n.CreateParticlesStrokeShapeForGroup_s_d,l=n.CreateParticlesStrokeShapeForGroup_s_p,c=e(r.stride,0);0===c&&(c=this.GetParticleStride());for(var h=0,u=i.GetChildCount(),_=0;_=e&&f=e&&dg||I.DotVV(m,m)>g||I.DotVV(v,v)>g)return;var b=S.m_groupBuffer[t],A=S.m_groupBuffer[e],x=S.m_groupBuffer[i],C=S.m_triadBuffer.data[S.m_triadBuffer.Append()];C.indexA=t,C.indexB=e,C.indexC=i,C.flags=c|h|u,C.strength=y(y(b?b.m_strength:1,A?A.m_strength:1),x?x.m_strength:1);var T=(_.x+f.x+d.x)/3,w=(_.y+f.y+d.y)/3;C.pa.x=_.x-T,C.pa.y=_.y-w,C.pb.x=f.x-T,C.pb.y=f.y-w,C.pc.x=d.x-T,C.pc.y=d.y-w,C.ka=-I.DotVV(v,p),C.kb=-I.DotVV(p,m),C.kc=-I.DotVV(m,v),C.s=I.CrossVV(_,f)+I.CrossVV(f,d)+I.CrossVV(d,_)}})),Pn(this.m_triadBuffer.data,0,this.m_triadBuffer.count,n.CompareTriadIndices),this.m_triadBuffer.Unique(n.MatchTriadIndices)}},n.prototype.UpdatePairsAndTriadsWithReactiveParticles=function(){var e=new n.ReactiveFilter(this.m_flagsBuffer);if(this.UpdatePairsAndTriads(0,this.m_count,e),!this.m_flagsBuffer.data)throw new Error;for(var i=0;i>0,m=0;mx&&(this.m_depthBuffer[s]=x,y=!0),A>C&&(this.m_depthBuffer[a]=C,y=!0)}if(!y)break}for(_=0;_0){if(!this.m_bodyContactCountBuffer.data)throw new Error;if(!this.m_lastBodyContactStepBuffer.data)throw new Error;if(!this.m_consecutiveContactStepsBuffer.data)throw new Error;for(var i=this.GetParticleCount(),r=0;rthis.m_lastBodyContactStepBuffer.data[r]+1&&(this.m_consecutiveContactStepsBuffer.data[r]=0)}this.m_bodyContactBuffer.SetCount(0),this.m_stuckParticleBuffer.SetCount(0);var s=t;this.ComputeAABB(s);var a=new n.UpdateBodyContactsCallback(this,this.GetFixtureContactFilter());this.m_world.QueryAABB(a,s),this.m_def.strictContactCheck&&this.RemoveSpuriousBodyContacts(),this.NotifyBodyContactListenerPostContact(e)},n.prototype.Solve=function(e){var i=n.Solve_s_subStep;if(0!==this.m_count&&(this.m_expirationTimeBuffer.data&&this.SolveLifetimes(e),this.m_allParticleFlags&t.b2ParticleFlag.b2_zombieParticle&&this.SolveZombie(),this.m_needsUpdateAllParticleFlags&&this.UpdateAllParticleFlags(),this.m_needsUpdateAllGroupFlags&&this.UpdateAllGroupFlags(),!this.m_paused))for(this.m_iterationIndex=0;this.m_iterationIndexi&&r.SelfMul(T(i/s))}},n.prototype.SolveGravity=function(t){if(!this.m_velocityBuffer.data)throw new Error;for(var e=n.SolveGravity_s_gravity,i=this.m_velocityBuffer.data,r=I.MulSV(t.dt*this.m_def.gravityScale,this.m_world.GetGravity(),e),s=0;s=0;){var V=p[F],N=this.m_groupBuffer[F];if(M!==N&&D!==N){var k=this.GetLinearVelocity(N,F,V,l),z=I.SubVV(V,S,c),G=I.SubVV(k,B,h),U=I.CrossVV(O,G),j=I.CrossVV(R,G)-I.CrossVV(z,O),H=I.CrossVV(R,z),W=void 0,X=void 0,Y=u,q=_;if(0===U){if(0===j)continue;if(!((X=-H/j)>=0&&X=0&&W<=1))continue}else{var J=j*j-4*H*U;if(J<0)continue;var Z=T(J),K=(-j-Z)/(2*U),Q=(-j+Z)/(2*U);if(K>Q){var $=K;K=Q,Q=$}if(X=K,I.AddVMulSV(R,X,O,Y),I.AddVMulSV(z,X,G,q),W=I.DotVV(Y,q)/I.DotVV(Y,Y),!(X>=0&&X=0&&W<=1)){if(!((X=Q)>=0&&X=0&&W<=1))continue}}var tt=f;tt.x=B.x+W*O.x-k.x,tt.y=B.y+W*O.y-k.y;var et=I.MulSV(g,tt,d);if(N&&this.IsRigidGroup(N)){var it=N.GetMass(),nt=N.GetInertia();it>0&&N.m_linearVelocity.SelfMulAdd(1/it,et),nt>0&&(N.m_angularVelocity+=I.CrossVV(I.SubVV(V,N.GetCenter(),I.s_t0),et)/nt)}else m[F].SelfAdd(tt);this.ParticleApplyForce(F,et.SelfMul(-e.inv_dt))}}}}},n.prototype.SolveStaticPressure=function(e){if(!this.m_flagsBuffer.data)throw new Error;this.m_staticPressureBuffer=this.RequestBuffer(this.m_staticPressureBuffer);for(var i=this.GetCriticalPressure(e),n=this.m_def.staticPressureStrength*i,r=.25*i,s=this.m_def.staticPressureRelaxation,a=0;a.25){var h=p.body,u=p.mass,_=r[c],f=p.normal,d=I.MulSV(a*u*(m-.25),f,i);s[c].SelfMulSub(o,d),h.ApplyLinearImpulse(d,_,!0)}}for(l=0;l.25&&(c=p.indexA,h=p.indexB,f=p.normal,d=I.MulSV(a*(m-.25),f,i),s[c].SelfSub(d),s[h].SelfAdd(d))}},n.prototype.SolveSolid=function(t){var e=n.SolveSolid_s_f;if(!this.m_velocityBuffer.data)throw new Error;var i=this.m_velocityBuffer.data;this.m_depthBuffer=this.RequestBuffer(this.m_depthBuffer);for(var r=t.inv_dt*this.m_def.ejectionStrength,s=0;s=0?(b=y(b,C),A=v(A,C+1)):x=!0}br:s})),this.m_expirationTimeBufferRequiresSorting=!1);for(var s=r-1;s>=0;--s){var a=n[s],o=i[a];if(ee.weight:t.index3)return!0;var o=t.Copy(n.normal);if(o.SelfMul(r.m_particleDiameter*(1-n.weight)),!r.m_positionBuffer.data)throw new Error;var c=I.AddVV(r.m_positionBuffer.data[n.index],o,e);if(!n.fixture.TestPoint(c)){for(var h=n.fixture.GetShape().GetChildCount(),u=0;uthis.m_stuckThreshold&&(this.m_stuckParticleBuffer.data[this.m_stuckParticleBuffer.Append()]=t)),this.m_lastBodyContactStepBuffer.data[t]=this.m_timestamp}},n.prototype.ValidateParticleIndex=function(t){return t>=0&&t0?1/n:0,e[0]=r>0?1/r:0,i[0]=I.CrossVV(I.SubVV(a,s,I.s_t0),o)},n.prototype.InitDampingParameterWithRigidGroupOrParticle=function(e,i,n,r,s,a,o,l){if(s&&r)this.InitDampingParameter(e,i,n,s.GetMass(),s.GetInertia(),s.GetCenter(),o,l);else{if(!this.m_flagsBuffer.data)throw new Error;var c=this.m_flagsBuffer.data[a];this.InitDampingParameter(e,i,n,c&t.b2ParticleFlag.b2_wallParticle?0:this.GetParticleMass(),0,o,o,l)}},n.prototype.ComputeDampingImpulse=function(t,e,i,n,r,s,a){var o=t+e*i*i+n+r*s*s;return o>0?a/o:0},n.prototype.ApplyDamping=function(t,e,i,n,r,s,a,o){if(r&&n)r.m_linearVelocity.SelfMulAdd(a*t,o),r.m_angularVelocity+=a*i*e;else{if(!this.m_velocityBuffer.data)throw new Error;this.m_velocityBuffer.data[s].SelfMulAdd(a*t,o)}},n.xTruncBits=12,n.yTruncBits=12,n.tagBits=32,n.yOffset=1<>>0,this.m_xUpper=(n&e.xMask)>>>0,this.m_yLower=(i&e.yMask)>>>0,this.m_yUpper=(n&e.yMask)>>>0,this.m_first=r,this.m_last=s}return t.prototype.GetNext=function(){for(;this.m_first>>0;if(t>=this.m_xLower&&t<=this.m_xUpper)return this.m_system.m_proxyBuffer.data[this.m_first++].index;this.m_first++}return u},t})();e.InsideBoundsEnumerator=r;e.ParticleListNode=function(){this.next=null,this.count=0,this.index=0};var s=(function(){function t(){}return t.prototype.Allocate=function(t,e){return e},t.prototype.Clear=function(){},t.prototype.GetCount=function(){return 0},t.prototype.Invalidate=function(){},t.prototype.GetValidBuffer=function(){return[]},t.prototype.GetBuffer=function(){return[]},t.prototype.SetCount=function(){},t})();e.FixedSetAllocator=s;e.FixtureParticle=function(t,e){this.second=u,this.first=t,this.second=e};var a=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ti(e,t),e.prototype.Initialize=function(){},e.prototype.Find=function(){return u},e})(e.FixedSetAllocator);e.FixtureParticleSet=a;e.ParticlePair=function(t,e){this.first=u,this.second=u,this.first=t,this.second=e};var o=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ti(e,t),e.prototype.Initialize=function(){},e.prototype.Find=function(){return u},e})(e.FixedSetAllocator);e.b2ParticlePairSet=o;var c=(function(){function t(){}return t.prototype.IsNecessary=function(){return!0},t.prototype.ShouldCreatePair=function(){return!0},t.prototype.ShouldCreateTriad=function(){return!0},t})();e.ConnectionFilter=c;var h=(function(t){function e(e,i,n,r){var s=t.call(this)||this;return s.m_callDestructionListener=!1,s.m_destroyed=0,s.m_system=e,s.m_shape=i,s.m_xf=n,s.m_callDestructionListener=r,s.m_destroyed=0,s}return ti(e,t),e.prototype.ReportFixture=function(){return!1},e.prototype.ReportParticle=function(t,e){if(t!==this.m_system)return!1;if(!this.m_system.m_positionBuffer.data)throw new Error;return this.m_shape.TestPoint(this.m_xf,this.m_system.m_positionBuffer.data[e])&&(this.m_system.DestroyParticle(e,this.m_callDestructionListener),this.m_destroyed++),!0},e.prototype.Destroyed=function(){return this.m_destroyed},e})(an);e.DestroyParticlesInShapeCallback=h;var _=(function(t){function e(e){var i=t.call(this)||this;return i.m_threshold=0,i.m_threshold=e,i}return ti(e,t),e.prototype.ShouldCreatePair=function(t,e){return t0?1/_:0,p=f>0?1/f:0,m=this.m_system.m_flagsBuffer.data[r]&t.b2ParticleFlag.b2_wallParticle?0:this.m_system.GetParticleInvMass(),y=I.SubVV(o,u,a),v=I.CrossVV(y,l),g=m+d+p*v*v,b=this.m_system.m_bodyContactBuffer.data[this.m_system.m_bodyContactBuffer.Append()];b.index=r,b.body=h,b.fixture=i,b.weight=1-c*this.m_system.m_inverseDiameter,b.normal.Copy(l.SelfNeg()),b.mass=g>0?1/g:0,this.m_system.DetectStuckParticle(r)}},n.ReportFixtureAndParticle_s_n=new I,n.ReportFixtureAndParticle_s_rp=new I,n})(kn);e.UpdateBodyContactsCallback=p;var m=(function(i){function n(t,e){var n=i.call(this,t)||this;return n.m_step=e,n}return ti(n,i),n.prototype.ReportFixtureAndParticle=function(i,n,r){var s=e.SolveCollisionCallback.ReportFixtureAndParticle_s_p1,a=e.SolveCollisionCallback.ReportFixtureAndParticle_s_output,o=e.SolveCollisionCallback.ReportFixtureAndParticle_s_input,c=e.SolveCollisionCallback.ReportFixtureAndParticle_s_p,h=e.SolveCollisionCallback.ReportFixtureAndParticle_s_v,u=e.SolveCollisionCallback.ReportFixtureAndParticle_s_f,_=i.GetBody();if(!this.m_system.m_positionBuffer.data)throw new Error;if(!this.m_system.m_velocityBuffer.data)throw new Error;var f=this.m_system.m_positionBuffer.data[r],d=this.m_system.m_velocityBuffer.data[r],p=a,m=o;if(0===this.m_system.m_iterationIndex){var y=V.MulTXV(_.m_xf0,f,s);i.GetShape().GetType()===t.b2ShapeType.e_circleShape&&(y.SelfSub(_.GetLocalCenter()),F.MulRV(_.m_xf0.q,y,y),F.MulTRV(_.m_xf.q,y,y),y.SelfAdd(_.GetLocalCenter())),V.MulXV(_.m_xf,y,m.p1)}else m.p1.Copy(f);if(I.AddVMulSV(f,this.m_step.dt,d,m.p2),m.maxFraction=1,i.RayCast(p,m,n)){var v=p.normal,g=c;g.x=(1-p.fraction)*m.p1.x+p.fraction*m.p2.x+l*v.x,g.y=(1-p.fraction)*m.p1.y+p.fraction*m.p2.y+l*v.y;var b=h;b.x=this.m_step.inv_dt*(g.x-f.x),b.y=this.m_step.inv_dt*(g.y-f.y),this.m_system.m_velocityBuffer.data[r].Copy(b);var A=u;A.x=this.m_step.inv_dt*this.m_system.GetParticleMass()*(d.x-b.x),A.y=this.m_step.inv_dt*this.m_system.GetParticleMass()*(d.y-b.y),this.m_system.ParticleApplyForce(r,A)}},n.prototype.ReportParticle=function(){return!1},n.ReportFixtureAndParticle_s_p1=new I,n.ReportFixtureAndParticle_s_output=new Ct,n.ReportFixtureAndParticle_s_input=new xt,n.ReportFixtureAndParticle_s_p=new I,n.ReportFixtureAndParticle_s_v=new I,n.ReportFixtureAndParticle_s_f=new I,n})(kn);e.SolveCollisionCallback=m})(t.b2ParticleSystem||(t.b2ParticleSystem={}));var Wn=(function(){function e(t){this.m_newFixture=!1,this.m_locked=!1,this.m_clearForces=!0,this.m_contactManager=new ln,this.m_bodyList=null,this.m_jointList=null,this.m_particleSystemList=null,this.m_bodyCount=0,this.m_jointCount=0,this.m_gravity=new I,this.m_allowSleep=!0,this.m_destructionListener=null,this.m_debugDraw=null,this.m_inv_dt0=0,this.m_warmStarting=!0,this.m_continuousPhysics=!0,this.m_subStepping=!1,this.m_stepComplete=!0,this.m_profile=new cn,this.m_island=new bn,this.s_stack=[],this.m_controllerList=null,this.m_controllerCount=0,this.m_gravity.Copy(t)}return e.prototype.SetDestructionListener=function(t){this.m_destructionListener=t},e.prototype.SetContactFilter=function(t){this.m_contactManager.m_contactFilter=t},e.prototype.SetContactListener=function(t){this.m_contactManager.m_contactListener=t},e.prototype.SetDebugDraw=function(t){this.m_debugDraw=t},e.prototype.CreateBody=function(t){if(void 0===t&&(t={}),this.IsLocked())throw new Error;var e=new _i(t,this);return e.m_prev=null,e.m_next=this.m_bodyList,this.m_bodyList&&(this.m_bodyList.m_prev=e),this.m_bodyList=e,++this.m_bodyCount,e},e.prototype.DestroyBody=function(t){if(this.IsLocked())throw new Error;for(var e=t.m_jointList;e;){var i=e;e=e.next,this.m_destructionListener&&this.m_destructionListener.SayGoodbyeJoint(i.joint),this.DestroyJoint(i.joint),t.m_jointList=e}t.m_jointList=null;for(var n=t.m_controllerList;n;){var r=n;n=n.nextController,r.controller.RemoveBody(t)}for(var s=t.m_contactList;s;){var a=s;s=s.next,this.m_contactManager.Destroy(a.contact)}t.m_contactList=null;for(var o=t.m_fixtureList;o;){var l=o;o=o.m_next,this.m_destructionListener&&this.m_destructionListener.SayGoodbyeFixture(l),l.DestroyProxies(),l.Destroy(),t.m_fixtureList=o,t.m_fixtureCount-=1}t.m_fixtureList=null,t.m_fixtureCount=0,t.m_prev&&(t.m_prev.m_next=t.m_next),t.m_next&&(t.m_next.m_prev=t.m_prev),t===this.m_bodyList&&(this.m_bodyList=t.m_next),--this.m_bodyCount},e._Joint_Create=function(e){switch(e.type){case t.b2JointType.e_distanceJoint:return new vi(e);case t.b2JointType.e_mouseJoint:return new Mi(e);case t.b2JointType.e_prismaticJoint:return new Bi(e);case t.b2JointType.e_revoluteJoint:return new Oi(e);case t.b2JointType.e_pulleyJoint:return new Pi(e);case t.b2JointType.e_gearJoint:return new Ti(e);case t.b2JointType.e_wheelJoint:return new zi(e);case t.b2JointType.e_weldJoint:return new Ni(e);case t.b2JointType.e_frictionJoint:return new xi(e);case t.b2JointType.e_ropeJoint:return new Fi(e);case t.b2JointType.e_motorJoint:return new wi(e);case t.b2JointType.e_areaJoint:return new bi(e)}throw new Error},e._Joint_Destroy=function(){},e.prototype.CreateJoint=function(t){if(this.IsLocked())throw new Error;var i=e._Joint_Create(t,null);i.m_prev=null,i.m_next=this.m_jointList,this.m_jointList&&(this.m_jointList.m_prev=i),this.m_jointList=i,++this.m_jointCount,i.m_edgeA.prev=null,i.m_edgeA.next=i.m_bodyA.m_jointList,i.m_bodyA.m_jointList&&(i.m_bodyA.m_jointList.prev=i.m_edgeA),i.m_bodyA.m_jointList=i.m_edgeA,i.m_edgeB.prev=null,i.m_edgeB.next=i.m_bodyB.m_jointList,i.m_bodyB.m_jointList&&(i.m_bodyB.m_jointList.prev=i.m_edgeB),i.m_bodyB.m_jointList=i.m_edgeB;var n=t.bodyA,r=t.bodyB;if(!t.collideConnected)for(var s=r.GetContactList();s;)s.other===n&&s.contact.FlagForFiltering(),s=s.next;return i},e.prototype.DestroyJoint=function(t){if(this.IsLocked())throw new Error;var i=t.m_collideConnected;t.m_prev&&(t.m_prev.m_next=t.m_next),t.m_next&&(t.m_next.m_prev=t.m_prev),t===this.m_jointList&&(this.m_jointList=t.m_next);var n=t.m_bodyA,r=t.m_bodyB;if(n.SetAwake(!0),r.SetAwake(!0),t.m_edgeA.prev&&(t.m_edgeA.prev.next=t.m_edgeA.next),t.m_edgeA.next&&(t.m_edgeA.next.prev=t.m_edgeA.prev),t.m_edgeA===n.m_jointList&&(n.m_jointList=t.m_edgeA.next),t.m_edgeA.prev=null,t.m_edgeA.next=null,t.m_edgeB.prev&&(t.m_edgeB.prev.next=t.m_edgeB.next),t.m_edgeB.next&&(t.m_edgeB.next.prev=t.m_edgeB.prev),t.m_edgeB===r.m_jointList&&(r.m_jointList=t.m_edgeB.next),t.m_edgeB.prev=null,t.m_edgeB.next=null,e._Joint_Destroy(t,null),--this.m_jointCount,!i)for(var s=r.GetContactList();s;)s.other===n&&s.contact.FlagForFiltering(),s=s.next},e.prototype.CreateParticleSystem=function(e){if(this.IsLocked())throw new Error;var i=new t.b2ParticleSystem(e,this);return i.m_prev=null,i.m_next=this.m_particleSystemList,this.m_particleSystemList&&(this.m_particleSystemList.m_prev=i),this.m_particleSystemList=i,i},e.prototype.DestroyParticleSystem=function(t){if(this.IsLocked())throw new Error;t.m_prev&&(t.m_prev.m_next=t.m_next),t.m_next&&(t.m_next.m_prev=t.m_prev),t===this.m_particleSystemList&&(this.m_particleSystemList=t.m_next)},e.prototype.CalculateReasonableParticleIterations=function(t){return null===this.m_particleSystemList?1:xn(this.m_gravity.Length(),(function(t){for(var e=i,n=t.GetParticleSystemList();null!==n;n=n.m_next)e=y(e,n.GetRadius());return e})(this),t)},e.prototype.Step=function(t,i,n,r){void 0===r&&(r=this.CalculateReasonableParticleIterations(t));var s=e.Step_s_stepTimer.Reset();this.m_newFixture&&(this.m_contactManager.FindNewContacts(),this.m_newFixture=!1),this.m_locked=!0;var a=e.Step_s_step;a.dt=t,a.velocityIterations=i,a.positionIterations=n,a.particleIterations=r,a.inv_dt=t>0?1/t:0,a.dtRatio=this.m_inv_dt0*t,a.warmStarting=this.m_warmStarting;var o=e.Step_s_timer.Reset();if(this.m_contactManager.Collide(),this.m_profile.collide=o.GetMilliseconds(),this.m_stepComplete&&a.dt>0){for(var l=e.Step_s_timer.Reset(),c=this.m_particleSystemList;c;c=c.m_next)c.Solve(a);this.Solve(a),this.m_profile.solve=l.GetMilliseconds()}if(this.m_continuousPhysics&&a.dt>0){var h=e.Step_s_timer.Reset();this.SolveTOI(a),this.m_profile.solveTOI=h.GetMilliseconds()}a.dt>0&&(this.m_inv_dt0=a.inv_dt),this.m_clearForces&&this.ClearForces(),this.m_locked=!1,this.m_profile.step=s.GetMilliseconds()},e.prototype.ClearForces=function(){for(var t=this.m_bodyList;t;t=t.m_next)t.m_force.SetZero(),t.m_torque=0},e.prototype.DrawParticleSystem=function(t){if(null!==this.m_debugDraw){var e=t.GetParticleCount();if(e){var i=t.GetRadius(),n=t.GetPositionBuffer();if(t.m_colorBuffer.data){var r=t.GetColorBuffer();this.m_debugDraw.DrawParticles(n,i,r,e)}else this.m_debugDraw.DrawParticles(n,i,null,e)}}},e.prototype.DrawDebugData=function(){if(null!==this.m_debugDraw){var i=this.m_debugDraw.GetFlags(),n=e.DrawDebugData_s_color.SetRGB(0,0,0);if(i&t.b2DrawFlags.e_shapeBit)for(var r=this.m_bodyList;r;r=r.m_next){var s=r.m_xf;this.m_debugDraw.PushTransform(s);for(var a=r.GetFixtureList();a;a=a.m_next)r.IsActive()?r.GetType()===t.b2BodyType.b2_staticBody?(n.SetRGB(.5,.9,.5),this.DrawShape(a,n)):r.GetType()===t.b2BodyType.b2_kinematicBody?(n.SetRGB(.5,.5,.9),this.DrawShape(a,n)):r.IsAwake()?(n.SetRGB(.9,.7,.7),this.DrawShape(a,n)):(n.SetRGB(.6,.6,.6),this.DrawShape(a,n)):(n.SetRGB(.5,.5,.3),this.DrawShape(a,n));this.m_debugDraw.PopTransform(s)}if(i&t.b2DrawFlags.e_particleBit)for(var o=this.m_particleSystemList;o;o=o.m_next)this.DrawParticleSystem(o);if(i&t.b2DrawFlags.e_jointBit)for(var l=this.m_jointList;l;l=l.m_next)this.DrawJoint(l);if(i&t.b2DrawFlags.e_aabbBit){n.SetRGB(.9,.3,.9);var c=e.DrawDebugData_s_vs;for(r=this.m_bodyList;r;r=r.m_next)if(r.IsActive())for(a=r.GetFixtureList();a;a=a.m_next)for(var h=0;h0;){if(!(i=o[--c]))throw new Error;if(r.AddBody(i),i.m_awakeFlag=!0,i.GetType()!==t.b2BodyType.b2_staticBody){for(var h=i.m_contactList;h;h=h.next){var u=h.contact;if(!u.m_islandFlag&&u.IsEnabled()&&u.IsTouching()){var _=u.m_fixtureA.m_isSensor,f=u.m_fixtureB.m_isSensor;if(!_&&!f){if(r.AddContact(u),u.m_islandFlag=!0,!(p=h.other))throw new Error;p.m_islandFlag||(o[c++]=p,p.m_islandFlag=!0)}}}for(var d=i.m_jointList;d;d=d.next){var p;d.joint.m_islandFlag||(p=d.other).IsActive()&&(r.AddJoint(d.joint),d.joint.m_islandFlag=!0,p.m_islandFlag||(o[c++]=p,p.m_islandFlag=!0))}}}var m=new cn;r.Solve(m,e,this.m_gravity,this.m_allowSleep),this.m_profile.solveInit+=m.solveInit,this.m_profile.solveVelocity+=m.solveVelocity,this.m_profile.solvePosition+=m.solvePosition;for(var y=0;y8)){var c=1;if(a.m_toiFlag)c=a.m_toi;else{var h=a.GetFixtureA(),u=a.GetFixtureB();if(h.IsSensor()||u.IsSensor())continue;var _=h.GetBody(),f=u.GetBody(),d=_.m_type,p=f.m_type,m=_.IsAwake()&&d!==t.b2BodyType.b2_staticBody,v=f.IsAwake()&&p!==t.b2BodyType.b2_staticBody;if(!m&&!v)continue;var g=_.IsBullet()||d!==t.b2BodyType.b2_dynamicBody,b=f.IsBullet()||p!==t.b2BodyType.b2_dynamicBody;if(!g&&!b)continue;var A=_.m_sweep.alpha0;_.m_sweep.alpha0this.maxTimestep&&this.maxTimestep>0&&(i=this.maxTimestep);for(var r=this.m_bodyList;r;r=r.nextBody){var s=r.body;if(s.IsAwake()){var a=s.GetWorldVector(O.MulMV(this.T,s.GetLocalVector(s.GetLinearVelocity(),I.s_t0),I.s_t1),e.Step_s_damping);s.SetLinearVelocity(I.AddVV(s.GetLinearVelocity(),I.MulSV(i,a,I.s_t0),I.s_t1))}}}},e.prototype.Draw=function(){},e.prototype.SetAxisAligned=function(t,e){this.T.ex.x=-t,this.T.ex.y=0,this.T.ey.x=0,this.T.ey.y=-e,this.maxTimestep=t>0||e>0?1/v(t,e):0},e.Step_s_damping=new I,e})(Yn),$n=(function(){function t(){this.m_count=0,this.m_ps=[],this.m_p0s=[],this.m_vs=[],this.m_ims=[],this.m_Ls=[],this.m_as=[],this.m_gravity=new I,this.m_damping=0,this.m_k2=1,this.m_k3=.1}return t.prototype.GetVertexCount=function(){return this.m_count},t.prototype.GetVertices=function(){return this.m_ps},t.prototype.Initialize=function(t){this.m_count=t.count,this.m_ps=I.MakeArray(this.m_count),this.m_p0s=I.MakeArray(this.m_count),this.m_vs=I.MakeArray(this.m_count),this.m_ims=p(this.m_count);for(var e=0;e0?1/i:0}var n=this.m_count-1,r=this.m_count-2;for(this.m_Ls=p(n),this.m_as=p(r),e=0;e0&&this.m_vs[n].SelfMulAdd(t,this.m_gravity),this.m_vs[n].SelfMul(i),this.m_ps[n].SelfMulAdd(t,this.m_vs[n]);for(n=0;ns;)C=(m-=2*s)-this.m_as[i];for(;C<-s;)C=(m+=2*s)-this.m_as[i];var T=-this.m_k3*x*C;n.SelfMulAdd(o*T,g),r.SelfMulAdd(l*T,b),a.SelfMulAdd(c*T,A)}}}},t.prototype.Draw=function(t){for(var e=new k(.4,.5,.7),i=0;i>1&2147483647,t|=t>>2&1073741823,t|=t>>4&268435455,1+((t|=t>>8&16777215)|t>>16&65535)},t.b2IsPowerOfTwo=function(t){return t>0&&0==(t&t-1)},t.b2Random=function(){return 2*Math.random()-1},t.b2RandomRange=function(t,e){return(e-t)*Math.random()+t},t.b2Vec2=I,t.b2Vec2_zero=P,t.b2Vec3=R,t.b2Mat22=O,t.b2Mat33=L,t.b2Rot=F,t.b2Transform=V,t.b2Sweep=N,t.b2Color=k,t.b2Draw=z,t.b2Timer=G,t.b2Counter=U,t.b2GrowableStack=j,t.b2BlockAllocator=function(){},t.b2StackAllocator=function(){},t.b2ContactFeature=pt,t.b2ContactID=mt,t.b2ManifoldPoint=yt,t.b2Manifold=gt,t.b2WorldManifold=bt,t.b2GetPointStates=function(e,i,n,r){var s;for(s=0;sx;){t.iterations+=1,d=i.GetSupport(F.MulTRV(s.q,I.NegV(b,I.s_t1),I.s_t0)),p=V.MulXV(s,i.GetVertex(d),lt),y=n.GetSupport(F.MulTRV(a.q,b,I.s_t0)),g=V.MulXV(a,n.GetVertex(y),ct);var T=I.SubVV(p,g,ut);b.Normalize();var S=I.DotVV(b,T),w=I.DotVV(b,o);if(S-A>u*w){if(w<=0)return!1;if((u=(S-A)/w)>1)return!1;c.Copy(b).SelfNeg(),_.m_count=0}var E=f[_.m_count];switch(E.indexA=y,E.wA.Copy(g).SelfMulAdd(u,o),E.indexB=d,E.wB.Copy(p),E.w.Copy(E.wB).SelfSub(E.wA),E.a=1,_.m_count+=1,_.m_count){case 1:break;case 2:_.Solve2();break;case 3:_.Solve3()}if(3===_.m_count)return!1;_.GetClosestPoint(b),++C}var M=_t,D=ft;return _.GetWitnessPoints(M,D),b.LengthSquared()>0&&(c.Copy(b).SelfNeg(),c.Normalize()),t.normal.Copy(c),t.lambda=u,t.iterations=C,!0},t.b2Pair=Ot,t.b2BroadPhase=Lt,t.b2PairLessThan=Ft,t.b2TreeNode=Pt,t.b2DynamicTree=Rt,t.b2_toi_reset=function(){t.b2_toiTime=0,t.b2_toiMaxTime=0,t.b2_toiCalls=0,t.b2_toiIters=0,t.b2_toiMaxIters=0,t.b2_toiRootIters=0,t.b2_toiMaxRootIters=0},t.b2TOIInput=Wt,t.b2TOIOutput=Yt,t.b2SeparationFunction=qt,t.b2TimeOfImpact=re,t.b2CollideCircles=oe,t.b2CollidePolygonAndCircle=ue,t.b2CollidePolygons=Le,t.b2CollideEdgeAndCircle=He,t.b2CollideEdgeAndPolygon=Je,t.b2MassData=Ke,t.b2Shape=Qe,t.b2CircleShape=ii,t.b2PolygonShape=ni,t.b2EdgeShape=ri,t.b2ChainShape=si,t.b2Filter=ai,t.b2FixtureDef=oi,t.b2FixtureProxy=li,t.b2Fixture=ci,t.b2BodyDef=function(){this.type=t.b2BodyType.b2_staticBody,this.position=new I(0,0),this.angle=0,this.linearVelocity=new I(0,0),this.angularVelocity=0,this.linearDamping=0,this.angularDamping=0,this.allowSleep=!0,this.awake=!0,this.fixedRotation=!1,this.bullet=!1,this.active=!0,this.userData=null,this.gravityScale=1},t.b2Body=_i,t.b2World=Wn,t.b2DestructionListener=en,t.b2ContactFilter=nn,t.b2ContactImpulse=rn,t.b2ContactListener=sn,t.b2QueryCallback=an,t.b2RayCastCallback=on,t.b2Island=bn,t.b2Profile=cn,t.b2TimeStep=hn,t.b2Position=un,t.b2Velocity=_n,t.b2SolverData=fn,t.b2ContactManager=ln,t.b2MixFriction=Gi,t.b2MixRestitution=Ui,t.b2ContactEdge=Hi,t.b2Contact=Wi,t.b2ContactRegister=$i,t.b2ContactFactory=tn,t.g_blockSolve=!1,t.b2VelocityConstraintPoint=dn,t.b2ContactVelocityConstraint=pn,t.b2ContactPositionConstraint=mn,t.b2ContactSolverDef=yn,t.b2PositionSolverManifold=vn,t.b2ContactSolver=gn,t.b2CircleContact=Xi,t.b2PolygonContact=Yi,t.b2PolygonAndCircleContact=qi,t.b2EdgeAndCircleContact=Ji,t.b2EdgeAndPolygonContact=Zi,t.b2ChainAndCircleContact=Ki,t.b2ChainAndPolygonContact=Qi,t.b2Jacobian=fi,t.b2JointEdge=di,t.b2JointDef=pi,t.b2Joint=mi,t.b2AreaJointDef=gi,t.b2AreaJoint=bi,t.b2DistanceJointDef=yi,t.b2DistanceJoint=vi,t.b2FrictionJointDef=Ai,t.b2FrictionJoint=xi,t.b2GearJointDef=Ci,t.b2GearJoint=Ti,t.b2MotorJointDef=Si,t.b2MotorJoint=wi,t.b2MouseJointDef=Ei,t.b2MouseJoint=Mi,t.b2PrismaticJointDef=Di,t.b2PrismaticJoint=Bi,t.b2_minPulleyLength=2,t.b2PulleyJointDef=Ii,t.b2PulleyJoint=Pi,t.b2RevoluteJointDef=Ri,t.b2RevoluteJoint=Oi,t.b2RopeJointDef=Li,t.b2RopeJoint=Fi,t.b2WeldJointDef=Vi,t.b2WeldJoint=Ni,t.b2WheelJointDef=ki,t.b2WheelJoint=zi,t.b2ControllerEdge=Xn,t.b2Controller=Yn,t.b2BuoyancyController=qn,t.b2ConstantAccelController=Jn,t.b2ConstantForceController=Zn,t.b2GravityController=Kn,t.b2TensorDampingController=Qn,t.b2ParticleDef=An,t.b2CalculateParticleIterations=xn,t.b2ParticleHandle=Tn,t.b2ParticleGroupDef=Sn,t.b2ParticleGroup=wn,t.b2GrowableBuffer=Nn,t.b2FixtureParticleQueryCallback=kn,t.b2ParticleContact=zn,t.b2ParticleBodyContact=Gn,t.b2ParticlePair=Un,t.b2ParticleTriad=jn,t.b2ParticleSystemDef=Hn,t.b2RopeDef=function(){this.vertices=[],this.count=0,this.masses=[],this.gravity=new I(0,0),this.damping=.1,this.k2=.9,this.k3=.1},t.b2Rope=$n,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof i&&void 0!==e?n(i):"function"==typeof define&&define.amd?define(["exports"],n):n((void 0).box2d={})}),{}],435:[(function(t,e){"use strict";var i="undefined"==typeof window?global:window;i.cc=i.cc||{},cc.internal=cc.internal||{},t("./predefine"),t("./polyfill/string"),t("./polyfill/misc"),t("./polyfill/array"),t("./polyfill/object"),t("./polyfill/array-buffer"),t("./polyfill/number"),t("./polyfill/typescript"),t("./cocos2d/core/predefine"),t("./cocos2d"),t("./extends"),e.exports=i.cc}),{"./cocos2d":351,"./cocos2d/core/predefine":263,"./extends":410,"./package":void 0,"./polyfill/array":437,"./polyfill/array-buffer":436,"./polyfill/misc":438,"./polyfill/number":439,"./polyfill/object":440,"./polyfill/string":441,"./polyfill/typescript":442,"./predefine":443}],436:[(function(){"use strict";if(!ArrayBuffer.isView){var t=Object.getPrototypeOf(Int8Array);ArrayBuffer.isView="function"==typeof t?function(e){return e instanceof t}:function(t){if("object"!=typeof t)return!1;var e=t.constructor;return e===Float64Array||e===Float32Array||e===Uint8Array||e===Uint32Array||e===Int8Array}}}),{}],437:[(function(){"use strict";Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.find||(Array.prototype.find=function(t){for(var e=this.length,i=0;i0?1:-1}),Math.log2||(Math.log2=function(t){return Math.log(t)*Math.LOG2E}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),!console.time){var t=window.performance||Date,e=Object.create(null);console.time=function(i){e[i]=t.now()},console.timeEnd=function(i){var n=e[i],r=t.now()-n;console.log(i+": "+r+"ms")}}}),{}],439:[(function(){"use strict";Number.parseFloat=Number.parseFloat||parseFloat,Number.parseInt=Number.parseInt||parseInt}),{}],440:[(function(){"use strict";Object.assign||(Object.assign=function(t,e){return cc.js.mixin(t,e)}),Object.getOwnPropertyDescriptors||(Object.getOwnPropertyDescriptors=function(t){var e={},i=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t)));for(var n=0;nthis.length)&&(e=this.length),e-=t.length;var i=this.indexOf(t,e);return-1!==i&&i===e}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/,"")})}),{}],442:[(function(){"use strict";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])};window.__extends=function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)},window.__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},window.__param=function(t,e){return function(i,n){e(i,n,t)}},window.__metadata=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},window.__awaiter=function(t,e,i,n){return new(i||(i=Promise))(function(r,s){function a(t){try{l(n.next(t))}catch(e){s(e)}}function o(t){try{l(n.throw(t))}catch(e){s(e)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,o)}l((n=n.apply(t,e||[])).next())})},window.__generator=function(t,e){var i,n,r,s,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return l([t,e])}}function l(s){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},window.__read=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,s=i.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(o){r={error:o}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a},window.__spread=function(){for(var t=[],e=0;e1||o(t,e)})})}function o(t,e){try{(i=r[t](e)).value instanceof __await?Promise.resolve(i.value.v).then(l,c):h(s[0][2],i)}catch(n){h(s[0][3],n)}var i}function l(t){o("next",t)}function c(t){o("throw",t)}function h(t,e){t(e),s.shift(),s.length&&o(s[0][0],s[0][1])}},window.__asyncDelegator=function(t){var e,i;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,r){e[n]=t[n]?function(e){return(i=!i)?{value:__await(t[n](e)),done:"return"===n}:r?r(e):e}:r}},window.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=t[i]&&function(e){return new Promise(function(n,s){r(n,s,(e=t[i](e)).done,e.value)})}}function r(t,e,i,n){Promise.resolve(n).then((function(e){t({value:e,done:i})}),e)}},window.__makeTemplateObject=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};var e=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};window.__importStar=function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&__createBinding(i,t,n);return e(i,t),i},window.__importDefault=function(t){return t&&t.__esModule?t:{default:t}},window.__classPrivateFieldGet=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},window.__classPrivateFieldSet=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i}}),{}],443:[(function(){"use strict";var t="undefined"==typeof window?global:window;function e(e,i){void 0===t[e]&&Object.defineProperty(t,e,{get:function(){var t;return"CC_WECHATGAMESUB"===e?t="cc.sys.platform === cc.sys.WECHAT_GAME_SUB":"CC_WECHATGAME"===e?t="cc.sys.platform === cc.sys.WECHAT_GAME":"CC_QQPLAY"===e&&(t="cc.sys.platform === cc.sys.QQ_PLAY"),cc.warnID(1400,e,t),i}})}function i(e){return"object"==typeof t[e]}(function(e,i){void 0===t[e]&&(t[e]=i)})("CC_BUILD",!1),t.CC_BUILD=!0,t.CC_DEV=!1,t.CC_DEBUG=!1,t.CC_JSB=!1,t.CC_NATIVERENDERER=!1,t.CC_SUPPORT_JIT=!0,t.CC_PHYSICS_BUILTIN=!1,t.CC_PHYSICS_CANNON=!0,t.CC_EDITOR=!1,t.CC_PREVIEW=!1,t.CC_TEST=!1,t.CC_RUNTIME=!1,t.CC_JSB=!1;var n=!(!i("wx")||!wx.getSharedCanvas),r=!(!i("wx")||!wx.getSystemInfoSync&&!wx.getSharedCanvas),s=i("bk");e("CC_WECHATGAMESUB",n),e("CC_WECHATGAME",r),e("CC_QQPLAY",s),t.CocosEngine=cc.ENGINE_VERSION="2.4.4"}),{}]},{},[435]); \ No newline at end of file diff --git a/index.html b/index.html index a7ed45c..0e6aa15 100644 --- a/index.html +++ b/index.html @@ -53,9 +53,9 @@ - + - +